This post includes affiliate links. Register with Fathom and get $10 off of your first invoice.
I recently replaced Google Analytics (GA) on my blog with Fathom Analytics, a simple, privacy-focused alternative to GA. It doesn't use cookies to track users, you can bypass ad-blockers with custom domains, and the dashboard has all the info you really need for a simple blog.
![Fathom Analytics](/sites/default/files/styles/large/public/2020-05/fathom-analytics_ss.png?itok=wTvLlzy4)
Since my blog is built on Drupal I thought it would be cool to build a module where you can enter your Site ID and the Fathom script magically appears on your page. I also added an option to add a custom domain, and to exclude (or include) certain paths and roles from tracking.
![Fathom Analytics for Drupal 8 (and 9)](/sites/default/files/styles/large/public/2020-05/screencapture-tinamrak-admin-config-system-fathom-analytics-2020-05-18-19_47_24.png?itok=UGJtn7T5)
You can get it here, or via command line (if you installed your Drupal site with composer):
composer require drupal/fathom_analytics
drush en fathom_analytics
Did you find this article useful?
Buy me a coffee.
Do you have a web development problem you cannot seem to be able to solve?
Send me an email or reach out to me on Twitter.