matomo-org/matomo
Empowering People Ethically 🚀 — Matomo is hiring! Join us → https://matomo.org/jobs Matomo is the leading open-source alternative to Google Analytics, giving you complete control and built-in privacy. Easily collect, visualise, and analyse data from websites & apps. Star us on GitHub ⭐️ – Pull Requests welcome!
Open-source web analytics platform competing with Google Analytics
Website tracking data flows from JavaScript tracker to database, gets aggregated by archive processes, then served through API to frontend visualizations
Under the hood, the system uses 2 feedback loops, 3 data pools, 3 control points to manage its runtime behavior.
Structural Verdict
A 11-component dashboard with 20 connections. 3858 files analyzed. Highly interconnected — components depend on each other heavily.
How Data Flows Through the System
Website tracking data flows from JavaScript tracker to database, gets aggregated by archive processes, then served through API to frontend visualizations
- Track — JavaScript tracker collects user interactions and sends to Matomo
- Process — Tracker core processes and validates incoming data
- Store — Raw tracking data stored in MySQL database tables
- Archive — Background processes aggregate raw data into metrics
- Serve — API serves aggregated data to frontend for visualization
- Visualize — Vue.js frontend renders charts and tables from API data
System Behavior
How the system actually operates at runtime — where data accumulates, what loops, what waits, and what controls what.
Data Pools
Incoming visitor interactions before aggregation
Aggregated metrics and reports by period
Cached plugin settings and system configuration
Feedback Loops
- Archive Processing (scheduled-job, balancing) — Trigger: Cron or visitor request. Action: Process raw data into aggregated reports. Exit: All periods processed.
- Plugin Hook Chain (recursive, reinforcing) — Trigger: Plugin event. Action: Execute registered hook callbacks. Exit: No more hooks.
Delays & Async Processing
- Archive Generation (batch-window, ~variable) — Reports may show delayed data until next archive run
- Real-time Updates (eventual-consistency, ~seconds to minutes) — Live visitor data appears with slight delay
Control Points
- Archive Processing (env-var) — Controls: When and how often data aggregation runs
- Plugin Activation (runtime-toggle) — Controls: Which analytics features are enabled
- Tracking Settings (feature-flag) — Controls: Data collection and privacy compliance
Technology Stack
Backend web application framework
Primary data storage for tracking and configuration
Frontend JavaScript framework for UI components
DOM manipulation and AJAX requests
PHP unit testing framework
JavaScript testing framework
JavaScript bundling and asset management
Key Components
- Tracker (module) — Processes and stores website tracking data from JavaScript
core/Tracker/ - API (module) — RESTful API layer for data retrieval and configuration
core/API/ - Plugin (module) — Plugin system for modular feature extension
core/Plugin/ - DataTable (class) — Data structure for analytics results with filtering and formatting
core/DataTable/ - Archive (module) — Aggregates raw tracking data into reportable metrics
core/Archive/ - MatomoUrl (class) — Frontend URL management and hash-based navigation
plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts - Periods (class) — Date period parsing and management (day, week, month, year)
plugins/CoreHome/vue/src/Periods/Periods.ts - AjaxHelper (class) — Frontend AJAX request handling with error management and queuing
plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts - Goals (plugin) — Conversion tracking and goal management functionality
plugins/Goals/ - Live (plugin) — Real-time visitor tracking and live view reports
plugins/Live/ - ComparisonsStore (class) — Frontend state management for period and segment comparisons
plugins/CoreHome/vue/src/Comparisons/Comparisons.store.ts
Configuration
composer.json (json)
name(string, unknown) — default: matomo/matomotype(string, unknown) — default: projectdescription(string, unknown) — default: Matomo is the leading Free/Libre open analytics platformkeywords(array, unknown) — default: piwik,matomo,web,analyticshomepage(string, unknown) — default: https://matomo.orglicense(string, unknown) — default: GPL-3.0+authors(array, unknown) — default: [object Object]support.forum(string, unknown) — default: https://forum.matomo.org/- +54 more parameters
Explore the interactive analysis
See the full architecture map, data flow, and code patterns visualization.
Analyze on CodeSeaRelated Dashboard Repositories
Frequently Asked Questions
What is matomo used for?
Open-source web analytics platform competing with Google Analytics matomo-org/matomo is a 11-component dashboard written in PHP. Highly interconnected — components depend on each other heavily. The codebase contains 3858 files.
How is matomo architected?
matomo is organized into 4 architecture layers: Core Framework, Plugin System, JavaScript Tracking, Vue.js Frontend. Highly interconnected — components depend on each other heavily. This layered structure enables tight integration between components.
How does data flow through matomo?
Data moves through 6 stages: Track → Process → Store → Archive → Serve → .... Website tracking data flows from JavaScript tracker to database, gets aggregated by archive processes, then served through API to frontend visualizations This pipeline design reflects a complex multi-stage processing system.
What technologies does matomo use?
The core stack includes PHP (Backend web application framework), MySQL (Primary data storage for tracking and configuration), Vue.js (Frontend JavaScript framework for UI components), jQuery (DOM manipulation and AJAX requests), PHPUnit (PHP unit testing framework), Jest (JavaScript testing framework), and 1 more. A focused set of dependencies that keeps the build manageable.
What system dynamics does matomo have?
matomo exhibits 3 data pools (Raw Tracking Data, Archive Tables), 2 feedback loops, 3 control points, 2 delays. The feedback loops handle scheduled-job and recursive. These runtime behaviors shape how the system responds to load, failures, and configuration changes.
What design patterns does matomo use?
5 design patterns detected: Plugin Architecture, Event-Driven Hooks, Request Routing, Vue Composables, Translation System.
Analyzed on March 31, 2026 by CodeSea. Written by Karolina Sarna.