How to add javascript to all pages?

Thanks Jeremy,
I achieve to do it with include-in-header in _quarto.yml :

format:
  html:
    theme: litera
    include-in-header:
      file: matomo_tracking.html

The file matomo_tracking.html contains the Javascript tracking code inside a <script> tag.

3 Likes