Why I refuse to ship Google Analytics in open-source projects
Source: Dev.to
Background
I build open‑source applications, most of them self‑hosted. Like many developers, I need metrics—not marketing metrics, just basic signals:
- Is the application actually used?
- How many instances are alive?
- Which features are used at all?
For a long time, the default answer was obvious: Google Analytics. But at some point I decided to stop shipping it entirely.
Why Google Analytics Is Unsuitable
Google Analytics is not a bad tool; it’s built for a completely different purpose. It assumes:
- A centralized SaaS product
- Tracked end‑users
- Marketing funnels
- Cookies, consent banners, and external dependencies
None of that aligns well with self‑hosted open‑source software. Embedding GA in an open‑source app means:
- Sending usage data outside the user’s infrastructure
- Introducing legal and privacy concerns you don’t control
- Tracking individuals when you only want aggregate usage
At that point, the cost (technical, ethical, cognitive) is higher than the value.
What I Needed
I looked at many “privacy‑friendly” or “self‑hosted” analytics tools (e.g., Countly, PostHog). Most of them still assume:
- Websites, not distributed instances
- User tracking (even anonymized)
- Dashboards designed for marketing teams
- Heavy setups for very simple questions
What I needed was much simpler. For open‑source and self‑hosted software, my questions are boring but essential:
- Is this instance still running?
- Is anyone using this feature?
- Is adoption growing or stagnating?
- Did this release break usage patterns?
I don’t need:
- Page views
- Funnels
- Session replay
- User identity
I just need signals, not surveillance.
Introducing SHM (Self‑Hosted Metrics)
So I built a small open‑source service called SHM (Self‑Hosted Metrics). It’s intentionally minimal:
- Accepts simple JSON events
- Doesn’t track users
- Is agnostic to the application
- Works well with self‑hosted deployments
The goal is not analytics but observability of usage, without violating the principles of open‑source or self‑hosting.
Repository:
Conclusion
A lot of real needs sit between “no metrics at all” and “full SaaS analytics stacks.” Big tools don’t care about these needs, but for maintainers, indie developers, and small teams, they matter. Not everything needs to be measured like a growth funnel. Sometimes, knowing that your software is simply used is enough.