Guillaume Hérail

Ramblings in Frenglish

Getting some stats out of this blog

Posted on — Jan 15, 2021

Since I started the #100DaysToOffload challenge, I’ve been looking at my logs using goaccess on my terminal. It works well though I wanted to look at alternatives. One obvious solution is Matomo though it felt too complicated for my usage and maybe too intrusive for my taste.

I started looking into alternatives and stumbled upon Plausible, an opensource analytics suite that boasts itself as being GDPR compliant and privacy friendly. The metrics it tracks are simple and enough for my usecases, I decided to give it a go.

As documented here, the installation is quite easy, they provide a docker-compose file that will spawn plausible, PostgreSQL and Clickhouse. Once configured started, I only needed to reverse proxy it using Caddy:

stats.xiu.io {
    reverse_proxy localhost:8000
}

And then I could reach it via https://stats.xiu.io, I followed the assistant to setup my blog on it and added this javascript file to it:

<script async defer data-domain="xiu.io" src="https://stats.xiu.io/js/plausible.js"></script>

That’s it, the application gives me an unique visitor count with the top pages visited which is what I wanted and on top of that, I can make these public, see it for yourself here! I’m still evaluting whether to keep Plausible or go back to Goaccess (once they release a version with Caddy’s log format support), we’ll see over the next few weeks.

This is day 13/100 of #100DaysToOffLoad!