Ask HN: Best alternatives to Google Analytics in 2021?

192 points by nyellin ↗ HN
I don't like the new GA interface. It's hard to do simple things like display full-urls when you serve multiple subdomains.

What alternatives do you like and why?

128 comments

[ 0.24 ms ] story [ 185 ms ] thread
posthog

* it's open source

* you can self host as a docker container

* you can log from the client side or from the server side

* awesome founders with HN accounts :P

I thought Posthog was more of a Mixpanel competitor. Is it appropriate for aggregate data about anonymous users and referral/flow analysis too?
I'm actually interesting in this as well. I've noticed watching the HTTP logs for my small site, I have traffic on it (it auto-polls my server every 60 seconds to report updated status), but none of those show up as "active" users in Google Analytics. I'm guessing uBlock Origin blocking GA by default is a likely cause.
What do the user agent strings look like? It is possible you are seeing bots.
Documentation Insights by Scarf

* Simple dashboard

* Displays which:

  * businesses are visiting your documentation pages.

  * locales they are coming from (geolocation data in aggregate).

  * pages are most frequently visited.
https://about.scarf.sh/documentation-insights

Edit: formatting

Clearly Pirsch Analytics!

https://pirsch.io/

No cookies, open-source core, GDPR compliant, nice UI, and an extensive API.

Wow Pirsch looks incredible, will definitely use them for my blog and projects.
At ekademy.eu we use plausible.
Depending on your needs Simple Analytics or none.
I'm currently using Cloudflare and their SDK+API to pull logs, which I then push into Loki. I then use Grafana to render the dashboards I want.

This isn't for everyone, I'm super comfortable doing this because of familiarity with all the components. But there's no out of the box dashboard for this so you have to replicate the UI parts you value. At least with Grafana once done you're in control of it and you own it.

I prefer server logs from the edge for their completeness. There are things missing... I.e. client side knowledge of screen sizes and device types. But server logs are so much more complete than client side JavaScript from third parties that are frequently adblocked.

Is there some blog article on how to do that? Would be interested in trying it out.
How do you exclude bot traffic?
You can use this LogQL operator !~ (regex does not match) to exclude strings.
I just switched from GA to Matomo[0] and have a good impression so far.

Seems similar to Pirsch in terms of cookie less tracking, GDPR / DSGVO compliance, being open source, self-hostable, having a decent UI and API.

[0] https://matomo.org/matomo-on-premise/

I second Matomo. Easy to set-up and update and has an optional no-cookies (and thus no cookie banners) mode. I’m using it for my private sites, but have also used it professionally in the past.
GA is awful, always was. I got tired of it and started using splitbee.io
Thanks for pointing this out. It's the first free analytics service for personal blogs, websites I've seen recently. The rest is subscription based and useful for revenue-generating businesses.

The author seems to have the same itch when went to create this product: https://www.goatcounter.com/why

I found this 'pay what you want' alternative in my bookmarks: https://counter.dev/
Our approach is to be free and sustainable by radically cutting down hosting costs. Most technical solutions are mentioned in the Github page. Apart from this honestly the product is well polished and easy to use. Check it out :-)
Goatcounter is exactly what I need, nothing more, nothing less.
I've been very happy with goatcounter on my personal site for 2 years now
If you're looking for web analytics, I love and can recommend Plausible (https://plausible.io/). It's both simple and privacy-friendly.

Inspired by Plausible, I recently launched Fugu (https://fugu.lol). Fugu is a simple and privacy-friendly product analytics tool. It offers only event-based tracking, so it's better suited for web or mobile apps and not web sites (go for Plausible for websites). Fugu doesn't track unique users or any personally identifiable information. It's pretty basic for now, but I'm working on adding conversion funnels next (I work on it in my free time).

Fugu is open-source[0] and self-hostable. I make money by providing a managed version for $9/month.

0: https://github.com/shafy/fugu

This is a really cool thing to work on in your free time! Thanks for sharing. Also, +1 to plausible for simple website analytics.
I use Plausible on https://allaboutberlin.com, mainly for privacy and UX reasons (no cookie notice).

It's good, but it doesn't replace Google Analytics at all. It tracks visits and events, but not navigation and user flow. It's severely lacking in detail compared to Analytics. It's a compromise, not a drop-in replacement.

However, it's excellent as a simple tracker for average website admins. I'm very happy with it. The maintainers have been nothing short of stellar with their support and transparency.

Cool! Your website looks great. I also live in Berlin! Give Fugu a spin if you want to track conversion funnels (coming soon) and event properties.
Wow, this is a fantastic site. I definitely plan on visiting Berlin at some point and I'll use it.
Wow, amazing site! Wish I knew about it earlier!
I too wanted to preserve privacy and avoid a cookie banner for my blog. I ended up rolling a privacy preserving proxy via Cloudflare workers that forwards `pageview` events to Google Analytics. It's a single HTML tag to drop in and preserves the navigation and user flow reports on the GA side.

See https://github.com/rraval/zeroindexed/tree/master/packages/t...

The blog explains expanded motivation: https://zeroindexed.com/privacy

(comment deleted)
I love how clean clear and concise this site is! More sites should be like this! Great work!
I would not recommend Plausible (well, their commercial offering anyway). I had a bad run-in with them recently. Their site would not log data from my web site at all (their Javascript just threw an error in the console and would not execute). I filed a ticket. They brushed it off and said they'd had a brief look and couldn't figure it out, and basically tough shit, and told me to just download their open source version and install it locally.

What annoyed me was that if it's not logging on my site, how many other sites is it under-reporting for? YOU DON'T KNOW WHAT YOU DON'T KNOW. And the fact they weren't willing to give it any serious thought at all. This is bad for an analytics company.

I tried (begrudgingly) and put Google Analytics behemoth of Javascript on my site and it worked perfectly, so I knew it was a bug in their system, not mine.

At that point I decided to try and figure it out so I fired up a proxy and sat there for a couple of hours going back and forth until I did figure it out myself. The bug is in their web server configuration really, not in the actually logging Javascript. Now, it might have been unethical of me, I don't know, but I felt since I'd spent a ton of my time to figure out a serious bug in their product it would be nice if they would throw me a year's free subscription. I felt that was fair compensation. They said no way, don't worry about, basically "I'm sure we'll figure it out ourselves in the future one day, don't call us."

So at that point I decided screw it, I can see they don't care about their customers and product, so I'm looking for alternatives that aren't GA.

That's my 2 cents. Your mileage may vary.

tl;dr: Be aware their product has a bug which causes it to not log data in certain circumstances (the script won't execute) and therefore if you are using their commercial product you might not be seeing all your visitors.

That sucks that you had a bad experience with Plausible. I've never had any problems, and interactions with them on Twitter have always been very friendly and helpful.

Now, of course, products have bugs and once you have thousands of users there will be edge cases if it not working. Obviously, they should have handled the interaction with you differently.

Out of interest, can you expand more on when the bug occurs? Btw, if you have a fix for it, you can also create a PR.

I can't create a PR as the bug is with their server configuration. I don't think there is anything wrong with their code, per se. I think if I installed it locally it would work fine.

It is a real shame. I went to Plausible because they had posted on here, and I'm all for supporting people that show up on HN and seem to be decent human beings. They did not reply to my Tweet to them, I only got support through e-mail, which they weren't that quick about. I'm bummed because the software seemed to be what I wanted, but they've lost my trust now.

Oh I see. Again, I'm sorry that you had this experience. Hopefully they read this and can make it up to you somehow.
Curious - so what was the problem with their server configuration?
What's weird is that your comment here caused some sort of weird bug in HN that I've not seen before (no reply button): https://kingcharles.one/weird-hn-bug.png

@dang - any ideas on this one?

The issue with Plausible's server: I didn't want to put it out there because then they get the fix for their commercial product for free after I spent the time doing all the work for them, but I feel like the same bug might actually exist all over the Web, so I'm going to write it up and post it online.

I think HN somehow limit the pace of answers in fast threads to let people the time to think before they post (so the reply button appears with a bit of delay)
If you really must blow through the delay, click on the timestamp of the post you want to reply to and the reply box will show there.
That's what I did to reply, but I've never seen one person's reply link missing when all the others are visible.
> The issue with Plausible's server: I didn't want to put it out there because then they get the fix for their commercial product for free after I spent the time doing all the work for them, but I feel like the same bug might actually exist all over the Web, so I'm going to write it up and post it online.

Yeah, no. So far, you only say there's a bug in their server configuration that prevents logging in some cases. I self host plausible and I'd be very much interested in what misconfiguration I could have triggered.

Is it a TCP pool connection problem ? A pre-flight request thing ? Wrong CORS headers ?

On one hand you could be doing FUD, on the other there is a gunfoot problem that could impact self hosters but the knowledge doesn't come out.

I suppose it's a problem that can be pinpoint from the outside, without knowing the proxy stack running at plausible so it should be observable with HTTP sniffer/wireshark.

Why would that user create a PR to help a for-profit company they don't have a good relationship with? Why would anyone what to help a group that disrespected you?
And I would have happily created a PR for their open source version that they generously give away for free, but the bug is in their web server configuration for their hosted product, so they need to put the fix in.

I didn't feel I was being unreasonable asking for free use of their product for a year (after which I would obviously have to pay), for a web app I am writing which currently has practically zero traffic. As bug bounties go, it wasn't a bad deal I thought.

Does Fugu have a free trial period? I would need to test it actually works at all before I start paying for it. Plausible, fortunately, has a free trial on their commercial product, so I could figure out instantly that their system is broken. I would have hated to pay money only to find it had a terminal bug and they wouldn't fix it.

Basically, I'd like a couple of days grace before having to pay for it, so I could install it on my app and see if it even works.

The reason I wouldn't install Fugu locally (or Plausible locally) is that I don't want a whole different deployment channel to support. Likely your code needs a different web server or framework than the rest of my stuff, and that is a lot of setup, installation and support. But I do like that the option exists and that I can see the code.

Yes it does have an infinite free trial period :-) You can track events in test mode without having a subscription. Test mode events are auto-deleted after 14 days. Creating an accounting doesn't require a credit card.
OK. PLEASE PLEASE PLEASE put that at the very top of your site somewhere. It doesn't say that anywhere that I can see. It just tells me I can self-host for free, or pay $9/month. I clicked off the site because of that, even though the product looked cool.

Let people clearly know they can test drive it for free to see if it works.

EDIT: OK, I see it says that once I click GET STARTED, but that's too late, because I never clicked that button because I didn't want to pay $9 to find out if it worked. You need to make it really clear on the front page.

Also, put a "Sign-up" button next to Sign-In in the top-right corner. That was the first place I looked to try to create an account - I didn't go straight for the GET STARTED button.

Thanks for the feedback! Makes sense, will update it!
I second Plausible. Have been using it close to a year now. Very happy about it. It is probably not as feature rich as GA, but who needs those features, right. On the other hand they are adding new things everyday, but they focus on what users want.
I second Plausible but to everyone looking to self-host it, be aware: It’s AGPL licensed! From what I have seen it seems that they only want to discourage direct competitors but an APGL license is an APGL license and that’s a deal breaker for many commercial projects. Older version were licensed under the MIT license iirc so might be an option for some.

Ofc you can always support them and use their cloud hosting solution without any of these problems. I just wish they their pricing was fairer.. Their plans start at 6€ for 10k monthly page views - for that price you could run your own VPS capable of handling literally millions of requests.

Agpl matters if you modify the code, not if you only tun it as a separate service.
IANAL but isn't using the JS snippet a "combined work"?
Analytics solution that support to Mobile platforms(Android, iOS) too? There is Matomo as I know, what else out there? Aggregating things over platform is hassle when using different services for different platforms.
If you use Fugu, it's simple to unify since you track your events by calling the Fugu API. Of course, it takes a bit (not too much) longer to set it up than just slapping a script in there, but it enables you more granular control of what you're tracking.
Why is plausible even a replacement for an analytics app? It's just a counter. What can you analyze using plausible?

User journey, heatmap, filter by users that took several events?

https://umami.is/ discovered this, some of my friends use it and it's pretty decent.
i've been using this for a few months now. super easy to get set up and run yourself!
+1 for Umami. Pretty straightforward to setup and run.
Another happy user here. Easy to set up, never have any problems.
+1 for umami here too. I have been using it for https://mailsnag.com. It has event tracking feature that I'm looking forward to use.
Fathom is a simple analytics product.

It can track page views and events, the script is fairly small, is GDPR compliant, and gets out of your way.

https://usefathom.com

Thanks so much for supporting us. We have spent so much money on getting our compliance right :)

A lot of companies claim to be GDPR compliant, and they’re not. We’ll be blogging more about this in the future as we don’t like folks being lied to.

(comment deleted)
Why do it client side instead of just logging it server side? Preferably async.
I think this a really good approach. We've done something similar by exposing an endpoint and just PUT data to it from the client when something interesting happens. This works really well and the server is free to do whatever with it.
I use the Query Explorer exclusively in place of the GA interface:

https://ga-dev-tools.web.app/query-explorer/

Dead simple to create the queries I want and then copy/paste into a spreadsheet.

You can also use the query URLs with the access token to easily get data into Jupyter Notebooks or whatever else you want to use for deeper analysis.

My needs are pretty simple, but I just do server-side logging in a Django Middleware. I wanted to use a tracking cookie to track a user across the site, but I had a hell of a time trying to figure out whether that violated the GDPR, so I just log the user agent instead.

What really is the major gain to a big third party analytics platform when you really just need to know how somebody moves through your site, what the hot and cold paths are, and what influences retention and revisits?

I had a same problem, but GA is only the tip of the iceberg. A lot of apps with analytics capabilities have usability problem. In some, metrics are hidden too deep and it's hard to navigate. Others lack simple features and do not let you change things like timezone or displayed currency. But the biggest pain point for me was integration with data from other apps.

To simplify things I am building Raport[1]. Raport integrates metrics from multiple sources (GA, Search Console, Stripe, Adsense) and displays them in clear and simple to use dashboard. It is not an alternative to GA and other tools, but rather works alongside them as an additional interface, where you can view all your data. For me personally Raport saved me a lot of time I spent in GA and Search Console.

[1] https://raport.pro

Yeah, I agree with that. A lot of these tools have usability issues. I kinda like Search Console but Google Analytics or Facebook Business gave me some terrible data analysis experiences.

I checked out your tool. Looks perfect for my needs but I need do dive a bit deeper to say more. I assume you plan to add more integrations in the future. Have you thought about adding an integration with LinkedIn? That’d be helpful for me.

I agree, Facebook Business is the worst. And it crashes in Safari.

Our plan is to create integrations for social media platforms next (Facebook, Instagram, Twitter). I do not have experience with LinkedIn, but we'll definitely add it too, if there is data to analyze.

Feel free to explore the app and leave us a feedback if you want.

Cloudflare Analytics or something on server with GoAccess.

SimpleAnalytics, Fathom, Pirsch and Plausible. They are all very similar from pricing, to display layout. The problem is they dont track returning visitors. Some argue that is against privacy, some think it is acceptable for 30 days period. I remember there was one Analytics from EUR that offer returning visitors stats but again.. Bookmarks on browser is practically useless. So I cant find it anymore.

Pirsch does track returning visitors. As long as no PII is stored, it's fine.
I run my own Matomo. Boring and old-school, but serves me well.
I use clicky.com, it's ultra lite weight and has tons of features.
I know that Mixpanel is very event focused, and it seems like the question is more on page tracking, but surprised that no one has mentioned it. Has mixpanel fallen out of favor or is the lack of mention because it's a bit out of scope for the OP?
was wondering the same, in terms of features (retention grid, user centric tracking, funnels, advanced queries) and ui few things come close but its probably pretty costly compared to ga
OP here. I'm going to give Mixpanel a try. I'm essentially looking for two things:

1. Product analytics on logged in users in a SaaS platform

2. Aggregate analytics on anonymous users with funnel analysis, referral analysis, etc.