Introduction
Google Analytics is the most widely deployed web analytics platform in the world — and one of the most scrutinised under GDPR. Tens of millions of websites use it to understand visitor behaviour, measure marketing performance, and inform product decisions. But the same data collection that makes Analytics so powerful also creates significant legal obligations under the General Data Protection Regulation and the ePrivacy Directive, particularly when EU or EEA residents are involved.
For most of the period since GDPR came into force in 2018, using Google Analytics in the EU has been legally contested. A series of regulatory decisions between 2022 and 2024 found that standard Google Analytics configurations were incompatible with GDPR because they transferred personal data to the United States without adequate legal protections. Operators scrambled to respond — first by seeking technical workarounds, then by adopting consent mechanisms, and eventually by integrating Google's Consent Mode v2 framework as part of a broader compliance approach.
This guide explains what the regulators actually said and why it matters, walks through the consent requirements that apply to Google Analytics specifically, covers the current best-practice implementation with Consent Mode v2, identifies the most common mistakes operators still make, and shows you how to verify your own implementation is working correctly. Whether you are setting up GA4 for the first time or auditing a long-running installation, this guide gives you the context and practical steps you need.
This article is for educational and informational purposes only. It does not constitute legal advice. GDPR requirements are complex, evolving, and context-dependent. Consult a qualified legal professional for advice specific to your organisation's data processing activities.
Is Google Analytics GDPR Compliant?
The honest answer is: it depends entirely on how you configure and deploy it. Google Analytics 4 (GA4), the current version of the platform, can be configured to help reduce GDPR risk for EU visitors — but the default out-of-the-box configuration is not appropriate for EU traffic without deliberate technical and legal steps that go beyond simply adding the standard `gtag.js` snippet to your website.
The default GA4 installation collects visitor IP addresses (which are personal data), sets persistent first-party cookies containing unique user identifiers, sends that data to Google's servers (many of which are located in the United States), and begins this data collection the moment the page loads — before any consent has been sought or obtained. Each of these elements individually, and certainly in combination, triggers GDPR obligations around legal basis, transparency, data transfer safeguards, and cookie consent.
Google has invested heavily in tools and frameworks to help operators achieve compliance — most significantly through Consent Mode v2 and the updated Data Processing Amendment. These tools are valuable, but they are only effective when properly implemented. A half-configured Consent Mode setup or a consent banner that fires analytics before the user responds can give a false impression of compliance while actually failing the core legal requirements.
The practical upshot is that you cannot simply install Google Analytics and consider the question settled. You need a valid consent mechanism, properly configured script blocking, a signed Data Processing Agreement with Google, Consent Mode v2 configured for EU traffic, appropriate data retention settings, and a way to verify that all of these pieces are working correctly in production. This guide covers each of those elements.
What Regulators Said About Google Analytics
The wave of regulatory decisions on Google Analytics began in Austria in January 2022, when the Austrian data protection authority (DSB) found that a website operator's use of Google Analytics was incompatible with GDPR. The core issue was not consent per se — it was the transfer of personal data (including IP address fragments and unique identifiers) to Google LLC in the United States, which the authority found lacked adequate protection under Chapter V of GDPR following the Court of Justice of the EU's 2020 Schrems II ruling.
Similar decisions followed in quick succession from data protection authorities in France (CNIL), Italy (Garante), Denmark (Datatilsynet), Finland (Tietosuojavaltuutettu), and several other EU member states during 2022. The French CNIL gave operators a three-month grace period to come into compliance and issued formal orders against websites that did not act. The coordinated nature of these decisions — driven largely by complaints filed simultaneously across multiple EU countries by activist organisation noyb — signalled that this was not a one-off enforcement action but a coordinated regulatory priority.
The landscape shifted materially in July 2023 when the European Commission adopted an adequacy decision for the EU-US Data Privacy Framework (DPF). Google LLC certified under DPF, which provided a new legal basis for transfers of personal data from the EU to Google's US-based servers for operators relying on Standard Contractual Clauses or similar mechanisms. This did not end GDPR obligations around Google Analytics, but it addressed the most immediate concern that had driven the 2022 decisions. However, the DPF remains politically contested — a challenge was pending before European courts as of mid-2026 — making consent-based approaches preferable to relying solely on adequacy decisions for future-proofing.
The broader lesson from the regulatory scrutiny is that Google Analytics sits at the intersection of multiple GDPR pressure points simultaneously: international transfers, implicit tracking through cookies, third-party data sharing, and often insufficient transparency toward users. Regulators have shown they are willing to use enforcement tools against this combination, and website operators — not Google — bear primary responsibility as data controllers for how the tool is deployed on their sites.
Regulatory context
Regulatory guidance on Google Analytics has evolved significantly since 2022. The decisions cited here reflect the state of enforcement as of mid-2026, but the legal landscape continues to develop. Monitor your national supervisory authority's publications for updates relevant to your jurisdiction.
Consent Requirements for Google Analytics
Consent for Google Analytics is governed by two overlapping legal frameworks in the EU: the ePrivacy Directive (often called the Cookie Law) and GDPR. The ePrivacy Directive requires prior consent before accessing or storing information on a user's device — which covers the cookies GA4 sets. GDPR then applies to the processing of personal data that follows from that access. In practice, this means you need a valid consent mechanism before GA4 may set cookies or transmit data about an identifiable individual.
Valid consent under GDPR has five key characteristics. It must be freely given — there cannot be a genuine disadvantage to users who decline analytics tracking. It must be specific — analytics consent should be a separate toggle from functional cookies and marketing cookies. It must be informed — users must have a reasonable understanding that analytics tracking involves sending data to Google. It must be unambiguous — an explicit affirmative action is required; implied consent by scrolling, closing a banner, or continuing to browse is not sufficient. And the user must be able to withdraw consent at any time with the same ease as granting it.
For Google Analytics 4, the specific technical requirement is that the `gtag.js` snippet (or equivalent via Google Tag Manager) must not execute until after the user has actively accepted analytics cookies. This is different from simply showing a consent banner on the page while analytics continues to load in the background — a situation that automated scanners frequently detect on real-world websites. The script must be either conditionally injected by your CMP after consent, or initialised with Consent Mode parameters set to 'denied' by default and updated to 'granted' only after explicit user action.
There is also a temporal dimension. Consent must be obtained on every new visit where a prior consent record does not exist or has expired. This means a returning visitor who cleared their cookies has no valid prior consent record, and analytics must again wait for their active choice. The consent record itself (a cookie indicating the user's preferences) is classified as strictly necessary and does not require consent — but the analytics data collection it unlocks does.
Finally, remember that consent is not your only legal obligation around GA4. You also need to disclose Google Analytics use in your privacy policy, name Google as a data processor, link to their privacy policy, explain the categories of data collected and the purpose, and — for EU operators or operators with EU users — ensure your Data Processing Amendment with Google is signed and current.
- Obtain explicit, category-specific consent before any GA4 cookies are set or data is transmitted
- Ensure 'decline' or 'reject all' is as easy and prominent as 'accept all'
- Never use implied consent (scroll, click, or navigation) as a substitute for active opt-in
- Disclose Google Analytics use and Google's role as a data processor in your privacy policy
- Provide a mechanism for users to withdraw analytics consent at any time
- Store a timestamped consent record so you can demonstrate compliance if challenged
- Confirm that withdrawing consent stops GA4 from collecting data during the same session
Google Consent Mode v2
Google Consent Mode is a technical framework that allows GA4 (and other Google tags) to adjust their behaviour based on the consent signals your consent management platform sends. Rather than simply switching off entirely when a user declines consent, Consent Mode enables Google to operate in a reduced, 'cookieless' mode — using aggregate modelling to estimate conversion and traffic data for the consenting user cohort, without storing individual identifiers for users who declined.
Version 2 of Consent Mode, which Google began requiring for EU operations in March 2024 as part of its EEA-specific policies for Google Ads and Google Analytics, introduced two new signal types alongside the existing `analytics_storage` and `ad_storage` parameters: `ad_user_data` (controls whether user data can be sent to Google for advertising purposes) and `ad_personalization` (controls whether personalised advertising is enabled). For operators running GA4 without any advertising integration, the primary signals of interest remain `analytics_storage` and `ad_storage`, but correctly declaring all four signals is considered best practice.
The Consent Mode v2 implementation flow works as follows. When a user arrives on your site, your CMP initialises before the Google tag and sends a default consent state — typically with all signals set to 'denied' for EU/EEA visitors. GA4 receives this signal and enters a restricted mode where it does not set cookies and does not collect personal data. If the user actively accepts analytics tracking, your CMP sends an update signal with `analytics_storage` set to 'granted'. GA4 then activates its full data collection for that session. If the user declines, GA4 continues in the restricted modelling mode for the session.
Consent Mode v2 does not replace your consent banner or exempt you from the requirement to obtain valid consent. It is a downstream technical mechanism that makes the best use of the consent decisions your CMP collects. A poorly designed consent banner — one that uses dark patterns, pre-ticks categories, or fails to clearly explain what analytics tracking involves — does not meet typical consent requirements simply because Consent Mode is wired up correctly. The legal validity of the consent comes from the quality of the consent mechanism, not from the presence of Consent Mode.
For practical implementation, use a CMP that emits Consent Mode v2 signals correctly (defaults denied, updates on choice). GDPRChecker's cookie banner and consent runtime support Consent Mode v2 signalling out of the box. GDPRChecker supports Consent Mode v2 integration and diagnostics, but is not currently a Google Certified CMP or IAB TCF CMP. Whichever CMP you choose, test with Google's Tag Assistant or Consent Mode debugging before going live.
- Choose a [consent management platform](/cookie-consent) that supports Consent Mode v2 signalling
- Configure default consent state to 'denied' for all four parameters for EU/EEA visitors
- Ensure the default state fires before any Google tag loads — typically via a `dataLayer.push` before the GTM snippet
- Wire up your CMP to update consent state after the user makes an active choice in the banner
- Verify the signal flow using Google Tag Assistant's Consent tab or the `?gconsent` debug parameter
- Test that GA4 does not set `_ga` or `_gid` cookies when the user declines analytics consent
- Confirm that modelled conversion data appears in your GA4 reports for declined-consent sessions
- Review your Google Tag Manager container — confirm that tags are triggered by consent-aware triggers, not by default 'All Pages' triggers
- Sign and confirm your Google Analytics Data Processing Amendment in your Google account
- Document your Consent Mode configuration and keep it updated as your CMP or tag management setup changes
Common Google Analytics GDPR Implementation Mistakes
Consent Mode v2 has made a GDPR-oriented Google Analytics setup more achievable than it was in 2022, but it has also introduced a new class of implementation mistakes that are easy to make and hard to detect without dedicated tooling. The following errors appear regularly in technical audits of websites that believe their consent setup is complete.
The most prevalent mistake is initialising the Google tag before the CMP has had a chance to fire the default consent state. This typically happens when the GTM snippet is placed higher in the `<head>` than the CMP initialisation code, or when a page caching layer serves a cached version of the page that has the tag in a different order than the server-rendered version. The result is a brief window — often less than a second — during which GA4 fires without a consent signal and may set cookies or send data. Automated scanning tools and browser-level inspection during slow network conditions can expose this timing issue.
A second common failure is the 'consent banner without script blocking' pattern: a cookie banner is displayed and records consent choices, but the underlying scripts are not actually conditionally loaded based on those choices. The banner and the analytics run in parallel regardless of what the user clicks. This is one of the most frequently observed compliance gaps in automated scans — the banner looks correct to a casual visitor, but the underlying technical behaviour is non-compliant.
Third, many operators configure Consent Mode v2 with the correct default 'denied' state for new visitors but forget to handle the case where a returning visitor's prior consent record has expired or been cleared. In those sessions, the site should again default to denied and present the consent banner — but if the CMP is configured to check for a cookie that no longer exists and then silently fall back to 'granted', returning visitors without a valid consent record may receive full tracking. Always test the experience after clearing all site data in your browser.
- Google tag loading before CMP fires the default consent state (timing/ordering issue)
- Consent banner present but scripts not actually blocked before consent is given
- Consent Mode signals set to 'granted' by default rather than 'denied' for EU visitors
- Using only two of the four Consent Mode v2 parameters (missing ad_user_data and ad_personalization)
- Returning visitor sessions where an expired consent record silently defaults to 'granted'
- Mobile visitors receiving a different (non-compliant) consent experience from desktop visitors
- Tag Manager triggers using 'DOM Ready' or 'Window Loaded' rather than consent-aware triggers
- Server-side GA4 implementations that bypass client-side consent signals entirely
- Data retention in GA4 left at the default 14-month setting without an explicit retention review
- Using Google Analytics User ID feature without a valid legal basis and appropriate disclosure
- Forgetting to re-test after CMS updates, plugin updates, or theme changes that can reset consent configuration
How to Check Your Google Analytics Implementation
Knowing the rules is necessary but not sufficient — you need to verify that your actual implementation behaves as intended. The gap between what a consent configuration is supposed to do and what it actually does in production is often significant, and the only way to close that gap is through structured, repeatable testing.
Start with a manual browser test. Open your site in a private/incognito window to ensure no prior consent cookies exist. Open the browser developer tools network tab before the page loads and filter requests by 'google-analytics.com' or 'analytics.google.com'. Watch what happens as the page loads. If any requests to Google Analytics appear before you have interacted with the consent banner, your implementation has a consent-before-tracking violation. This is the most direct test and should be your baseline check after any site change.
For a more structured check, use Google Tag Assistant (available as a Chrome extension or via tagassistant.google.com). Tag Assistant's Consent tab shows the consent state that was sent to each tag and whether it matched the expected Consent Mode v2 parameters. You can step through the consent flow — seeing the default state, then simulating an accept or decline — and confirm that GA4 activates (or stays inactive) as expected. This is particularly useful for debugging the timing between the CMP initialisation and the Google tag load.
For ongoing monitoring, manual testing is impractical. A site that passes a manual test today can fail tomorrow because of a plugin update, a CDN cache invalidation, or a change made by a different member of your team. GDPRChecker's automated scanning can run on a schedule, checking your site from a clean browser context each time and alerting you when non-essential cookies appear before consent, when new third-party trackers are detected, or when your consent banner configuration regresses. For sites with significant EU traffic, this kind of continuous monitoring is a practical necessity rather than an optional extra.
Beyond browser-level testing, consider reviewing your GA4 data itself for signs of over-collection. If your GA4 reports show sessions with detailed user-level data for users in EU jurisdictions who declined consent, that is a sign that your Consent Mode implementation is not correctly restricting data collection. GA4's geographic and demographic reports can provide a sanity check here — you should see modelled (aggregated) data for declined-consent traffic, not individual session data.
How GDPRChecker Helps
GDPRChecker is built around the practical challenge of verifying and maintaining Google Analytics compliance — and the dozens of other compliance touchpoints that a real website needs to manage simultaneously. The platform scans your website from a clean browser context, checking for the specific behaviours that indicate a compliant or non-compliant analytics setup: whether GA4 fires before consent, whether Consent Mode v2 signals are present and correctly structured, whether the consent banner provides a genuine choice, and whether non-essential cookies appear in the pre-consent state.
The free compliance scanner produces a structured report you can share with your team, your legal counsel, or your clients as evidence of your current compliance posture. It surfaces specific, actionable findings — not just a pass/fail score — so you know exactly which issues to address. For businesses that run multiple websites or need to demonstrate compliance to enterprise clients, GDPRChecker's dashboard provides a centralised view across all monitored sites.
GDPRChecker's cookie consent management platform and cookie banner builder are built with Consent Mode v2 in mind. They support the consent states and runtime blocking workflow needed for a practical GA4 setup, while still requiring teams to verify their own Google tag configuration with Tag Assistant and production scans. This reduces the implementation risk significantly compared to manually wiring up Consent Mode v2 from scratch with a generic banner.
For teams that want to go further, GDPRChecker's runtime monitoring watches your site in production on an ongoing basis — not just when you manually trigger a scan. It detects regressions introduced by CMS updates, plugin changes, or new tags added by marketing teams, and sends alerts before minor issues become significant compliance problems. Combined with the structured onboarding flow and the supporting guides available in this knowledge base, GDPRChecker gives you a practical, maintainable path to keeping Google Analytics compliant in 2026 and beyond.