Simple web analytics to track blog traffic

Having officially “relaunched” this blog (i.e. I tweeted), I wanted to be able to see some basic analytics. Nothing fancy, just page views, top pages, referrers and the like, to get a sense of readership and how people find me.

I've come across a handful of good, privacy-focused, hosted options in the past year or so:

But I wanted to see what self-hosted options were out there (for potential cost savings, and also just developer curiosity). I found these:

They're pretty similar: clean, simple analytics tools that are easy to deploy and tracking code that “just works”. I opted for Umami, as it already supports event tracking (in case I ever care), has a bit better UI (in my opinion), and also uses Postgres (instead of Mongo) which I'm more familiar with.

I opted to host it on Heroku (since I already use it and am pretty familiar with it). There's documentation on deploying there, but I took this a step further and built a “Deploy with Heroku” button to automate the launch.

Got it running, added tracking code to, and voilà ✨