HACKER Q&A
📣 TekMol

Good open source alternatives to Google Analytics?


Are there good alternatives for Google Analytics which you can easily host yourself?


  👤 Jugurtha Accepted Answer ✓
PostHog: https://github.com/PostHog/posthog if you want to deploy it yourself and https://posthog.com if you want the SaaS.

I was using Avodocs (https://www.avodocs.com) to produce a privacy policy for our MLOps platform, https://iko.ai, but they didn't have PostHog in the list for the "Analytics" section, and they assumed that doing analytics implied sending user data to a third party site or something.

I tweeted at them and they were lightning fast in reaching out and adding PostHog to the options of the the privacy policy template. It's really cool: https://twitter.com/jugurthahadjar/status/144733750656389120...


👤 benhoyt
I wrote two articles about this for LWN last year. Several of them are self-hostable. Summary:

https://lwn.net/Articles/822568/: lightweight options: GoatCounter and Plausible (open source), Simple Analytics and Fathom (closed)

https://lwn.net/Articles/824294/: more alternatives: Matomo and Open Web Analytics (fairly heavyweight but both open source), Countly (open core), Snowplow Analytics (open source but enterprise roll-your-own product), GoAccess (open source; analyzes web server logs)


👤 ggoo
I use plausible for my very low traffic side project, mostly because it's easy to host yourself and free if you do so.

https://github.com/plausible/analytics


👤 robin_reala
The standard recommendation is https://matomo.org/. I’ve used it in production once (when it was called Piwik) and it seemed reasonable, but I’m not sure how it stacks up right now.

👤 drchaim
As I predicted around 2018, most or all analytics/events products will eventually move to ClickHouse or related technology (forks).

Plausible: ClickHouse

PostHog: ClickHouse

Panbelbear: Clickhouse

https://pirsch.io/: ClickHouse.

PD: I should have a blog or something where I put this predicts :)



👤 XCSme
I have been building a self-hosted analytics platform[0] (note that it's not free or open-source, just partially source-available) that is focused on the ease of self-hosting. It is most similar to Matomo but with a better performance, simpler UI and with features that they only provide in their paid plans.

I used simple technologies (MySQL/PHP) for performance and portability reasons and, compared to other self-hosted alternatives, it provides features that you can only find on expensive SaaS product-analytics platforms (heatmaps,session recordings,ab tests, etc.).

Let me know if you have any questions about UXWizz or self-hosting in general.

[0]: https://www.uxwizz.com/


👤 anthelios
https://panelbear.com/ isn’t open source but privacy friendly. I found it on HN (the founder is on here), can’t speak more highly of it. If you are tracking more than one site and want to get a good overview I recommend it.

👤 moritzruth
I'm using https://umami.is for 5 sites. I also tried https://ackee.electerious.com/ but didn't like it.

Now I would probably try https://plausible.io/


👤 kyrra
While not focused on OSS, this was asked 20 days ago at https://news.ycombinator.com/item?id=29662859 as "Ask HN: Best alternatives to Google Analytics in 2021?". It listed some OSS versions there.

👤 IceWreck
I use umami. Its lightweight and doesnt have too many dependencies.

https://umami.is/docs/features

There is also goatcounter with a slightly uglier UI but it does its job well and consumes even less RAM than umami


👤 dewey
Another vote for Plausible, I pay for the hosted version as I like to support their way of doing things but I know people who self-host it and it's not hard to do.

👤 pieterhg
https://simpleanalytics.com is what I use on all my sites and I love it


👤 bcl
https://goaccess.io/ is nice, analyzes the logfiles instead of requiring it be added to the pages.

👤 tyingq
Using a middle-man proxy for GA is an interesting idea I've seen. GA can take input from the backend, rather than the frontend, if you wish. So you could do some tokenizing/removal/etc of sensitive data, like IP addresses, but still use GA for it's reporting strengths.

Edit: The GA api does allow for things like overriding the geolocation such that if you aren't sending the IP address, there's still relevant geo data to report on.


👤 shafyy
I have an indie project called Fugu (https://fugu.lol). Fugu is an open-source (https://github.com/shafy/fugu) and privacy-friendly product analytics. If you're looking strictly for web analytics, it might not be a good fit.

It's still an early version, but basic things like tracking events with properties, and analzying those, work very well. I'm currently working on adding conversion funnels. It's free to self-host, and I provide a managed version for $9/month flat.

I've started Fugu because I wanted a product analytics software that is privacy-first (e.g., no possibility of tracking unique users), open-source and simple. I liked using PostHog but it got too fancy, complex and convoluted for my taste - a common theme among analytics software in my experience.

If you're looking for a pure web analytics solution, I can absolutely recommend Plausible (https://plausible.io). I also use it for my static page at Fugu.

Edit: Added GitHub repo link.


👤 aspenmayer
Snowplow, also open source, has a comparison of a bunch of other open source analytics products for different functions:

https://snowplowanalytics.com/blog/2021/01/05/the-top-14-ope...


👤 franky47
I've made an end-to-end encrypted web analytics SaaS. No need to host it yourself, your data is visible only by you.

Partially open-source at https://github.com/chiffre-io, with the aim of publishing it all in Q1 2022.

https://chiffre.io


👤 juriansluiman
As stated by others already, there's Plausible (plausible.io) and Matomo (matomo.org).

I have used both and stuck at Plausible. A few reasons (subjective):

1. Plausible is GDPR compliant by default, it has an effective way to measure analytics throughout the day without cookies

2. It is simple and that's key. I don't need to know much, Plausible just gives me that

3. It's fairly lightweight. Matomo is quite heavy and as my VPS'es are pretty much scaled down, less is just more

4. The Plausible self-hosting doc is centered around Docker, which is the architecture I use myself and is set up in literally a few minutes


👤 culi
The most popular on alternativeto.net are: Matomo, Plausible, GoAccess, Open Web Analytics, GoatCounter, etc

https://alternativeto.net/software/google-analytics/


👤 waspight
I find it a bit frustrating that most analytics tools does not have support for sending events through api calls. Like in mixpanel where it is possible to send events from backend rather than embedding a js on frontend. Why is it so?

👤 topherPedersen
Posthog! You can host the analytics yourself or let them host it for you.

👤 rambambram
I had to ask myself this question some time ago. I decided to build it myself instead. Starting point being the principle that Simple Analytics explained in their blogpost some time ago: if referrer is from the same site, then it's just a visit, otherwise it's a unique visitor. I mixed in some more browser details, also used some blacklist of known bots, and now it's functioning pretty accurately. I don't have the tracking that GA does, but that was exactly the point.

👤 pixelbath
I finally made the switch from GA to Open Web Analytics. I'm already fairly experienced with PHP, which I considered a point in its favor, but I honestly haven't had to do anything with it other than copying it to a server and configuring a few basic settings.

The tracking code seems very lightweight, and I haven't found it lacking any of the features I was using in GA. I've tried a few, and OWA was the first that met all my criteria (100% free software, open source, actually works).


👤 lbrito
Shameless plug: I wrote a log-based analytics software that you can self-host on an Android phone.

https://github.com/lbrito1/android-analytics

Blog post: https://lbrito1.github.io/blog/2020/07/replacing_google_anal...



👤 pqvst
I've slowly been migrating everything to self-hosted Umami, and wrote this overview and setup guide a while back: https://pqvst.com/2021/07/26/self-hosted-analytics-with-umam...

👤 epoch_100
Shynet: https://github.com/milesmcc/shynet

The goal is to provide modern, privacy-friendly, and detailed web analytics that works without cookies or JS. And it's completely open source.

Full disclosure: I am the primary maintainer.



👤 waspight
Why are most tools for analytics so expensive? Compared to other saas products I find them to be at least. Is there a significant amount of traffic that is the reason? I was thinking about implementing something myself once, but was worried about the cost of receiving all the event traffic.

👤 magamig


👤 mkozak
I'm using Ackee (https://github.com/electerious/Ackee) - it doest everything I need it to, you can self-host it and it's quite fast

👤 taubek
We used to use Piwik (https://piwik.com/). It is now called Matomo (https://matomo.org/).

👤 jorislacance
https://ackee.electerious.com/ Dead simple to use & to self host, respect privacy of your visitors. Not yet blocked by uBlock Origin BTW

👤 papaplitty
Is there a good reason not to use GA for client side analytics? Is the juice worth the squeeze for a self-hosted/ FOSS solution?

Obvy client side isn't as 100% as looking at the logs, but I've worked with Adobe Analytics and GA (on the free plan) for a few years. UI in GA is much more intuitive to me than Adobe, and I use the tight integration with Google Datastudio pretty often to make reports or slide decks.

Personally I like the well documented GA API to run reports against + python and R API wrappers. For me the only downside is the level of sampling they use. With Adobe Analytics, the API is not as well documented, but they don't sample like GA, but also I wouldn't want to front the Adobe Analytics bill every month for my side projects.


👤 donaldparkerii
I really liked RudderStack for gathering the data, also has some extra nice features for pushing upstream to other providers. Apache Superset for building the dashboards to display the data.

👤 rafadc
I think nobody mentioned Ackee https://ackee.electerious.com/

It is cookieless and that makes it really interesting


👤 tlhunter
I use Countly for all my websites and mobile apps, self hosted: https://github.com/Countly

👤 pea
PostHog is the gold standard here. The feature-set goes far beyond GA and essentially replaces a lot of the other tools you may end up needing (FullStory, Amplitude, etc.)

👤 marvinblum
Pirsch Analytics: https://pirsch.io

Only the core (golang) is open-source though, so you won't get the dashboard.


👤 nodamage
Of the answers posted here I am curious if any of them are suitable for mobile (iOS/Android) or desktop (Mac/Windows) apps, or if they are all web-oriented?

👤 spreeker
https://www.goatcounter.com/ simple effective visitor counting with a fast golang / postgress solution. easy javascript solution to count actions on a page. GDPR compliant! Just looks a bit spartan.

👤 Giorgi
as a side note - is there something that does not require to install shitload of unnecessary software, databases and services? Let's say simple PHP+MySQL

👤 pabs3
The best alternative is to server side aggregation of visit statistics without storing any info sent by visitors (such as IP address, user agent etc).

👤 tobilg
If you’re running on AWS, you could have a look at https://ownstats.com

👤 santamex
For questions like this I always consult:

https://alternativeto.net/


👤 kokizzu2

👤 timmit
I used umami, an open source one, it used to be release frequently.

and I amde some contribution to containalize it


👤 pictur

👤 jvanderbot
Plausible.io is my favorite. Cheap, self-hostable. Really stellar support.

👤 mrwnmonm
Adblockers block all of those services, right?

👤 nle
Check out Umami (https://umami.is/). Should be GDPR compliant. Not as advanced as Google Analytics, but it has pretty good features.

👤 fossdd
It's probably not the answer you want to hear, but don't use any analytics platforms. Let users be completly anonymous. :)

👤 denysvitali
Plausible, Matomo