Do I Need a Cookie Banner for Google Analytics? A UK Guide

by | Nov 21, 2026 | Analytics

Since 5 February 2026, UK websites can use analytics cookies without asking for consent first, as long as five conditions are met. The change came from the Data (Use and Access) Act 2025, and the Information Commissioner’s Office (ICO) finished its guidance on it on 29 April 2026. Whether you still need a cookie banner for Google Analytics depends on how your Google Analytics account is set up and what else your site uses.

This post covers what the new rule allows, where Google Analytics fits, and what to do if you’d rather not have a banner at all.

⚡ The short answer

  • Analytics cookies used only to see how your site is used, so you can improve it, no longer need consent in the UK.
  • You still have to tell visitors about them and give them a simple, free way to object.
  • A third-party analytics provider has to act only on your behalf. If it uses the data for its own purposes, the exception doesn’t apply.
  • Google Analytics can only fit if its data sharing with Google is off and no advertising features are switched on. The ICO hasn’t said whether any particular product qualifies.
  • Advertising cookies, remarketing and most embedded videos still need consent, so many sites will keep a banner anyway.

📅 What changed in 2026

Before 2026, the UK’s cookie rules (the Privacy and Electronic Communications Regulations, or PECR) had only two exemptions: cookies needed to carry a communication, and cookies “strictly necessary” for a service the visitor asked for, such as a shopping basket or a login. Analytics cookies were neither, so every site using them needed consent first.

DateWhat happened
19 June 2025The Data (Use and Access) Act 2025 became law
5 February 2026The new exceptions to the cookie rules came into force, including one for statistics
29 April 2026The ICO finalised its guidance on storage and access technologies

The rules have always covered more than cookies. Anything that stores information on a visitor’s device or reads information from it counts, including local storage. The ICO’s guidance says they apply whenever scripts and tags access or store information on a device.

✅ The five conditions

Schedule A1 of the updated regulations lists them. In plain English, you can store or read information on a visitor’s device without consent when:

  1. It’s for your website or online service. The exception covers websites and apps.
  2. Statistics are the only purpose. You’re collecting information about how the site is used, so you can improve it. Nothing else.
  3. The data isn’t shared, except with someone helping you make those improvements, such as an analytics provider working for you.
  4. You tell visitors clearly and fully what the cookie or storage is for, in words anyone can understand and somewhere easy to find. A cookie policy linked from every page is the usual way.
  5. Visitors can object easily and free of charge, and you stop if they do.

The ICO adds some detail. The exception isn’t for identifying, tracking or monitoring people. It doesn’t cover online advertising. If you use a third-party analytics tool, the provider has to be what data protection law calls a processor: it acts on your instructions and uses the data only to help you improve your site, without linking it to anything else. You also have to tell visitors that you use a third-party provider.

On objecting, the regulations don’t say what a “simple means” looks like. The ICO suggests one option: a cookie settings panel with the statistics switch on by default, which visitors can turn off at any time. It also says you can’t treat a visitor’s browser settings as the only sign that they don’t object, because not everyone uses their browser settings to make that choice.

A four-step check for whether analytics needs a cookie banner for Google Analytics or other tools under the UK statistical purposes exception.
The four checks in order. Any “no” means asking for consent, or fixing the gap first.

🔍 Where Google Analytics fits

Google Analytics 4 sets two cookies, _ga and _ga_<container-id>, which last two years by default. Whether they fall under the new exception comes down to condition 3 and the processor rule, and that depends on settings in your Google Analytics account.

Data sharing settings. Your Google Analytics account settings include a list of data sharing switches. With “Google products & services” switched on, Google can use your data to improve its own products, and Google’s help page says it is then, for data protection purposes, a controller of that data. That’s sharing for someone else’s purposes, which the exception doesn’t allow. Google’s page also says that with all the sharing settings off, your data is only used to provide and maintain the Analytics service.

Google signals. This adds information from visitors who are signed in to a Google account with ad personalisation turned on, and gives you demographic and interest reports. The ICO’s guidance gives a similar case, adding demographic information through a vendor, as an example of when you can’t rely on the exception.

Google Ads links and remarketing. Linking Google Analytics to Google Ads sets extra cookies, and measuring or targeting ads is advertising. That always needs consent.

So a Google Analytics setup that might fit the exception has every data sharing setting off, Google signals off, no Google Ads link, and a cookie policy that says you use Google Analytics, plus a way for visitors to switch it off. Even then, nobody can tell you for certain that it qualifies, because the ICO’s guidance doesn’t name products. If you want certainty, keep asking for consent before Google Analytics loads.

🍪 When you still need a cookie banner

The statistics exception only covers analytics. You still need consent before setting anything else that isn’t strictly necessary, for example:

  • advertising pixels and remarketing tags
  • YouTube and other video embeds that set cookies as the page loads (the ICO suggests a privacy mode where one is available, so nothing is set until someone plays the video)
  • chat widgets and social media buttons, if they set their own cookies

If any of those are on your site, you need a consent tool anyway. The ICO’s rules for it haven’t changed: rejecting has to be as easy as accepting, nothing non-essential runs before the visitor chooses, and doing nothing or carrying on using the site doesn’t count as consent. Your analytics can then sit in that same tool as a statistics switch that’s on by default, which is the ICO’s own example of a simple way to object.

🛡️ Analytics without cookies

The other route is analytics that doesn’t store anything on the visitor’s device. GreenOrb Statistics, the WordPress plugin I make, can run that way.

It has two settings that control what it keeps in a visitor’s browser, under GreenOrb Statistics → Settings & Privacy → Privacy & Data → Storage in your visitors’ browsers:

  • Visitor cookie (greenorb_statistics_visitor, one year) recognises returning visitors.
  • Browser storage keeps a short note in local storage so a quick reload doesn’t count as a second page view.
The Storage in your visitors' browsers settings in GreenOrb Statistics, with the Visitor cookie and Browser storage switches.
The two storage settings, shown at their defaults.

Both are on by default. Switch both off and the plugin stores nothing in the browser. Visitors are then counted with a code made from their IP address and browser details that changes every month. The IP address itself isn’t stored, only scrambled (hashed) versions of it. You lose the ability to recognise someone who comes back in a later month. Totals for sessions and sales stay the same, and page views can read slightly higher because a quick reload counts again.

That doesn’t remove the need to tell visitors. The plugin’s tracking script still reads a few details from the browser, such as screen size and language settings, for its device reports and bot checks, and the ICO’s guidance treats scripts that read information on a device as covered by the rules. Its guidance on fingerprinting also mentions combining browser details with IP addresses, and it doesn’t say whether a code worked out on your own server, like the monthly one above, counts. The safe reading is to rely on the statistics exception and meet its conditions:

  • Tell visitors. The plugin adds suggested text to WordPress’s privacy policy guide (Settings → Privacy) that you can copy into your own cookie or privacy policy.
  • Let them object. It honours the Do Not Track and Global Privacy Control browser signals by default. Because the ICO says browser settings alone aren’t enough, also give visitors a switch: if you run a consent tool, set its statistics category to on by default, connect it through the free WP Consent API plugin, and set GreenOrb Statistics’ Consent mode to Strict. It then records nothing for anyone who turns statistics off. In the default mode it would still count them, without a cookie, so Strict is the setting that respects the switch.
  • Keep it first-party. Visits are recorded in your own WordPress database, not sent to an outside analytics company, so there’s no third-party provider to check.

If you want the least data possible, the plugin’s Anonymous tracking mode counts page views without making any visitor code from the IP address or browser. In return, unique visitor counts aren’t available.

The settings are explained in the settings and privacy guide.

🚫 What this guide doesn’t cover

This is a summary of the UK rules as they stood in November 2026, not legal advice. It doesn’t cover the EU, which has its own rules, or the UK GDPR rules on personal data, which apply alongside the cookie rules. A hashed IP address is still personal data, so your privacy policy needs to cover your analytics whichever route you take. The ICO has also said its approach to enforcing the cookie rules is changing to match UK GDPR, and that page hadn’t been updated when I checked.

If your site sells to customers in the EU, or you’re not sure which cookies your site sets, a cookie scan from your consent tool or a look in your browser’s developer tools is a good place to start.

If you’d like to try it, GreenOrb Statistics has a free version for any WordPress site.

❓ Frequently asked questions

Do I need a cookie banner for Google Analytics in the UK?

Not always since 5 February 2026. Analytics used only to improve your site can run without consent if you tell visitors and let them object, and the provider only works for you. Google Analytics with data sharing, Google signals or Google Ads switched on doesn’t meet that, so it still needs consent.

What is the statistical purposes exception?

A new exception to the UK cookie rules, added by the Data (Use and Access) Act 2025. It lets you store or read information on a visitor’s device without consent when the only purpose is collecting statistics to improve your website or service, you tell visitors, and they can object.

Do I need a cookie banner for local storage?

The rules cover local storage in the same way as cookies. Local storage used only for statistics can use the same exception. Local storage used for advertising or tracking needs consent.

What counts as a simple way to object?

The law doesn’t define it. The ICO suggests a statistics switch in your cookie settings, on by default, that visitors can turn off at any time. Browser settings alone aren’t enough, because not everyone uses them to make that choice.

Can I use Google Analytics without a cookie banner?

Possibly, with data sharing settings off, Google signals off, no Google Ads link, a clear cookie policy and a way to switch it off. No regulator has confirmed that a Google Analytics setup qualifies, so asking for consent first is the safer choice.

Sources

Checked on 21 November 2026.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Affiliate Link
Divi Marketplace

Divi Marketplace

GreenOrb Statistics plugin

“Disclosure: Some of the links in this post are “affiliate links.” This means if you click on the link and purchase the item, I will receive a small affiliate commission.”

Pin It on Pinterest