Fathom: An Open Source Google Analytics Alternative

twitter logo github logo ・1 min read

Hey everyone!

I star all kinds of crazy GitHub repos and last week I stumbled on an awesome project that I can't believe I missed for so long.

It's called Fathom -- and it's an open source alternative to Google Analytics (somewhat ironically written in Go).

GitHub logo usefathom / fathom

Fathom. Simple, privacy-focused website analytics. Built with Golang & Preact.

Fathom - simple website analytics (Community Edition)

Donate Go Report Card MIT licensed

Fathom Analytics is a simpler and more privacy-focused alternative to Google Analytics.

Collecting information on the internet is important, but it’s broken. We’ve become complacent in trading information for free access to web services, and then complaining when those web services do crappy things with that data.

The problem is this: if we aren’t paying for the product, we are the product.

Google Analytics may give you free access to their services but in turn, they’re assembling data profiles on your website visitors, which they can then use for better targeting of advertisements across their network.

We need to stop giving away our data and our users' privacy for free access to a tool.

Fathom respects the privacy of your users and does not collect any personally identifiable information. All while giving you the information you need about your site, so you…

If you're interested in analytics or data (or just the Go programming language) this is an awesome project to get involved in!

twitter logo DISCUSS (20)
markdown guide

Nobody is able to analyze webserver's logs anymore?

Why you have to put a JS script in your pages?


It's hard to analyze more than page views using only webserver logs. I might be interested in some specific user behavior (e.g. how much times he clicked this button, etc.). That's why we have to put a js script.


You don't need js for that, a querystring is enough.

Let's have a simple case. How are you going to analyze how much times a user clicked a button? I don't want to reload the page on each click (to send a GET request) and AFAIK there's no way to do that without JS. And if I can use JS for that case, why would I want to do that if I can simply myTracker.send({'action': 'my-button.click', ...})?

It's quite obvious that if you are using JS anyway, a little more bloat doesn't change much.

However there is often no reason to use JS and plenty of reasons to NOT execute third party's code on your users' machines if you care about your users' privacy and security.

If that button does anything relevant, it's going to leave evidences on your server anyway. Theoretically, we don't really need JS to reload a subset of a page on a button click: HTML and CSS are enough, with proper uses of IFRAME.

However you are right that, if you are using JS anyway, a bit more bloat doesn't change much.

The point is that we shouldn't use JS just because it exists, but only if there's something we cannot really do otherwise. Forcing our users to execute code we didn't write and we don't feel responsible for is rude: we are wasting their resources (and potentially compromising their security) just to save some money.


I don't think you understand what Google Analytics is.

Web server logs wont help me understand the age and gender of my audience. GA does.

Google analytics allows me to easily export reports and view metrics graphically.

Teams within my business use the conversation tracking tools to measure where different parts of our site drive the most sales.

GA is used for more than simply tracking hits on a page.



I understand very well what Google Analytics does.

You CAN get much of the same insight from properly configured server logs on a properly designed website.

GA build good reports on top of data collected through JS, but you could build similar reports by yourself and people used to do that sort of analytics before it.

The problem is that website owners sell their visitors' data for such reporting.

So it's way cheaper to them than a good team of developers and data analysts.

Everybody is fine... except milking cows users.


I can't remember the last time I was truly interested in insight and had an app on a single server, non-loadbalanced and so on. A distributed system is a pain in terms of log scraping if you don't have the adequate tooling (ELK, Graphite,...). Some JS-include may be a less costly solution.


It obviously depends on how you design the web site / web application.

JS-includes are cheaper for developers, but expensive (in term of both security and computing resources) for users.


So what about putting some JS for our browsers to execute? This is not the 90's web.


This is not the 90's web.


After the crash of 2000 we have slowly turned a dream to a nightmare.

And after Cambridge Analytica, after Snowden and after event-stream, I wonder how we can still argue that it's all fine.

We are abusing users' ignorance.


Analytics are useful for generated static sites (jekyll, hugo, ...) hosted on gitlab or github.
Otherwise, I agree that embedding a JS that sends requests just to compute stats is kinda weird.


There is also Matomo which has been there for a while now and is very active!

matomo-org / matomo

Liberating Web Analytics. Star us on Github? +1. Matomo is the leading open alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites, apps & the IoT and visualise this data and extract insights. Privacy is built-in. We love Pull Requests!

Matomo (formerly Piwik) - matomo.org

Latest Stable Version Latest Unstable Version License

Code Status

Build Status Percentage of issues still open


Matomo is the leading Free/Libre open analytics platform.

Matomo is a full featured PHP MySQL software program that you download and install on your own webserver At the end of the five minute installation process, you will be given a JavaScript code Simply copy and paste this tag on websites you wish to track and access your analytics reports in real time.

Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in!

Mission Statement

« To create, as a community, the leading international open source digital analytics platform, that gives every user full control of their data. »

Or in short:

« Liberate Web Analytics »


Matomo is released under the GPL v3 (or later) license, see misc/gpl-3.0.txt


  • PHP 5.5.9 or greater
  • MySQL version 5.5 or greater…

I was going to ask how this compared to Piwik (which has been around since the dinosaurs roamed the Earth) but I see Matomo is Piwik now :)


since the dinosaurs... hahah... i was thinking about the same thing


Matomo is the default choice for "self hosted Google analytics alternative" still a new project is always welcome


Paul Jarvis is one of the team behind Fathom so been meaning to check it out. His recent book Company Of One is worth a read for anyone interested in the bootstrapping/self-employed/small biz world. Worth joining his mailing list too as he's a very good writer.

(Note: I am not a Paul Jarvis shill, just an appreciator of his work).

Classic DEV Post from Mar 9

What’s an unpopular software opinion you have?

Please share! ...

Jacob Herrington profile image
Host of devpath.fm | Solidus Core Team Member | Senior Software Engineer | Sometimes a blogger at https://jh.codes
profile pic

Don't be a stranger

Create your DEV Profile