Add traffic analytics to your quarto blog


Teresa Kubacka


November 9, 2022

I have recently added lightweight traffic analytics to this blog. I decided not to go for Google Analytics, but use one of the free, open-source, privacy-conscious options instead. I went with GoatCounter. To set up traffic analytics with GoatCounter is quite easy:

To integrate the GoatCounter tracking script in the Quarto blog, I used the solution which I found on Danielle Navarro’s blog:

<script data-goatcounter=""
        async src="//"></script>
    include-after-body: traffic.html

That’s it! Now the GoatCounter script will be embedded in all the pages on the blog.

If you are using another tracking provider, Quarto has a tutorial how to switch on cookies and embed your own script.