MCPSERV.CLUB
Offen Fair Web Analytics

Offen Fair Web Analytics

Self-Hosted

Privacy‑first web analytics for self‑hosted sites

Active(85)
957stars
0views
Updated 25 days ago

Overview

Discover what makes Offen Fair Web Analytics powerful

Offen Fair Web Analytics is a lightweight, self‑hosted analytics stack that prioritizes user privacy and data sovereignty. At its core it collects web‑usage events, aggregates them into actionable metrics, and exposes a RESTful API for programmatic access. All traffic is encrypted end‑to‑end; data resides only in the host’s own PostgreSQL database and is automatically purged after six months, aligning with GDPR retention policies. The platform is built to be modular: the core analytics engine can coexist with optional components such as the Offen Consent Tool and the Offen Protocol, which expose a privacy‑first data sharing interface.

Backend

Frontend

Client Snippet

Deployment

Overview

Offen Fair Web Analytics is a lightweight, self‑hosted analytics stack that prioritizes user privacy and data sovereignty. At its core it collects web‑usage events, aggregates them into actionable metrics, and exposes a RESTful API for programmatic access. All traffic is encrypted end‑to‑end; data resides only in the host’s own PostgreSQL database and is automatically purged after six months, aligning with GDPR retention policies. The platform is built to be modular: the core analytics engine can coexist with optional components such as the Offen Consent Tool and the Offen Protocol, which expose a privacy‑first data sharing interface.

Architecture

  • Backend – Written in Go, the backend uses the Echo web framework for routing and a PostgreSQL database for persistence. Event ingestion is handled via an HTTP/JSON endpoint that accepts batched payloads from the client‑side snippet. The engine then runs scheduled aggregation jobs (cron style) to compute daily, weekly and monthly metrics.
  • Frontend – The UI is a single‑page application built with React (TypeScript) and styled with Tailwind CSS. It consumes the backend API to render dashboards, user‑specific data views, and administrative settings.
  • Client Snippet – A vanilla JavaScript tag that collects page view, referrer, URL and UTM data. It respects the opt‑in state stored in a first‑party cookie (offen-consent) and forwards events to the backend only after consent is granted.
  • Deployment – The entire stack is containerized with Docker Compose. A ready‑to‑run docker-compose.yml includes services for the API, UI, PostgreSQL, and optional reverse proxy (Traefik). Kubernetes manifests are also available for cloud‑native deployments.

Core Capabilities

  • Event Tracking APIPOST /events accepts JSON batches; supports custom event types for advanced telemetry.
  • User‑Centric Data – Each user’s activity is stored under a unique UUID; the API exposes /users/:id/data for self‑service data access.
  • Aggregation Jobs – Periodic jobs expose metrics such as page views, unique visitors, bounce rate, and custom funnels via /metrics.
  • Webhooks – Optional webhook endpoints allow external systems to react to new data or user opt‑ins.
  • Plugin System – The backend supports a lightweight plugin API where developers can inject custom processors or storage adapters without modifying core code.

Deployment & Infrastructure

  • Self‑Hosting – Offen can run on any environment that supports Docker, from a Raspberry Pi to a managed Kubernetes cluster. The minimal footprint (≈ 200 MB image) keeps resource usage low.
  • Scalability – Horizontal scaling is achieved by running multiple API replicas behind a load balancer; PostgreSQL can be clustered or replaced with Aurora/PostgreSQL‑compatible services for high availability.
  • CI/CD – CircleCI pipelines automatically build, test, and push images to Docker Hub. The repository follows REUSE and SPDX compliance for easy auditability.

Integration & Extensibility

  • Consent Management – The Offen Consent Tool can be embedded to provide a granular opt‑in UI. Developers can expose the consent state via /consent/:user.
  • Open API – A Swagger/OpenAPI spec is available, enabling SDK generation in any language.
  • Data Export – Raw event logs can be streamed to external systems (e.g., Kafka, S3) via a custom exporter plugin.
  • Custom Themes – The UI supports CSS overrides; developers can host their own branding without touching the source code.

Developer Experience

The documentation (docs.offen.dev) is comprehensive, with clear API references, deployment guides, and a developer FAQ. The community is active on GitHub Discussions and Discord, offering rapid feedback cycles. Licensing under Apache‑2.0 ensures no commercial restrictions, encouraging forkability and integration into proprietary stacks.

Use Cases

  1. Privacy‑First SaaS – A B2B platform that must comply with GDPR and provide users a dashboard of their own analytics.
  2. Open‑Source Projects – Projects that want to avoid third‑party trackers while still gathering site‑usage insights.
  3. Educational Institutions – Universities can host Offen to monitor internal web resources without exposing data externally.
  4. Enterprise Analytics – Companies can run multiple tenants in a single Offen instance, sharing data among teams while keeping it internal.

Advantages

  • Performance – Go’s concurrency model and PostgreSQL’s efficient indexing yield sub‑200 ms response times even under high event throughput.
  • Flexibility – Modular architecture lets developers drop in custom storage or processing layers without rewriting the core.
  • Licensing & Transparency – Apache‑2.0 and fully open source mean no hidden costs or vendor lock‑in.
  • Privacy by Design – End‑to‑end encryption, first‑party cookies, and mandatory opt‑in reduce legal risk compared to mainstream analytics tools.

Overall, Offen offers a developer‑friendly, privacy‑centric analytics platform that can be deployed on any infrastructure, extended through plugins or APIs, and integrated into existing privacy workflows with minimal friction.

Open SourceReady to get started?

Join the community and start self-hosting Offen Fair Web Analytics today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
data-analysis
License
APACHE-2.0
Stars
957
Technical Specs
Pricing
Open Source
Docker
Dockerfile
Supported OS
LinuxDocker
Author
offen
offen
Last Updated
25 days ago