Matomo

Also known as: Piwik

On this page 8

Matomo is an open-source web analytics platform that collects, stores and reports visitor behavior on websites and apps, with the defining feature that the organization can own and host its data. In marketing analytics, it serves as a privacy-oriented alternative to GA4, measuring traffic sources, campaigns, goals and ecommerce revenue without sending raw visitor data to an advertising company.

The project was launched in 2007 under the name Piwik and was renamed Matomo in 2018. It is distributed under the GNU General Public License and is available in two forms: a self-hosted On-Premise edition installed on the organization’s own servers and a Matomo Cloud subscription operated by the vendor.

How Matomo collects and processes data

Matomo works by placing a JavaScript tracking code on every page, which sends a tracking request to the Matomo server each time a visitor loads a page, clicks a tracked link or triggers an event. The server writes each hit into a MySQL or MariaDB database as raw log data, grouped into visits by a visitor identifier and a session timeout of 30 minutes of inactivity by default.

Raw hits are not queried directly by reports. A scheduled process called archiving aggregates the logs into precomputed report tables for each day, week, month and segment. On busy sites, administrators run archiving through a cron job instead of browser-triggered processing, because report generation on demand becomes slow above a few hundred thousand pageviews per month.

Besides the JavaScript tracker, Matomo accepts data from several other sources. The following table summarizes the main collection methods and when each fits.

MethodHow it worksTypical use
JavaScript trackerBrowser script sends hits to the serverStandard website tracking
Tag ManagerBuilt-in container loads tags and triggersManaging pixels without code releases
Log analyticsPython script imports web server logsTracking without scripts or consent banners
Tracking HTTP APIServer or app sends requests directlyMobile apps, kiosks, back-end events
Image trackerInvisible pixel requestEmail opens or pages without JavaScript
Data collection methods in Matomo

Core reports and marketing features

Matomo provides the standard acquisition, behavior and conversion reports expected from a marketing analytics tool. Acquisition reports group visits into channel types such as search engines, websites, social networks, campaigns and direct entry, and campaign tracking reads both Matomo parameters and standard UTM parameters from landing page URLs.

Goals define conversions, such as a form submission, a visit to a thank-you page or a minimum time on site, and each goal can carry a fixed or dynamic revenue value. Ecommerce tracking records orders, products, cart abandonment and revenue, and multi-channel attribution reports compare first-click, last-click, linear and position-based models across the visit history of converting visitors.

Several features that other platforms sell separately are available as premium plugins or as part of the Cloud plan. The table below lists the most relevant ones for marketers.

FeatureWhat it measuresAvailability
FunnelsDrop-off between defined stepsPremium plugin or Cloud
Heatmaps and session recordingsClicks, scrolling and mouse movementPremium plugin or Cloud
A/B testingConversion difference between variantsPremium plugin or Cloud
Form analyticsField-level abandonment and timingPremium plugin or Cloud
SegmentsAny report filtered by visitor attributesFree core feature
Custom dimensionsBusiness-specific visit or action dataFree core feature
Selected Matomo features and their marketing purpose

Matomo compared with other analytics platforms

Matomo occupies a middle position between ad-ecosystem tools like GA4 and lightweight privacy tools like Plausible Analytics. It keeps a classic session-and-pageview data model, which many analysts find easier to reconcile with historical reports than the event-only model of GA4, while offering far more depth than minimalist dashboards.

AspectMatomoGA4Plausible Analytics
Data ownershipFull, especially self-hostedHeld by GoogleHeld by vendor or self-hosted
Data samplingNo samplingPossible in explorationsNo sampling
Data modelVisits, actions, eventsEvents with parametersPageviews and simple events
Advertising integrationLimitedDeep link with Google AdsMinimal
Cookieless modeAvailable with configurationConsent mode with modelingCookieless by design
Depth of featuresHighHighLow by intent
Matomo versus common alternatives

Enterprise suites such as Adobe Analytics offer more advanced data processing and integrations, but at a much higher cost. The main trade-off of Matomo is that it lacks the native audience sharing with ad networks that makes GA4 attractive for paid media optimization.

Privacy compliance is the main reason organizations choose Matomo. Because the data can stay on servers inside the European Union, organizations avoid many of the international data transfer questions raised under the GDPR by tools that process data in the United States.

Matomo includes built-in controls such as IP address anonymization, configurable data retention, deletion of raw logs after aggregation, opt-out forms and a GDPR tool for answering access and erasure requests. Configured without cookies and with anonymized identifiers, Matomo can qualify in some jurisdictions for a consent exemption, which the French data protection authority CNIL has recognized under strict conditions. Exemption rules differ between countries, so a legal review per market remains necessary.

Deploying Matomo in practice

The choice between On-Premise and Cloud depends mainly on internal technical capacity and traffic volume. The following decision table summarizes typical situations.

SituationRecommended optionReason
Small team without server administratorsMatomo CloudVendor handles updates, scaling and security
Strict data residency or public sector rulesOn-PremiseData never leaves own infrastructure
Very high traffic, tens of millions of hitsOn-Premise with tuningDedicated database and archiving control
Need for heatmaps and funnels at low effortMatomo CloudPremium features included in plans
Choosing a Matomo deployment

A sound implementation starts with a measurement plan: defining goals, campaign naming conventions, custom dimensions and segments before the code goes live. Teams that migrate from another tool usually run both systems in parallel for several weeks to understand differences in visit counts before switching reporting.

Limitations and common mistakes

Matomo is capable, but its value depends heavily on configuration and maintenance. The most frequent problems and their fixes appear below.

ProblemCauseFix
Slow or empty reportsBrowser-triggered archivingSwitch to cron-based archiving
Inflated direct trafficMissing campaign parametersEnforce UTM naming rules
Bot visits in reportsWeak bot filteringEnable bot detection and exclusions
Database growing quicklyUnlimited raw log retentionSet raw data deletion schedule
Numbers differ from GA4Different session and consent logicCompare trends, not absolute counts
Typical Matomo problems and their remedies

Self-hosting also brings security responsibility: an outdated installation is an attack surface, so updates must be applied promptly. A common misconception is that open source means free of cost; for self-hosted setups, server, maintenance and staff time often exceed the price of a hosted subscription.

In simple terms

Matomo is a tool that tells a website owner how many people visit, where they come from and what they do on the site. It does much the same job as Google Analytics.

The big difference is ownership. With Matomo, the visitor information can sit on the organization’s own computers instead of a large tech company’s servers. It is like keeping a guest book in your own shop rather than handing it to a stranger. That makes it easier to respect visitors’ privacy and follow data protection laws, although someone has to look after the system.

A practical example

A regional university in Germany runs about 1.2 million pageviews per month across its admissions pages. Its data protection officer objects to sending visitor data to a United States provider, so the marketing team installs Matomo On-Premise on a university server, enables IP anonymization and disables cookies.

The team defines a goal for completed application forms, tags every newsletter and social campaign with UTM parameters and sets up a funnel from program page to application start to submission. After one admissions cycle, the reports show that organic search brings 48 percent of applicants, while a paid social campaign generates traffic but very few completed applications. The university moves part of that budget into search content for individual degree programs and sees completed applications rise in the following cycle, with no consent banner required for analytics.