Matomo
The longest-running open-source web analytics platform, self-hosted or cloud, with session-based reporting and full data ownership.
INTEGRATES: matomo-tag-manager · google-tag-manager
ALTERNATIVES: google-analytics-4 · piwik-pro · plausible-analytics · umami
Matomo (formerly Piwik, launched 2007) is the reference open-source web analytics platform. Its data model is session-based — visits, pageviews, goals, ecommerce, funnels — closer to Universal Analytics than to GA4’s event stream, which makes it a familiar landing spot for teams that never wanted the GA4 migration. It ships its own tag manager, supports cookieless configurations, and stores everything in a MySQL database you control.
How it models data. Under the hood there are two layers: raw log tables (log_visit,
log_link_visit_action, log_action, log_conversion) that record every session and action, and
pre-aggregated archive tables (archive_numeric_YYYY_MM, archive_blob_YYYY_MM) partitioned by
month that power the reporting UI. An archiving process rolls the raw logs up into those archive
tables — so you get both queryable raw data via API or direct SQL and fast pre-computed reports.
Implementation notes. Server requirements are deliberately boring: any web server, PHP (latest
8.x recommended), MySQL 5.5+ or MariaDB. Matomo’s own sizing guidance runs from a single 2-CPU /
2 GB box for up to ~100K pageviews a month to separate app and database servers at ~10M, and
load-balanced multi-server setups beyond that. The one setup step people skip and regret: configure
the core:archive cron job (hourly is the recommended starting point). Without it, archiving runs
when someone opens a report, which on medium-to-large sites means slow dashboards and timeouts.
Cookieless tracking is a one-liner (_paq.push(['disableCookies'])) at the cost of degraded
returning-visitor identification. There is also a Log Analytics mode that imports server access logs
(Apache, Nginx, IIS) instead of using JavaScript — popular in government, finance, and healthcare —
though it can’t capture screen resolution, events, content tracking, heatmaps, or form analytics.
Migration. A Google Analytics Importer plugin (bundled on Cloud, Marketplace install on-prem) imports historical reports from both Universal Analytics and GA4 properties. Budget real time for it: Google’s API quotas mean large imports run over several days. Log Analytics can also backfill history from existing server logs, and Matomo documents migrating from older log tools like AWStats.
Use it when data ownership and residency are non-negotiable and your team is comfortable operating a PHP/MySQL application, or when you want UA-style session reporting without a vendor cloud — the Cloud offering exists for teams who want the model without the ops. Look past it when you expect very high traffic without infrastructure investment, when your budget assumes the free tier includes heatmaps and session recording (it doesn’t — those are paid plugins), or when you want event-level modeling in a data warehouse rather than a self-contained reporting UI.