Matt Leaverton

Software and Electronics.

Currently Senior Software Engineer at Glowforge

Connect with me:

Add Web Analytics in 10 Minutes with Goatcounter

No exaggeration - it took me 10 minutes or less from deciding to add analytics to my site with Goatcounter until it was fully setup and deployed.

Details

Goatcounter is an open-source, privacy friendly, free for reasonable public usage, and ridiculously easy to set up.

I signed up for an account with my email, set the URL of my site, and chose a unique identifier, then I was all set to go on the Goatcounter side. I only needed to add the following lines to the base HTML template file for my static site, deploy, and that was absolutely it.

<script data-goatcounter="https://<unique-id>.goatcounter.com/count"
    async src="//gc.zgo.at/count.js"></script>

Now I can view page visits over time, get a summary of screen sizes, operating systems, referrals, and country of origins for views. It even allows me to toggle so that my own page views do not count. Big fan so far.