50

Earlier this year, Google announced that Universal Analytics (UA) will be going away and will stop processing new data after July 1, 2023.

Stack Exchange currently plans to switch to Google Analytics 4 (GA4). I won't re-iterate the problems with that plan; but why not take this opportunity to use a more suitable alternative, instead?

For price estimates, I'll be assuming 2400 000 000 monthly page views for all of Stack Exchange. Stack Overflow is responsible for most of that. This is way more than most companies list on their pricing page, so I've extrapolated; those prices are marked with "conjectured", and are probably overestimates.

Google Analytics 3 ("Universal Analytics")

  • Closed-source JavaScript
  • Hosted version ($12 500 per month) blocked by:
    • Firefox Tracking Protection
    • EasyPrivacy
  • No self-hosted version
  • Doesn't fill in the data gap
  • Doesn't respect Do Not Track header

Google Analytics 4 ("GA4")

  • Closed-source JavaScript
  • Hosted version ($12 500 per month) blocked by:
    • Firefox Tracking Protection
    • EasyPrivacy
  • No self-hosted version
  • Attempts to fill in the data gap with magic machine learning, but can't do anything when the browser blocks the script.
  • Doesn't respect Do Not Track header

Matomo

GoAccess

  • No JavaScript
  • No hosted version
  • Self-hosted version (libre, MIT; C, precompiled binary and Docker versions available) blocked by:
    • Nothing; cannot be blocked
  • Has no data gap
  • Can respect Do Not Track header, depending on server configuration
  • No campaign / heatmap support

rrweb.io

  • Open-source JavaScript
  • No server-side software; you'll need to write your own.
  • Blocked by:
    • None known.
  • Measures All The Things; a useful tool, but definitely an informed consent opt-in thing, e.g. for reporting usability issues and site bugs. (If enabled for all users all of the time, it'd be a privacy violation, and your servers would buckle under the load.)

Fathom

Plausible

Simple Analytics

GoatCounter

  • Open-source JavaScript (ISC)
  • No known commercial self-hosted version, but you could ask.
  • Self-hosted version (libre, modified EUPL, PostgreSQL/SQLite and Go-based) blocked by:
    • None known
  • Near-zero data gap
  • Ignores Do Not Track header

Piwik PRO (proprietary Matomo fork)

  • Closed-source(?) JavaScript
  • Hosted version (unknown price) blocked by:
    • EasyPrivacy
  • On-premises version (unknown price) blocked by:
    • Unknown
  • Unknown data gap (with <noscript> fallback)

Cloudflare Analytics

  • It's Cloudflare. You don't use Cloudflare.
  • It's only here for completeness; I have no idea how their pricing works.
  • No data gap, by technicality.
11
  • 4
    I'm certain I've missed some options. That's what comments are for! TODO: analyse Stack Exchange's requirements, and see which of these is the best for them.
    – wizzwizz4
    Commented Sep 5, 2022 at 19:33
  • Matomo's glossary is going to be helpful.
    – wizzwizz4
    Commented Sep 6, 2022 at 15:39
  • What is "MIT; C"? MIT License for C source code? Commented Sep 6, 2022 at 20:54
  • @This_is_NOT_a_forum Yes. The software is MIT-licensed, and it's written in C.
    – wizzwizz4
    Commented Sep 6, 2022 at 21:28
  • hm, One potential sticking point is while SE's fairly cool about adblockers - they get a fair amount of revenue off ads and they use google to serve them. Whatever alternative may need to work with that, assuming its a factor
    – Journeyman Geek Mod
    Commented Sep 7, 2022 at 2:51
  • 3
    @JourneymanGeek While Google Analytics does contain Google Ads-related code, afaict linking Google Analytics and Google Ads is to measure the effectiveness of ads that Stack Exchange pays for on other sites. I don't see that it affects how much money you get from ads on your site.
    – wizzwizz4
    Commented Sep 7, 2022 at 11:28
  • I've found a whole bunch more alternatives listed on tinyanalytics.io; some of them are no good, but many seem okay. I don't currently have the capacity to add them to the list in the question.
    – wizzwizz4
    Commented Sep 21, 2022 at 16:39
  • 2
    I definitely agree: Google Analytics is terrible for user privacy, and it contributes to Google's huge Internet monopoly. Using a more privacy-respecting analytics service run by a smaller organization is for sure the way to go. Commented Feb 23, 2023 at 0:54
  • 1
    Funny that it's somewhat related to your name @wizzwizz4, but I built UXWizz over the past 13 years, it's not as popular as the other solutions, but simpler to install, more performant and a lot cheaper for the self-hosted version. You might need some technical knowledge to be able to scale a plain MySQL database to hundreds of millions of pageviews per month though...
    – Cristy
    Commented Mar 1 at 15:11
  • @Cristy UXWizz looks pretty good to me! I'm not sure that it does everything Stack Exchange requires – I can't see how to do conversion funnel analysis –, but I'm not sure what Stack Exchange requires, so it might do all they need.
    – wizzwizz4
    Commented Mar 1 at 15:48
  • @wizzwizz4 Thanks! Actual funnels will be implemented soon (now I'm releasing ChatGPT integration to have text-to-mysql interactions). Currently, you can do funnels by creating different segments (e.g. [ALL], [visited /pricing], [visited /pricing + complete checkout]) and comparing their numbers. UXWizz might be a better fit to small to medium websites though, than to huge websites like Stack Exchange.
    – Cristy
    Commented Mar 3 at 21:32

1 Answer 1

24
+100

What functionality does Stack Exchange need?

25k analytics

Analytics accessible to users. Aside from stats that come directly from the database (posts and votes), there's:

Page views

This is the total number of page loads, counting the same user multiple times. All analytics systems can do this, though systems that can use server logs (GoAccess, Matomo, Plausible, GoatCounter) are the most complete. (Cloudflare comes in at a close second, but it has trouble filtering out scrapers and spiders.)

Visits

This is the number of distinct users who visit the site. Supported by:

New visits

Visits from users who are not known to have visited before.

Traffic sources (% direct, referring, search)

Referring sites

Search queries

I'm not confident Google Analytics' search queries data is at all accurate. But maybe it's better for bigger sites.

Campaigns

I've seen Stack Exchange use UTM query strings.

A/B testing

Stack Exchange uses Google Analytics for A/B testing. I'm going to try to piece this together from what Stackers have posted publicly, but if anyone at Stack Exchange could fill me in on which features you use, that'd be really helpful! (Do you use "conversions" features?)

Google Analytics import

GA4 does not support importing data from GA3 ("Universal Analytics"). These do:

Google Ads

To my knowledge, Google Analytics does not affect the amount of money you get from Google Ads. (Nor does it arbitrarily affect Google search rankings, though a lighter alternative would obviously be better for SEO.) All alternatives would be equivalent, in this respect.

The data gap

Many people refuse consent, opt-out of, or block analytics systems. Google Analytics is perhaps the most blocked system, but many others are blocked by the EasyPrivacy list used by many ad-blockers.

If this data gap was uniform, you could fill it in by extrapolating. However, it's not; certain demographics are disproportionately represented in this blocking, as Marko Saric reports:

Considering the fact that Plausible Analytics and Google Analytics measure unique visitors in a different way, I also looked at the total page views:

Plausible Google Difference
Tech site 16,853 11,626 31%
Lifestyle site 9,520 9,375 2%
Foodie site 15,811 14,492 9%
Total 42,184 35,493 16%

Marko Saric also found differences between OS, browser and device.

We have different levels of not-consenting on different Stack Exchange sites, too. From most, to least, affected by the 10th of May analytics drop:

name page views visits new visits
lifehacks 0.0636 0.0501 0.0322
spanish 0.0687 0.0461 0.0250
ell 0.1323 0.1098 0.0501
boardgames 0.1359 0.1035 0.0569
apple 0.2129 0.1875 0.0996
chess 0.3780 0.2580 0.0947
stackapps 0.3978 0.2343 0.1621
puzzling 0.4450 0.2227 0.0755
retrocomputing 0.4456 0.3235 0.1068
meta 0.5080 0.3963 0.2326

Naïvely comparing this year's data up to 2022-05-09, versus 2022-05-10 to present: Lifehacks lost 94% of its page view data, but Meta Stack Exchange "only" lost 49%. Think of the demographics of these sites; is this impacting your use of analytics?

Google's got two data gaps to work with, here:

  • Users who don't consent to GA. Google can try to fill this in with machine learning, but it only has the data from "consenting" users to work with. Machine learning can extrapolate, but it's not magic; it doesn't work if it doesn't have good data.
  • Users who block Google Analytics entirely. As far as I'm aware, GA4 doesn't attempt to fill this data in.

Google Analytics 4's "Consent Mode" might give you the confidence that you can see the bigger picture, but I don't see how it's possible for their system to do this, given how they've described it working. Google Analytics has two blind spots, and "Consent Mode" claims it can fill one of those in with machine learning.

You know what has access to every single page view on your site? The Stack Exchange servers. Urchin, the original Google Analytics, worked by analysing server logs, but modern Google Analytics doesn't support this feature.

Uptime collection feature

Needs research. Mentioned in this comment.

3
  • Btw, if you have 25k on any sites not on this list, I'd appreciate some more entries for my table. You can help by visiting /site-analytics on your site, changing the From box to "2022-Jan-01", and exporting the Traffic CSV.
    – wizzwizz4
    Commented Sep 7, 2022 at 16:43
  • 2
    A small note on search queries: Plausible can be connected to the Google Search console to pull in search query data for analytics: plausible.io/docs/google-search-console-integration Commented Sep 8, 2022 at 19:50
  • @MatthewSchlachter Fixed.
    – wizzwizz4
    Commented Sep 8, 2022 at 19:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .