Google Analytics is broken on a bunch of my sites thanks to the GA4 migration. Since I have to update everything anyways, I’m looking at the possibility of replacing Google Analytics with something I self-host that’s more privacy-focused.

I’ve tried Plausible, Umami and Swetrix (the latter of which I like the most). They’re all very lightweight and most are pretty efficient due to their use of a column-oriented database (Clickhouse) for storing the analytics data - makes way more sense than a row-oriented database like MySQL for this use case.

However, these systems are all cookie-less. This is usually fine, however one of my sites is commonly used in schools on their computers. Cookieless analytics works by tracking sessions based on IP address and user-agent, so in places like schools with one external IP and the same browser on every computer, it just looks like one user in the analytics. I’d like to know the actual number of users.

I’m looking for a similarly lightweight analytics system that does use cookies (first-party cookies only) to handle this particular use case. Does anyone know of one?

Thanks!

Edit: it doesn’t have to actually be a cookie - just being able to explicitly specify a session ID instead of inferring one based on IP and user-agent would suffice.

  • dan@upvote.auOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Each request to the site may use a different port though (if the keepalive times out).

    I’d grab the data from the http logs if it was me and use a tool like goaccess.

    Unfortunately this has the same issue with multiple people sharing an IP appearing to be one user.

    Another major use case I thought of are people stuck on CGNAT. It’s easily possible for tens of thousands of customers to share just dozens of public IP addresses. Unfortunately some providers are rolling out CGNAT instead of IPv6 even though it causes so many problems.