Privacy laws

Do you need a cookie banner for Google Analytics?

Do you need a cookie banner for Google Analytics? The answer by region: EU, UK and US states, what Google itself requires, and a six-step checklist.

By Hamza Ahmad Aslam

Published

6 min read

Sources checked 13 Nov 2026

A signpost pointing three ways to three regions, with an analytics chart at its base

It depends on where your visitors are. In the EU, Google Analytics cookies are not strictly necessary, so they need consent before they are set. The UK exempts some statistics cookies under conditions, and most US state privacy laws ask for disclosure and an opt-out, not consent in advance.

So "do I need a banner?" is really three questions: where your visitors are, how you have set up Analytics, and what else runs on the page. This guide is general information, not legal advice.

For visitors in the EU and EEA, yes, in practice. Google Analytics sets cookies on the visitor's device, and the EU rule says that needs consent unless it is strictly necessary for a service the visitor asked for.

Google's own help page lists the cookies: _ga and _ga_<container-id>, each with a default lifetime of 2 years (checked 13 November 2026). Article 5(3) of the ePrivacy Directive allows storage without consent only to carry out the transmission of a communication, or where it is strictly necessary to provide a service the user explicitly requested. Measuring how visitors use your site is neither, so consent comes first, and a banner is the usual way to ask for it.

For UK and US visitors the answer can be different, as the next sections explain.

What do the EU, the UK and US states each require?

Each takes a different starting point: the EU asks first, the UK now exempts some statistics, and US state laws mostly let tracking start and require a way to opt out.

Region Starting point for analytics cookies What you need Source
EU and EEA Consent before they are set A consent banner that blocks analytics until the visitor accepts ePrivacy Directive, Art. 5(3); EDPB Guidelines 2/2023
UK Exempt only if the statistics exception's conditions are met Clear information and a free, simple way to object; otherwise consent PECR Schedule A1, para. 5, in force 5 February 2026; ICO guidance, 29 April 2026
California and other US states with privacy laws No prior consent for most cookies Notice at collection, an opt-out of sale or sharing, and honoring opt-out signals such as Global Privacy Control where the law requires it CCPA regulations, effective 1 January 2026

Which rule applies depends on where your visitors are, not only where your business is. A site with visitors in several places can apply each model by region with geo-targeting.

Not having a banner is not itself the breach. Setting non-essential cookies without the consent, information or opt-out the law asks for is.

In the EU, the obligation is to get consent before storing or reading non-essential information on the device; a banner is simply how most sites do it. In California, the CCPA regulations go further the other way: §7026(a)(4) says a cookie banner or cookie controls are not by themselves an acceptable method for opting out of sale or sharing. The CCPA guide explains what California does ask for.

In the EU, not with Analytics cookies. You can load Google Analytics in a way that sets no cookies until consent, which is what Consent Mode does.

With Google Consent Mode and analytics_storage set to denied, Google says its tags don't read or write first-party analytics cookies, but in advanced mode they still send cookieless measurements to Google. In basic mode, nothing is sent until the visitor accepts. Consent Mode is how your banner tells Google the choice; it doesn't replace the choice. The guide to basic vs advanced consent mode covers the difference.

In the UK, the statistics exception may let some analytics run without consent. The ICO's guidance says that to rely on it with a third-party provider, the provider must be a processor, not a joint controller, must only use the information to help you improve your service, and must not link it with other information. Settings that use Analytics data for advertising, such as linking it to an ad you clicked, need consent; the ICO says the exception "does not apply to purposes related to online advertising".

What does Google itself require from sites using Analytics?

Google's EU user consent policy asks for consent where the law requires it. It applies to visitors in the EEA, the UK and Switzerland when your agreement with Google incorporates the policy.

Under it, you must obtain legally valid consent for cookies or other local storage where legally required, and for personalized ads; keep records of consent; and give visitors clear instructions for withdrawing it. Google says it may limit or suspend your use of the product if you don't. Google's Consent Mode is how the choice reaches Google's tags.

Does a small site or a blog need one?

Size doesn't change the EU rule. A personal blog with Google Analytics and EU visitors needs consent before the Analytics cookies are set, the same as a large shop.

US state privacy laws are different: most only apply above revenue or data-volume thresholds, so a small blog may fall outside them entirely. The UK sits in between: a small site using analytics only to improve itself may be able to use the statistics exception, if it meets every condition.

If you would rather not ask at all, the honest options are to remove Analytics, or to use a setup that sets no cookies before consent and accept the gaps in your data.

Checklist: six steps to decide and set it up

  1. Find where your visitors come from. Check Analytics' country report. Any EU or EEA traffic means the EU rule applies to those visitors.
  2. List what sets cookies. Run the free cookie consent checker on your home page. It shows cookies set before consent and tracker tags written into the HTML.
  3. Decide per region. EU and EEA: consent first. UK: consent, or the statistics exception if every condition fits your setup. US: notice and opt-out where state law applies.
  4. Set up the banner by region. Block Analytics until consent where it is required, with Reject as easy as Accept.
  5. Send the choice to Google. Turn on Consent Mode v2 so Google's tags follow the banner, and pick basic or advanced mode.
  6. Test it. Open the site in a private window, check DevTools for _ga before you click anything, then accept and check again.

Common questions

Is Google Analytics 4 cookieless?

No. Google's help page lists _ga and _ga_<container-id> cookies with a 2-year default lifetime. With Consent Mode and analytics consent denied, GA4 stops reading and writing them.

No. Consent Mode passes the visitor's choice to Google. You still need a way to ask for that choice where the law requires it.

Will the EU rule change?

Possibly, but not yet. The EU Digital Omnibus proposals would add some audience-measurement exemptions, under narrow conditions. As of 13 November 2026 they are proposals, and today's rule applies.

What if most of my visitors are in the US?

Then California's rules and other state laws matter more than consent banners. The US privacy laws page covers opt-out controls and Global Privacy Control, and the GDPR cookie consent page covers the EU side for the visitors you do get from there.

See plans with GPC and US-state rules

See the plans

Sources