Trying Out GoatCounter
Published
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.
Why?
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
- https://matomo.org/
- http://www.openwebanalytics.com/
- https://plausible.io/
- https://github.com/milesmcc/shynet
- https://umami.is/
- https://www.goatcounter.com/
- https://usefathom.com/
- https://count.ly/
- https://counter.dev/
- https://heapanalytics.com/
- (looks like this has been acquired and now lives at https://www.heap.io/)
- https://clicky.com/
- https://www.simpleanalytics.com/
- https://www.cloudflare.com/web-analytics/
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:
- https://posthog.com/
- recent within the past couple years
- https://requestmetrics.com/
- local company by the great folks behind https://trackjs.com/
How?
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 bl0g
as blog
was taken, as expected.
Ideally, I was hoping to use a tracking pixel optionally wrapped in a <noscript>
tag to keep this totally out of the client JavaScript. Unfortunately, Blot has no way to template in the request URL path to properly set the ?p=/page-url-slug
query parameter that GC wants for the tracking pixel.
Lastly, I’ve opted to create a privacy policy page which essentially outlines the privacy policies for Blot & GC, respectively. Plus, I set some browser 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.
Next?
Some thoughts for the future:
- Use a DNS CNAME record to create a vanity URL e.g.
stats
subdomain - 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/.
I love hearing from readers so please feel free to reach out.
Reply via email • Subscribe via RSS or email
Last modified #announcement #privacy