ADR 007
Self-hosted, cookieless analytics instead of Google Analytics
Context
I need basic product analytics: which apps get used, where visitors come from, and which pages fail to engage. The audience includes families and children, and the platform's selling point is privacy.
Options considered
| Option | For | Against |
|---|---|---|
| Google Analytics 4 | Free, powerful | Visitor data goes to a third party; a cookie-consent banner is needed; ad-blockers skew the numbers; at odds with the privacy promise |
| Hosted privacy analytics (Plausible, Fathom) | No servers to run | Paid per site and per pageview volume |
| Self-hosted Umami with its own Postgres | Cookieless; data stays on my server; one script tag for every site; no per-site cost | About 230 MB RAM; I maintain and back it up |
Consequences
- Good: no consent banner and no data leaving the platform. Strict CSPs can allow a single first-party analytics origin.
- Cost: after the workflow engine and the blog database, it's one of the largest memory users on the server. That's acceptable for the value.
- Note: its database is in the nightly encrypted backup (ADR 003).
At bank scale
Product analytics in a bank goes through a consent-aware tag manager, server-side collection, and a data catalogue that marks each event field as personal data or not. The question to ask any vendor stays the same: does this data need to leave our boundary at all?