Cookie consent
Is Google Analytics GDPR compliant?
By the Kiescy teamUpdated 5 min readChecked against the official text on
In 2022, headlines across Europe announced that Google Analytics was "illegal". Website owners panicked, some switched tools, and many simply carried on and hoped for the best. Since then, Google replaced the old version of Analytics with GA4, and the EU and US agreed a new framework for transferring data.
So where does that leave you today? The honest answer is that Google Analytics 4 can be used in line with the GDPR, but not straight out of the box. This guide explains what happened, what changed, and the exact steps to set GA4 up properly.
The short version
Google Analytics 4 can be used in line with the GDPR, but only if you set it up properly: ask for consent before it sets cookies, accept Google's data processing terms, choose sensible settings (data retention, Google signals, no personal data in URLs) and explain it in your privacy and cookie policies. The 2022 rulings were about data being sent to the US; the EU–US Data Privacy Framework, in place since July 2023, now covers transfers to Google.
Words you'll see in this guide (5)
- GA4:
- Google Analytics 4, the current version of Google Analytics. It replaced Universal Analytics in 2023.
- Data transfer:
- Sending personal data from the EU to another country, such as the US. The GDPR only allows it with proper safeguards.
- Data Privacy Framework (DPF):
- The EU–US agreement, adopted in July 2023, that allows data to flow to certified US companies, including Google.
- Consent Mode:
- A Google feature that tells Google tags whether a visitor agreed to cookies, so they behave accordingly.
- Google signals:
- A GA4 setting that links visits to signed-in Google accounts for cross-device reports and advertising features.
On this page
What happened in 2022
In July 2020, the EU's top court struck down the "Privacy Shield" agreement that had allowed personal data to flow freely to the US, in a case known as Schrems II. The court was concerned that US intelligence agencies could access Europeans' data.
Privacy campaigners then filed complaints against websites using Google Analytics. In 2022, regulators in Austria, France, Italy and Denmark agreed: the specific websites they looked at broke the GDPR by sending visitor data (including IP addresses and cookie IDs) to Google in the US without adequate protection.
Importantly, those decisions were about data transfers, and about the old Universal Analytics. They didn't say analytics itself was banned.
What changed since
- GA4 replaced Universal Analytics in July 2023. Google says GA4 doesn't log or store IP addresses for traffic from the EU and offers more privacy settings.
- The EU–US Data Privacy Framework was adopted in July 2023, and Google is certified under it, so transfers to Google have a legal basis. On 3 September 2025 the EU General Court rejected a challenge to the framework (Latombe, T-553/23). An appeal is pending at the Court of Justice (C-703/25 P), so the question isn't closed for good.
- Consent Mode v2 became required by Google for advertisers in Europe in 2024, making it easier to respect visitors' choices.
None of this removes the need for consent. That requirement comes from the ePrivacy rules on cookies, separately from the transfer question.
How to use GA4 in line with the GDPR: step by step
- Ask for consent first. No Google Analytics cookies or measurement before the visitor accepts analytics. Use a cookie banner with a clear Reject option.
- Turn on Consent Mode v2 so Google tags know the visitor's choice. Set all signals to "denied" by default and update them when the visitor chooses.
- Accept Google's data processing terms in GA4: Admin → Account settings → Data processing terms.
- Shorten data retention. Admin → Data collection and modification → Data retention. Two months is the default; use the shortest period that works for you (the maximum on the free version is 14 months).
- Decide about Google signals. If you don't use GA4's advertising features, leave Google signals off.
- Keep personal data out. Never send names or email addresses in page URLs, event names or parameters. Check your form confirmation pages and search results pages.
- Disclose it. Mention Google Analytics in your privacy policy and list its cookies (_ga and _ga_<ID>, both lasting two years) in your cookie policy.
A common leak
A booking site sent visitors to a confirmation page like /[email protected]. GA4 recorded every one of those URLs, so the site was sending email addresses to Google. Removing the email from the URL fixed it.
Basic or advanced Consent Mode?
In basic mode, Google tags don't load at all until the visitor agrees. In advanced mode, tags load straight away but, before consent, only send "cookieless pings" without identifiers, which Google uses to model missing data.
Some European regulators question whether advanced mode's pings are allowed without consent, so many sites with EU visitors use basic mode. Read Consent Mode v2: basic vs advanced for the trade-offs.
How to check your setup
- Open your site in a private browser window and click Reject.
- Open developer tools (F12) → Network and search for
collect. In basic mode you should see no requests to google-analytics.com. In advanced mode, requests should showgcs=G100. - Accept cookies and check again: requests should now show
gcs=G111.
Or let the free privacy check do it automatically. Full instructions: how to check Consent Mode v2.
What about GDPR-friendly alternatives?
Several analytics tools are hosted in the EU and designed to work without cookies or personal data. Some regulators (for example France's CNIL) allow certain configurations to run without consent. They're worth considering if you only need simple statistics. Check each tool's setup against your regulator's guidance rather than relying on marketing claims.
Questions
Is Google Analytics illegal in the EU?
No. The 2022 decisions concerned specific websites using the old Universal Analytics before the Data Privacy Framework. GA4 with consent, sensible settings and disclosure is widely used in the EU.
Do I need consent for Google Analytics?
Yes, in the EU and UK, because GA sets non-essential cookies. In the US, you don't need opt-in consent, but you should disclose it in your privacy policy.
Does GA4 store IP addresses?
Google says GA4 doesn't log or store IP addresses for EU traffic. It still processes them briefly to estimate location, which is why consent and disclosure still matter.
Do I need consent for Google Analytics in the UK?
Since 5 February 2026 the UK allows analytics without consent if it's used only to improve your own site, you explain it, and you offer an opt-out. Standard GA4 may not qualify, because Google can use the data for its own purposes; practitioners suggest it can only come close with data sharing and Google signals switched off. The ICO hasn't ruled on GA specifically, so asking for consent remains the safe choice.
What cookies does Google Analytics 4 set?
Mainly _ga and _ga_<container-ID>, both lasting two years by default.
Sources
The facts in this guide come from these official sources, last checked on . We review the guide whenever they change.
Check your Google Analytics setup
Our free check loads your site without consent and shows whether Google Analytics fires anyway, and what Consent Mode signals it sends.
Open the free toolThis guide explains the law in general terms and isn't legal advice. Laws change and how they apply depends on your situation; for high-risk processing, ask a lawyer.