DEV Community

Cover image for GA? Matomo? Or maybe this ...
André
André

Posted on

GA? Matomo? Or maybe this ...

Which analytics should I choose? What has to be on my privacy policy page? Do I have to choose opt-in or opt-out? Is Google selling my data? Where do I put that cookie banner? Any cookie or tracking services? GPDR? BDSG? ... ... ...

brain overload

So many things to look after, all that and more just to see how many people have been visiting my site. Is it really worth it? There must be something simpler!

Table Of Contents

How it all started

Back then I needed something to check the traffic for my sites, I was rather scared about privacy issues, didn't know how much GA (Google Analytics from now on) costs, how to set it up etc etc. And to be honest, I wasn't too much of a google fan back then.

I was looking around, comparing prices and if there were on-premise solutions to keep control over the data and what not. I didn't find much out there which fit my needs until I came across Fathom.

My first own analytics server

Some years ago I rented a VPS, setup docker and installed Fathom. I was quite pleased with what I got, given that I didn't have to worry about privacy pages and cookie banners. Fathom doesn't need that.

Everything went well up until my server crashed. Not too bad right?
So I rebooted my server and then went to check if everything is up and running. I opened my analytics dashboard, just to be welcomed with the setup screen again. What?

me_irl

Time to debug the issue, back to the server

I was looking around, checking if all services were running but couldn't find any issues. Well, little did I know that I messed up with the docker configuration. I forgot to share the docker volume to my host machine and had all data inside the container. Since my containers were broken, everything was lost.

Data inside docker containers don't persist if they are not shared with the host system

I was pissed, at first I blamed fathom, how dare them to not include basic docker knowledge in their docs.... Insane!

A new service had to come

Of course they are wrong and not me, so I deleted the server and went on the hunt for a new analytics suite. After a while I came across Matomo (formerly Piwik, idk why they still include that). It looked nice, so here I went again and created a new server. I didn't use docker for this setup obviously, because at the time, docker was my enemy (yes I realized it wasn't fathoms fault but my own stupidity).

The server was running fine, there even is a third party Matomo app for iOS which I used to check my numbers. That server was running for over a year, I went through all my sites added privacy policies, added cookie banners and what not was necessary to be as much compliant as possible. All data was anonymized and deleted after 180 days. Seemed fine to me. Up until I got fed up baby sitting servers.

The self-hosted server purge

Don't get me wrong, I still love self-hosted and open source solutions. But let me tell you, it gets quite tiring after you have to maintain +10 servers. At some point I simply didn't want to look after all my servers anymore, so I began to look for cloud/hosted services to replace anything I had hosted myself. I went from my own hosted instance of Gitlab to Github, replaced Rocket.chat with Discord, mailcow with gmail and many other services at the same time.

So what happened to Matomo then? Time to use Google Analytics as there is nothing left? Luckily, I came across a fathom tweet

This made me check their prices again. I guess they changed since back then and compared to my time watching my own servers, this was the best deal I could find personally.

Back to the roots

So I went ahead, created a new account, payed for a year sub and started to migrate all my sites back to fathom yet again. But this time, using their hosted solution. It didn't take me long to port my sites over and I already saw traffic coming in. Cool. They added quite some new stuff since the last time I have used them which were a surprise. Oh speaking of which, they are adding simple website monitoring with free notifications to mail, sms and slack this Friday.

There are many solutions for tracking page traffic, find some below. I will update the post with your comments if I am missing something that should be added here. Maybe in a year or two I will continue this journey by replacing fathom with yet something new (I doubt it though, really happy right now).

TLDR; Give me the good stuff

Fathom

Both free and hosted solution, privacy compliant, no need to have a cookie banned or privacy policy for analytics. Perfect if you want an easy and simple solution without much hassle. Here is my personal referral link for fathom. Would be cool if you help me out! https://usefathom.com/ref/MQYHPK You get $10 off.

Matomo

Both self-hosted and cloud solution, GPDR Manager, automatic deletion of data, anonymized tracking, offers opt-in and opt-out. The best tracking solution if you want to self host your analytics and still be privacy compliant. Matomo

Cloudflare

Free pure traffic tracking, no need to have a cookie banned or privacy policy for analytics. Simply use Cloudflare as your DNS to get pure hits without a page breakdown. Probably the easiest setup but for the price of less detailed stats.
Cloudflare

Simple Analytics

Just going to link it here, similar to fathom Simple Analytics

Google Analytics

Idk, I am still not there - comment below and I will update this. I'll leave you with this 🤷
From Google's policy:

The information we collect includes unique identifiers, browser type and settings, device type and settings, operating system, mobile network information including carrier name and phone number, and application version number [...], your apps, browsers, and devices with our services, including IP address, crash reports, system activity, and the date, time, and referrer URL of your request.

Where did I host you may ask?

Mostly at Hetzner and Contabo

Top comments (1)

Collapse
 
raventheonlyone profile image
GloriousRaven

Thanks for this post, I was looking for an alternative to GA, I already know Matomo but I’ll look at Fathom in details. Thx! ✌️