Plausible Analytics is a production-grade, privacy-first web analytics platform implemented as a full-stack SaaS application. The backend is built with Elixir/Phoenix (LiveView, Ecto, Oban) and uses ClickHouse as the primary analytics data store alongside PostgreSQL for transactional metadata. The frontend is a React/TypeScript single-page application with Tailwind CSS, and a separate JavaScript tracker script is distributed via npm and self-hosted CDN. The system handles event ingestion, session management, real-time dashboards, goal/funnel tracking, billing/subscriptions via Paddle, team collaboration, SSO/SAML authentication, data imports from Google Analytics, and a public Plugins API. The codebase is dual-licensed (Community Edition and Enterprise Edition) with conditional compilation for EE features like consolidated views, customer support tools, and audit logging. The architecture is modular with clear contexts (stats, ingestion, billing, teams, auth, shields) and extensive use of Oban workers for background jobs, ConCache for distributed caching, and OpenTelemetry for observability. The repository demonstrates high engineering craftsmanship with comprehensive test coverage (ExUnit, Playwright, k6 load tests), well-structured abstractions (cache behaviour, rate limiter, write buffers, session balancer), and a clear separation of concerns between the Phoenix web layer, LiveView components, and the React dashboard.
Umami is a self-hosted, open-source web analytics platform that serves as a privacy-focused alternative to Google Analytics. The system tracks pageviews, sessions, events, funnels, journeys, retention, attribution, revenue, and performance metrics (Core Web Vitals) through a dual-database architecture using PostgreSQL (via Prisma ORM) and ClickHouse for analytics queries. It provides real-time dashboards, session replay, heatmaps, and a customizable board/dashboard system with shareable views. The application is built with Next.js (App Router) and React, using TypeScript throughout. It features a comprehensive REST API with auto-generated OpenAPI contracts, a generated TypeScript API client package, and an MCP (Model Context Protocol) server for AI/LLM integration. Authentication supports API keys, JWT, two-factor authentication (TOTP with backup codes), and team-based multi-tenancy with role-based permissions. Key architectural patterns include a dual-database query dispatcher (`runQuery`) that selects between Prisma and ClickHouse implementations for every analytics query, a centralized request parsing and validation layer using Zod schemas, and a hook-based React data layer with TanStack Query for caching and invalidation. The codebase also includes comprehensive test coverage with Vitest unit tests, Playwright API tests, and E2E tests, plus a coverage oracle that enforces every API endpoint is documented in the OpenAPI spec.
Ackee is a self-hosted, privacy-focused web analytics tool. It tracks page views, durations, referrers, browsers, devices, operating systems, screen sizes, languages, and custom events without using cookies or collecting personally identifiable information. Visitor identity is anonymized via SHA-256 hashing of IP + user agent + domain ID with a daily rotating salt. The architecture is a full-stack Node.js application: an Express server with Apollo Server for GraphQL, a React single-page application frontend (using `createElement` instead of JSX), and MongoDB for persistence. The backend provides a GraphQL API for querying aggregated statistics and managing domains, events, and authentication tokens. The frontend consumes this API via Apollo Client and renders a dashboard with reusable card and presentation components. Key design patterns include a `pipe` utility for chaining resolver middleware (auth, demo mode blocking), modular MongoDB aggregation stages stored in `src/stages/`, and a custom build pipeline using Rosid handlers. The application supports multiple deployment targets: Docker, Heroku, Vercel, Netlify, and manual Node.js processes.
universal-analytics is a Node.js library that implements Google's Universal Analytics Measurement Protocol, enabling server-side tracking of pageviews, events, transactions, exceptions, timings, and screenviews. It provides a `Visitor` class that queues hits and sends them as HTTP POST requests to Google Analytics, with support for batching, parameter validation, and persistent session data. The library includes an Express middleware for automatic client ID detection from cookies or sessions. The codebase is small, well-structured, and thoroughly tested. It demonstrates solid engineering practices: clean API design with flexible argument signatures, context-propagation for daisy-chaining, and a simple yet effective request module using native Node.js HTTP/HTTPS libraries. However, the library targets a deprecated service (Universal Analytics, being replaced by GA4), and its dependencies are outdated (e.g., uuid version 14.0.0 does not exist on npm). The last release (0.5.4) and the repository's commit activity suggest it is no longer actively maintained. As a library, it is tightly coupled to the Measurement Protocol specification, but internal components like the UUID utility and HTTP helper are reusable.