In early 2022, the Austrian data protection authority (DSB) issued a decision that sent waves through the analytics industry: a website using Google Analytics was violating GDPR because visitor data — including IP addresses and cookie identifiers — was being transferred to Google's US servers without a valid legal basis. France, Italy, and Denmark followed with substantially identical rulings within months.
The EU-US Data Privacy Framework (adopted July 2023) resolved the transfer mechanism issue. But it did not change the underlying consent requirement. In 2026, any website loading Google Analytics without prior user consent is still non-compliant — not because of the US transfer, but because GA4 sets persistent cookies before you have a lawful basis for doing so.
Matomo, configured correctly, sidesteps this requirement entirely.
Why GA4 Always Requires Consent
Google Analytics 4 loads a JavaScript library that sets the _ga cookie — a persistent identifier with a two-year default lifespan — on the visitor's device. Under Article 5(3) of the ePrivacy Directive (implemented in national law across all EU member states as the "cookie law"), storing or accessing information on a user's device requires either:
- The processing being strictly necessary for a service explicitly requested by the user, or
- The user's prior informed consent
Analytics cookies do not meet the "strictly necessary" threshold. The EDPB's guidelines on consent (05/2020) are explicit: analytics cookies are not strictly necessary for the provision of an information society service requested by the user. Therefore, GA4 always requires consent before it fires.
This applies even if you:
- Enable IP anonymisation in GA4
- Reduce data retention to the minimum 2-month setting
- Disable Google Signals
- Accept Google's Data Processing Amendment
The consent requirement is triggered by the act of storing a cookie, not by what the cookie contains or where the data goes.
Why Matomo Self-Hosted (Cookieless) Doesn't Need a Cookie Banner
Matomo is open-source analytics software you install on your own server. When configured in cookieless mode, Matomo does not store any cookie or similar identifier on the visitor's device. Because Article 5(3) of the ePrivacy Directive is triggered by "storing information" or "gaining access to information stored in the terminal equipment," no cookie = no Article 5(3) trigger = no consent required.
The GDPR consent requirement is also avoided when Matomo is configured with full IP anonymisation. With two-octet anonymisation (e.g., 192.168.xxx.xxx), the remaining IP fragment cannot individually identify a person. Combined with no persistent identifier, Matomo processes no personal data under GDPR's definition, which means Article 6 consent is not required either.
The key setup steps to make Matomo consent-free:
- Disable cookies entirely — In Matomo's JavaScript tracking code, add
_paq.push(['disableCookies']);before thetracker.track()call - Anonymise IP to 2 octets — In Matomo Admin > Privacy > Anonymise data, set "Mask IP address" to mask 2 bytes
- Disable User ID tracking — Do not pass a user identifier to Matomo that could link sessions across visits
- Disable fingerprinting — Optionally disable
clientHintsif you want maximum privacy (reduces accuracy slightly) - Host on an EU server — Ensure no data leaves your infrastructure to a third country
When all five conditions are met, Matomo operates outside both the ePrivacy Directive's consent requirement and GDPR's personal data processing rules.
Does Matomo Have a Consent Mode Like Google Analytics?
Not in the branded sense. Google Analytics' "Consent Mode v2" is a specific Google product feature: a JavaScript API that tells GA4 which categories of consent a visitor granted, and GA4 then decides whether to fire full tracking, modelled (cookieless) tracking, or nothing at all. Matomo has no product called "Consent Mode," which is why searches for it turn up confusing results.
What Matomo offers instead is a set of consent-related JavaScript API calls you wire up to your own cookie banner:
_paq.push(['requireCookieConsent'])— blocks all Matomo cookies until the visitor consents_paq.push(['setConsentGiven'])— called when the visitor accepts, unblocking cookie-based tracking_paq.push(['forgetConsentGiven'])— called if the visitor later withdraws consent_paq.push(['requireConsent'])/_paq.push(['setConsentGiven'])— a broader gate that blocks tracking data from being sent at all, not just cookies
The functional outcome is similar to GA4 Consent Mode — tracking behaviour changes based on what the visitor allows — but the implementation is a manual integration with your consent management platform rather than a single toggle. If you configure Matomo in fully cookieless mode (as described above), you can skip this consent wiring entirely, since there is no cookie to gate in the first place.
Matomo and Google Tag Manager: Cookie Consent Setup
If you deploy Matomo through Google Tag Manager rather than a hardcoded snippet, cookie consent needs to be wired into the GTM trigger, not just the Matomo configuration:
- Create a Consent-based trigger — In GTM, use the built-in "Consent Initialization" and "Analytics Storage" consent checks, or a custom trigger tied to your CMP's consent event (e.g., a
consent_updatedataLayer push) - Gate the Matomo tag on that trigger — The Matomo tag (whether a custom HTML tag or the community Matomo GTM template) should only fire after the consent trigger resolves to "granted"
- Pass the cookieless flag through GTM variables — If you're running Matomo cookieless, set a GTM variable that always passes
disableCookies: trueto the tag regardless of consent state, since a cookieless configuration doesn't need to wait for consent at all - Test with GTM's Preview mode — Verify the Matomo tag does not fire before consent is granted (for cookie-based setups) or fires immediately with no cookies set (for cookieless setups)
The most common misconfiguration is publishers assuming the CMP's "block by default" setting automatically covers custom HTML tags like Matomo — most CMPs only auto-block tags they recognise by name (Google Analytics, Meta Pixel, etc.), and a Matomo tag added as generic custom HTML frequently fires unblocked unless you explicitly attach it to the consent trigger.
Matomo Cloud vs Self-Hosted: The Compliance Difference
| Factor | Matomo Self-Hosted | Matomo Cloud (EU plan) |
|---|---|---|
| Data controller | You | You + InnoCraft as processor |
| DPA required | No | Yes — with InnoCraft Ltd |
| Cookie-free mode | Yes — fully supported | Yes — but depends on plan |
| Consent required (cookieless) | No | No (if cookieless configured) |
| Consent required (with cookies) | Yes | Yes |
| Third-country transfer | None | None (EU servers) |
| GDPR Article 28 processor | None | InnoCraft Ltd |
Matomo Cloud with a valid DPA and EU servers is compliant — but it introduces a processor relationship and the overhead of managing that agreement. Self-hosted Matomo gives you sole control.
Plausible and Fathom as Lightweight Alternatives
If setting up your own Matomo instance is too much infrastructure overhead, two SaaS alternatives achieve the same consent-free outcome:
Plausible Analytics — Operated by Plausible Insights OÜ (EU company, EU servers). Sets no cookies, collects no personal data, requires no consent. Pricing starts at €9/month. Limited to traffic metrics — no funnels, no user-level data, no advertising integrations.
Fathom Analytics — Canadian company, GDPR-compliant, no cookies, no consent required. Pricing starts at $15/month. Similar feature depth to Plausible.
Analytics Comparison Table
| Tool | GDPR Status | Consent Required? | Hosting | Data Depth | Cost |
|---|---|---|---|---|---|
| GA4 (standard) | Compliant with consent | Yes — always | Google (US, DPF) | Full | Free |
| GA4 (Consent Mode v2) | Compliant | Yes — modelled for non-consenters | Google (US, DPF) | Full + modelled | Free |
| Matomo self-hosted (cookieless) | Compliant — no consent needed | No | Your server | Full | Free (hosting cost) |
| Matomo Cloud (EU, cookieless) | Compliant — no consent needed | No | EU (InnoCraft) | Full | €19+/month |
| Plausible | Compliant — no consent needed | No | EU | Traffic only | €9/month |
| Fathom | Compliant — no consent needed | No | Canada/EU | Traffic only | $15/month |
When GA4 Is Still the Right Choice
Eliminating the consent banner is not always worth the trade-off. GA4 remains the correct tool when:
- You run Google Ads campaigns and need conversion attribution — GA4 integrates directly with Google Ads in ways no alternative matches
- You need funnel analysis, cohort reporting, or user-level journey mapping
- Your site already has a well-performing consent banner and high opt-in rates
- You use BigQuery for advanced data analysis — GA4's BigQuery export is unmatched
- You need cross-platform tracking (web + mobile app) through Firebase integration
For these use cases, the right answer is not to abandon GA4 but to implement Consent Mode v2 correctly — which uses modelled, aggregated data for users who decline consent, giving you usable analytics without processing personal data for non-consenting visitors.
The Bottom Line
If your goal is to remove the analytics consent requirement entirely, Matomo self-hosted in cookieless mode with two-octet IP anonymisation is the most legally robust option available in 2026. It satisfies both Article 5(3) ePrivacy Directive (no cookie = no consent trigger) and GDPR (no personal data = no Article 6 lawful basis required).
If you need a simpler managed solution, Plausible Analytics achieves the same result with less infrastructure overhead.
For sites that keep GA4, proper consent management is non-negotiable. Use our Cookie Consent Generator to build a compliant banner that blocks GA4 until consent is given — including correct Consent Mode v2 integration.