OpenLabs-so/openanalytics
Open-source, privacy-first and cookieless web analytics with revenue attribution and an MCP server.
What it solves
OpenAnalytics provides a privacy-first alternative to traditional web analytics. It eliminates the need for cookies, cross-site profiling, and fingerprinting, allowing website owners to track visitor behavior and revenue without compromising user privacy or relying on third-party hosted services.
How it works
The system uses a lightweight tracker script that sends data to a self-hosted backend. It employs a daily-rotating salted hash for visitor identity and resolves geolocation locally on the host's disk to ensure no data leaves the server. The architecture consists of a monorepo with specialized services: a collector for ingestion, a worker for processing data into ClickHouse, a query gateway for secure data access, and a Next.js dashboard for visualization. It uses Postgres for the control plane, ClickHouse for event storage, and Valkey for queuing and caching.
Who it’s for
It is designed for website owners and developers who want full ownership of their analytics data, prioritize user privacy, and prefer self-hosting their infrastructure over using proprietary SaaS platforms.
Highlights
- Privacy-Centric: No cookies or fingerprinting; honors Do Not Track and Global Privacy Control.
- Self-Hostable: Easy deployment via Docker Compose with automatic TLS.
- Comprehensive Metrics: Tracks page views, custom events, web vitals, funnels, and Stripe-integrated revenue analytics.
- Strict Engineering: CI enforces a hard byte budget for the tracker script and strict architectural boundaries between services.
Related
- Project
- Project
- Project
- Project
- Project