The Analytics Blog
Privacy

GDPR-Compliant Analytics: The Complete Setup Guide for 2026

· 7 min read
GDPR-Compliant Analytics: The Complete Setup Guide for 2026

GDPR has fundamentally changed how we track website visitors. Get it wrong, and you are looking at fines up to 20 million EUR or 4% of global revenue. Get it right, and you will have cleaner data and happier users. Here is everything you need to know about GDPR-compliant analytics in 2026.

TL;DR — GDPR-Compliant Analytics

  • Two paths: Use consent-based tracking (GA4 + cookie banner) or privacy-first tools that need no consent (Plausible, Fathom, Matomo).
  • GA4’s problem: Data goes to US servers, violating GDPR data transfer rules. Multiple EU authorities have ruled against it.
  • Easiest solution: Switch to a cookieless, EU-hosted analytics tool. No consent banner needed, 100% of visitor data captured.
  • Consent kills data: 30–70% of users decline cookie consent, making your GA4 data unreliable.
  • Enforcement is real: Meta fined 1.2 billion EUR, TikTok fined 345 million EUR. Small businesses are not immune.

What GDPR Actually Requires

When it comes to analytics, GDPR cares about five key principles:

5 GDPR requirements for analytics: lawful basis for processing such as consent or legitimate interest, data minimization to collect only what you need, purpose limitation preventing use of analytics data for ads, storage limitation with defined retention periods, and data subject rights including access correction and deletion

1. Lawful Basis for Processing

You need a legal reason to collect data. For analytics, this usually means:

Here is the key insight: if your analytics tool does not collect personal data, you may not need consent at all.

2. Data Minimization

Only collect what you actually need. This is where traditional analytics tools fail — they collect everything by default, including data you will never use.

3. Purpose Limitation

Data collected for analytics cannot be used for advertising (unless you have separate consent). This is exactly why Google Analytics is problematic — Google uses the data for their ad network.

4. Storage Limitation

Do not keep data forever. Most privacy-focused analytics tools automatically aggregate or delete old data.

5. Data Subject Rights

Users can request access to, correction of, or deletion of their data. If you are not storing personal data, this becomes much simpler.

Why Google Analytics Fails GDPR

In 2022, Austrian, French, and Italian data protection authorities ruled that Google Analytics violates GDPR. Here is why:

GA4 attempted to address some issues, but the fundamental problem remains: data goes to Google servers in the US. For a detailed comparison of GA4 vs a privacy-first alternative, see our Matomo vs GA4 guide.

Important
GA4’s “IP anonymization” happens after the full IP address reaches Google’s servers. The data transfer itself — the act of sending the IP to a US server — is already non-compliant under GDPR.

The Two Paths to Compliance

You have two options for GDPR-compliant analytics:

Two paths to GDPR-compliant analytics: Path 1 is consent-based where you can use any tool but need explicit consent before tracking and lose 30-70% of data from rejections. Path 2 is privacy-first with no consent needed, 100% of visitors tracked, using tools like Plausible Fathom or Matomo

Path 1: Consent-Based (Any Tool)

You can use any analytics tool if you:

  1. Get explicit, informed consent BEFORE loading any tracking scripts
  2. Allow users to easily withdraw consent
  3. Do not track users who decline
  4. Have a Data Processing Agreement (DPA) with your provider
  5. Implement appropriate data transfer safeguards (for US tools)

The problem: 30–70% of users decline consent. Your data becomes unreliable.

Path 2: Privacy-First (No Consent Needed)

Use analytics that do not collect personal data:

The benefit: Track 100% of visitors legally, without consent banners.

Pro Tip
Path 2 (privacy-first) is the recommended approach for most websites. You get better data (no consent drop-off), lower legal risk, and a cleaner user experience. See our 5 best privacy-first analytics tools for detailed comparisons.

GDPR-Compliant Analytics Tools

These tools are designed for GDPR compliance from the ground up:

Tier 1: No Consent Required

These tools do not collect personal data under GDPR definitions:

Plausible — EU-owned, EU-hosted, no cookies, no personal data, open source. From 9 EUR/month.

Simple Analytics — Netherlands-based, official GDPR compliance documentation, no tracking whatsoever. From 19 EUR/month.

Fathom — EU isolation option (Frankfurt servers), no cookies, Digital Services Act compliant. From $15/month.

Tier 2: Self-Hosted (You Control Data)

Umami — Free, open source. Host on your EU servers. No cookies by default.

Matomo — Most feature-rich alternative. Can be configured for no-consent tracking. Officially recommended by French DPA (CNIL). Self-hosted or EU cloud. See our detailed Matomo vs GA4 comparison.

Tier 3: Requires Consent

These can be compliant but require proper consent management:

Step-by-Step Setup Guide

Here is how to implement GDPR-compliant analytics:

Step 1: Choose Your Approach

Ask yourself:

Recommendation: Start with privacy-first. You can always add consent-based tools later for specific use cases.

Step 2: Remove Existing Tracking

Before adding new analytics, remove any non-compliant tracking:

  1. Remove Google Analytics scripts
  2. Remove Facebook Pixel (unless consent-gated)
  3. Check for hidden trackers in themes/plugins
  4. Audit third-party scripts

Use Blacklight to scan your site for hidden trackers.

Step 3: Install Privacy-First Analytics

For Plausible (example):

<script defer data-domain="yourdomain.com"
  src="https://plausible.io/js/script.js"></script>

Add this to your site’s <head>. No cookie banner needed.

Step 4: Update Your Privacy Policy

Your privacy policy must explain:

Key Insight
Example privacy policy text for cookieless analytics: “We use Plausible Analytics to understand how visitors use our website. Plausible does not use cookies and does not collect any personal data. All data is aggregated and anonymous. Data is processed in the EU.”

Step 5: Configure Cookie Banner (If Needed)

If you are using consent-based analytics or other cookies:

Recommended CMPs: Cookiebot, Osano, CookieYes.

Step 6: Document Everything

GDPR requires documentation. Create a record of:

Common Mistakes to Avoid

5 GDPR analytics mistakes to avoid: loading tracking scripts before consent is given, using pre-checked consent boxes which do not count as valid consent, implementing cookie walls that block site access, assuming IP anonymization makes GA4 compliant when the transfer itself violates GDPR, and ignoring hidden third-party tracking scripts in themes and plugins

1. Loading Scripts Before Consent

The tracking script runs the moment your page loads — before the user can click “Accept.” This is illegal under GDPR.

2. Pre-Checked Consent Boxes

Consent must be a clear affirmative action. Pre-checked boxes do not count.

3. Cookie Walls

“Accept cookies or leave” is not valid consent. Users must be able to use your site without agreeing to non-essential cookies.

4. Assuming “Anonymized” = Compliant

GA’s “IP anonymization” happens after the full IP reaches Google’s servers. The data transfer itself is already non-compliant.

5. Ignoring Third-Party Scripts

That free WordPress plugin might be loading tracking scripts. Audit everything. Our analytics audit checklist covers the full process.

Enforcement Reality Check

Is GDPR actually enforced? Yes, increasingly so:

Small businesses are not immune. The Austrian DPA has fined small websites for GA violations.

Compliance Checklist

Use this checklist to verify your setup:

Frequently Asked Questions

Can I use Google Analytics and be GDPR compliant?

It is possible but difficult. You need: explicit prior consent via a CMP, EU data residency settings, Consent Mode v2 properly configured, a signed DPA with Google, and valid data transfer safeguards. Even then, 30–70% of users will decline consent, making your data unreliable. For setup details, see our GA4 setup guide.

Do cookieless analytics tools still need a consent banner?

No — not for the analytics tool itself. Tools like Plausible, Fathom, and Simple Analytics do not collect personal data and do not use cookies, so they operate under legitimate interest. However, if you have other scripts that use cookies (marketing pixels, chat widgets), you still need a consent banner for those.

Is self-hosted Matomo GDPR compliant without consent?

Yes, when properly configured: disable cookies, anonymize IP addresses fully (at least 2 bytes), enable “Respect Do Not Track” setting, and host on EU servers. The French DPA (CNIL) officially lists Matomo as a tool that can be used without consent under these conditions.

What about Consent Mode v2 in GA4?

Consent Mode v2 adjusts how GA4 tags behave based on user consent. In Advanced Mode, GA4 sends cookieless pings even when consent is denied, which Google uses for behavioral modeling. This improves data coverage but does not eliminate the underlying GDPR concerns about data transfers to US servers.

How much do GDPR fines actually cost?

Maximum fines are 20 million EUR or 4% of global annual revenue, whichever is higher. In practice, fines for analytics violations have ranged from thousands to millions of euros. The reputational damage and legal costs often exceed the fine itself.

Does GDPR apply if my audience is outside the EU?

GDPR applies if you offer goods or services to EU residents OR monitor the behavior of EU residents — regardless of where your business is located. If any EU visitors reach your site, GDPR technically applies to their data.

GDPR compliance is not just about avoiding fines — it is about building trust with your users. The easiest path? Switch to privacy-first analytics. You will get better data, lower legal risk, and a cleaner website. For the full analytics landscape, see our complete web analytics tools guide.

L
Leonhard Baumann

Web Analytics Consultant

Web analytics consultant with 10+ years of experience helping businesses make data-driven marketing decisions. Former Senior Analytics Lead at a Fortune 500 company, now focused on privacy-first analytics solutions and helping companies move beyond Google Analytics.

View all articles →