Open Web Analytics (OWA) is a self-hosted, open source alternative to commercial web analytics platforms like Google Analytics. Designed for privacy-conscious website owners and developers, OWA allows you to collect, store, and analyze website traffic data entirely on your own infrastructure. This eliminates third-party tracking, data sharing, and compliance risks associated with external analytics providers. OWA is ideal for organizations that require full data ownership, regulatory compliance (such as GDPR or CCPA), or want to avoid vendor lock-in.
The platform includes a server component written in PHP and a first-party JavaScript tracker that can be embedded into any website. It supports tracking visitors, pageviews, e-commerce transactions, and custom actions, with extensibility through modules. Whether you’re managing a single blog or multiple websites from one dashboard, OWA provides the tools to understand user behavior without compromising data privacy.
What You Get
- First-party JavaScript tracker - Embeds directly into web pages using a simple JS snippet, ensuring data is collected from your own domain without third-party cookies or cross-site tracking.
- Multi-website tracking - Track an unlimited number of websites from a single OWA server instance, ideal for agencies or enterprises managing multiple properties.
- Heatmaps and Domstream session recordings - Visualize user interactions on your pages with clickable heatmaps and full-session video replays to understand how visitors engage with content.
- Customizable reporting dashboard - View and modify all reports including traffic sources, page views, bounce rates, and user paths without being locked into predefined metrics.
- REST API for data access - Programmatically retrieve analytics data, integrate with other systems, or build custom dashboards using documented API endpoints.
- Multi-user reporting interface - Assign roles and permissions to team members for collaborative analytics management with separate access levels.
- Extensible module system - Extend functionality via custom modules to track unique events, integrate with CRM systems, or add new report types.
- Geolocation of visitors - Automatically determine visitor locations based on IP addresses to analyze regional traffic patterns and target content accordingly.
Common Use Cases
- Building a privacy-compliant website - A healthcare or financial services site that must comply with GDPR requires full control over user data; OWA ensures no external servers receive visitor information.
- Managing multiple client websites from one dashboard - A digital agency uses a single OWA server to track traffic across 50+ client sites, reducing overhead and maintaining consistent reporting standards.
- Problem: Google Analytics blocks third-party cookies → Solution: OWA’s first-party tracker - With browser restrictions on third-party cookies, businesses need a reliable alternative; OWA’s self-hosted tracker collects data directly from the user’s browser without relying on cookies from external domains.
- DevOps teams managing internal tools - An enterprise uses OWA to monitor usage of an internal SaaS dashboard, tracking feature adoption and identifying underused interfaces for optimization.
Under The Hood
Open Web Analytics is an open-source web analytics framework designed to provide comprehensive tracking and reporting capabilities for websites. It supports both web-based admin interfaces and command-line operations, offering flexibility in deployment scenarios including WordPress integration.
Architecture
The project adopts a modular architecture with clear separation between core components, controllers, and data handling modules. It follows an MVC-inspired pattern with dedicated classes for different request types.
- Modular design with hierarchical organization of base and feature modules
- Clear separation between core logic, controllers, and view rendering components
- Use of base classes and inheritance to reduce code duplication and improve maintainability
Tech Stack
The system is primarily built using PHP with extensive object-oriented programming practices, complemented by JavaScript and Smarty templating for frontend functionality.
- Built on PHP with integration of UAParser and JSON handling libraries
- Employs Smarty templating engine for view rendering and custom template extensions
- Includes support for CLI operations and web-based admin interfaces
- Utilizes external libraries such as jQuery and webpack for asset management
Code Quality
Code quality varies across the codebase, with some well-structured components and others indicating technical debt and inconsistency.
- Extensive use of base classes and inheritance to minimize redundancy
- Consistent naming and documented code blocks with version tracking
- Limited automated testing, relying more on manual validation and basic error handling
- Presence of hardcoded values and direct database access in core modules
What Makes It Unique
This project distinguishes itself through its flexible modular architecture and comprehensive CLI support, enabling automation and extensibility across environments.
- Full command-line interface support for batch operations and automation
- Extensible module system allowing new features to be added without modifying core code
- Built-in WordPress plugin integration and standalone web analytics deployment options
- Capability-based access control and extensive configuration flexibility for user roles