Open Web Analytics (OWA) is a self-hosted web analytics platform that replaces commercial tools like Google Analytics by giving you full ownership of your website and app traffic data. It’s designed for privacy-conscious website owners, developers, and organizations that need to comply with data sovereignty regulations while gaining deep insights into user behavior.
Built in PHP with a JavaScript tracker client, OWA supports tracking multiple websites from a single server instance. It includes a customizable reporting dashboard, REST API for programmatic access, and extensible modules. Deployment options include standard LAMP stacks, Docker, and integration with WordPress via official plugins.
What You Get
- First-party JavaScript tracker - A self-hosted tracking script that collects visitor data without relying on third-party cookies or external servers.
- Heatmap generation - Visualize where users click, scroll, and interact with your web pages to optimize UX and design.
- Domstream session recordings - Record and replay user sessions to understand navigation patterns and identify friction points.
- Multi-website tracking - Track an unlimited number of websites from a single OWA server instance with isolated data views.
- REST API for data access - Programmatically retrieve analytics data and manage configurations using a documented RESTful API.
- Customizable reporting dashboard - View and modify all reports including pageviews, visitor demographics, and e-commerce transactions.
Common Use Cases
- Running a privacy-focused blog - A journalist uses OWA to track reader engagement without sending data to Google, ensuring GDPR compliance.
- Managing multiple client websites - A web agency deploys one OWA instance to monitor traffic across 50+ client sites with separate dashboards per client.
- E-commerce analytics without data leaks - An online store tracks purchases and cart abandonment using OWA’s transaction tracking while keeping customer data on-premises.
- Developing a SaaS product with usage analytics - A startup embeds OWA’s JavaScript tracker to monitor feature usage and user behavior in their application.
Under The Hood
Architecture
- Centralized monolithic OWA class tightly couples request handling, configuration, and service routing, violating single-responsibility principles
- Dependency injection is manual and static, relying on global serviceSingleton() calls that obscure dependencies and hinder testability
- Modular structure exists via modules/ directory but core logic remains entangled in procedural global functions
- Frontend assets are statically concatenated and minified with Webpack, limiting dynamic composition and extensibility
- CLI and web entry points duplicate initialization logic instead of abstracting a unified dispatcher
- Template and service layers are nominally separated but implemented procedurally with stateful, non-declarative patterns
Tech Stack
- PHP backend with Composer and a custom dependency merge plugin for modular module management
- Legacy JavaScript stack built on jQuery 3.6.0 and jQuery UI, augmented with outdated plugins like Chosen and jqGrid
- Webpack 5 with custom concatenation and minification plugins to bundle disparate JS components into monolithic assets
- No modern frontend frameworks; UI is built with vanilla JS and jQuery, relying on manual asset pipelines
- Deployment scripts use shell utilities for file operations and production asset optimization
Code Quality
- Limited test coverage with no assertions, suggesting structural rather than validation-driven testing
- Tight coupling between logic and presentation across PHP templates and modules
- Minimal error handling with generic try-catch blocks and no custom exception context or recovery
- Inconsistent naming conventions and generic variable names reduce code clarity and maintainability
- Absence of type hints, static analysis, linting, or formatting standards leads to brittle, unpredictable behavior
What Makes It Unique
- Unified core engine supports consistent behavior across web, CLI, and REST interfaces through role-based initialization
- Dynamic report generation via method dispatching on report_name allows new analytics reports to be added without modifying routing
- Built-in REST API serialization through view layers eliminates need for separate JSON or API frameworks
- Declarative resultSetManager enables ad-hoc analytical queries without pre-defined endpoints
- HTTP semantics are handled declaratively in controllers, cleanly separating business logic from response formatting
- Native semantic URL routing and endpoint enablement checks allow modules to expose APIs with minimal configuration