While writing posts to a blog, one sometimes wonders if there is anybody reading them. I’m no different and I’ve tried various solutions, starting from Google Analytics, then trying Matomo (back then it was Piwik). While my blogging platform was Drupal, I noticed that I couldn’t get visitor count anymore. I think it had kind of demoralizing effect, since increasing visitor count gives you an adrenaline boost, even if the visitors are bots.

After switching to Hugo I tried to get statistics working right away but I quickly realized that it wasn’t as easy as I thought it would be. I tried many different Hugo themes to see, if they supported self-hosted analytics tools. The term analytics tools is a bit of an exaggeration. I only want to know, if someone visits the blog and that’s it. I only need one number.

I was able to narrow my selection for statistics software to a handful of options. AWStats works locally by parsing the logs. But I couldn’t get it to work with Hugo. I also tried Open Web Analytics but it had too many bells and whistles that didn’t need. Situation was the same with Matomo. Then there was Plausible that describes itself as “easy to use and privacy-friendly Google Analytics alternative”. It had great features, but I had some difficulties with installing it on ARM Kubernetes cluster. Apparently it is work in progress but of course I wanted it working yesterday, so I continued my search.

The winning combination was after all hugo-coder theme and GoatCounter. The former has builtin support for the latter. The installation was smooth for both components. Most of the work came from changing the front matter metadata to correct format for the new theme. But I think it was worth it! It is so satisfying to see that there is one visitor every now and then and maybe even a human visitor once a year!