After having my blog up and running there was one piece missing, I didn't have any kind of tracking so it was impossible to know if people were reading me and what were they reading.
That's how I started to look for a solution that matched the next requirements:
Looks impossible, doesn't it?
That's what I thought after some research. I saw lot's of options, the most commonly used was Google Analytics but that was far from what I wanted. When I was about to lose hope I found Fathom and suddenly all the checks were marked:
Spoiler: Using their official docker image wasn't easy.
I went to my beautiful portainer client ready to install Fathom from the official image and after a few seconds, it was running. It was running but how do I configure it? Is there any shared volume I can use? Nothing... I couldn't make the official image work. I went back to docker hub and I found another image, not official in this case but it had the missing part I needed: a volume.
This image was geerlingguy/fathom and again, in a few seconds, I had it working in portainer. I created a new shared volume (check my post about portainer to read about that) and there started those tricky parts you spend hours searching on google because you don't know how to fix. But don't worry, I have all of them ready for you:
FATHOM_SERVER_ADDR=9000
FATHOM_GZIP=true
FATHOM_DEBUG=true
FATHOM_DATABASE_DRIVER="sqlite3"
FATHOM_DATABASE_NAME="fathom.db"
FATHOM_SECRET="create-a-random-key-and-paste-it-here"
fathom user add --email="[email protected]" --password="strong-password"
Once you have done this things your fathom instance should be up, running and accessible. You'll need the service to be accessible from the outside, I recommend using Caddy so you get the proxy and the SSL for free.
The last part is adding the code snippet Fathom requires. You'll find it on your Fathom configuration (from the web UI).
Once you have set up the snipper you'll start receiving metrics on your dashboard free and without compromising your users' privacy.