Trying Out GoatCounter
Published February 8, 2024
I’ve been waffling on deciding what analytics service to try out for a while and finally decided to commit and try out GoatCounter (GC) on this website. I’ve been wanting to figure out a web analytics alternative to Google Analytics (GA) for years because 1) I find I don’t leverage GA at all and 2) I’d prefer something that’s open source and more privacy focused so ideally I use it and 3) I have been idly slowly trying to De-Google myself over the years.
It’s important to call out that I’m really only interested in basic analytics: which pages and how many hits? I can appreciate a bit more data around knowing where the traffic (e.g. the
Referer) comes from and by who at the most broad sense. I’m not interested in tracking richer data around how long people are on the website, what they click, and any sort of attempt at measuring “conversion.”
I’ve also personally been a fan of Martin and their blog for a while. Some personal favorite posts are one on YAML as a config format and another re: hard wrapping email bodies.
For years I’ve had this chunk in my personal
todo.md file, which has been copy-pasted and lightly edited:
- figure out analytics (dropping GA for sure)
- ideally self-hosting or pay small price i.e. Blot, Miniflux, Wallabag
- (looks like this has been acquired and now lives at https://www.heap.io/)
Along with a small card on GitHub when I was trying out their “classic” projects feature for some minimal kanban: https://github.com/users/Pinjasaur/projects/1#card-50959045
Some additional options that have caught my eye more recently:
- recent within the past couple years
- local company by the great folks behind https://trackjs.com/
Martin has written plenty on the what, why, how, and everything in between re: the architecture, design, and implementation of GC. Of course, it’s open source too.
- Why make GoatCounter?
- GoatCounter’s design
- How sessions are tracked
- Analytics on personal websites
- Why ignore Do Not Track
My only papercut with GC so far is the need to manually create your own site code e.g.
$MY_CODE.goatcounter.com—I’d prefer if this was abstracted away as some meaningless hash string or even offered the feature of randomly generating a string e.g.
correct-horse-battery-staple. I find naming things to be hard, so given the option to simply defer that decision would be a nice improvement. I’ll reiterate this at the end, but I have the option of using a DNS CNAME record to create a “vanity” URL which bypasses the need to reference the goatcounter.com subdomain in the future.
I went back and forth on a few ideas, but eventually settled on
blog was taken, as expected.
Ideally, I was hoping to use a tracking pixel optionally wrapped in a
?p=/page-url-slug query parameter that GC wants for the tracking pixel.
localStorage keys if you opt into enabling keyboard shortcuts or persisting a specific color theme. I encourage you to read more directly at /privacy.
N.B. I don’t think there’s any compatibility problems, but I do use instant.page on this site as a way to make the overall UI/UX experience faster. And uBlock Origin blocks instant.page and GoatCounter by default which is fine—neither are required for the site to function.
Some thoughts for the future:
- Use a DNS CNAME record to create a vanity URL e.g.
- Consider self-hosting or copy-pasting the count.js script inline e.g. https://www.goatcounter.com/help/countjs-host
- Migrate more websites & projects to GC, particularly ones off of GA
- Contribute some money towards GC, probably in line with Blot, Miniflux, and Wallabag (~$20 USD annually)
I enabled unauthenticated dashboard viewing, so feel free to check out the stats at https://bl0g.goatcounter.com/.
Last modified February 4, 2024 #announcement #privacy