Web

Web

•

•

Does your website need a cookie banner?

If people in the EU or UK visit your website and it uses cookies or similar tools for analytics, advertising pixels or embedded third-party services…

Tocnis

Tocnis

Web and app development

A stack of cookies sitting on top of a white plate

Table of contents

Share

Last checked:
Cover photo: Nancy Ingersoll on Unsplash

If people in the EU or UK visit your website and it uses cookies or similar tools for analytics, advertising pixels or embedded third-party services, you need to ask for their consent before those tools run, and a cookie banner is the usual way to do it. If your site only uses cookies it strictly needs to work, such as a login or a shopping cart, no consent is needed, though you still have to explain them. The US has no general cookie banner law, but California requires businesses above certain thresholds that "sell or share" data through ad tracking to offer an opt-out and honor the browser opt-out signal called Global Privacy Control.

What does the law actually require?

In the EU the rule comes from Article 5(3) of the ePrivacy Directive. It says storing information on a visitor's device, or reading information already stored there, is only allowed if the visitor has given consent after getting "clear and comprehensive information" about the purpose. A cookie is the best known example, but the rule covers any storage or access on the device, so it also reaches local storage and similar tracking tools.

There are two exceptions. Consent is not needed for storage used only to carry a communication across the network, or for storage that is "strictly necessary" to provide a service the visitor explicitly asked for. Each EU country writes this into its own law, so details and enforcement differ from country to country.

The EU's top court tightened the rule in the Planet49 case of October 1, 2019. It ruled that a pre-ticked box the user has to untick is not consent, and that the rule applies whether or not the stored information counts as personal data. It also said visitors must be told how long cookies last and whether third parties can access them.

The UK kept the same basic rule in its Privacy and Electronic Communications Regulations (PECR), but the Data (Use and Access) Act 2025 rewrote it and added new exceptions, which came into force on February 5, 2026. Those are covered below.

Which cookies need consent, and which don't?

The EU's most detailed list is still Opinion 04/2012 from the Article 29 Working Party, the group of national regulators that came before today's European Data Protection Board (EDPB). It is from 2012 and predates the GDPR, so treat it as a guide to how regulators think rather than the final word.

What the cookie or tool doesExampleEUUK since February 5, 2026
Remembers what a visitor entered or chose during a visitShopping cart, form progressNo consent neededNo consent needed
Keeps a visitor logged in, or protects the loginSession login cookie, security checksNo consent needed for the sessionNo consent needed
Spreads traffic across serversLoad-balancing cookieNo consent neededNo consent needed
Remembers a display preferenceLanguage or layout choiceNo consent needed if short-livedNo consent needed, but you must explain it and offer a simple way to object (Schedule A1, para 6)
Measures how the site is usedVisitor statisticsConsent needed, with narrow national exceptions (see next section)No consent needed if strict conditions are met (Schedule A1, para 5)
Advertising and retargetingMeta Pixel, Google Ads tagsConsent needed, including the ad tools' "operational" cookiesConsent needed
Social media tracking through embedded buttonsShare and like buttons that track non-membersConsent neededConsent needed

The 2012 opinion is blunt about advertising. It says third-party advertising cookies "cannot be exempted from consent," and neither can the related cookies ad networks use for things like frequency capping or click fraud detection. It also warns that a cookie used for several purposes only escapes consent if every one of those purposes is exempt.

In practice, if a tool on your site exists to measure, advertise or track, assume it needs consent in the EU unless a regulator's specific exception covers it.

Does Google Analytics or other analytics need consent?

In most of the EU, yes. France is the clearest example of a country that allows an exception, and its conditions are tight. The French regulator, the CNIL, says in its guidance on analytics (dated June 11, 2020) that audience measurement cookies are exempt only if visitors are told and can object, the tool is used only for measurement or A/B testing, the data is not combined with other data, it serves a single site, the last part of the IP address is removed, and the cookie lasts no more than 13 months. The CNIL adds that "most large audience measurement offerings do not fall within the scope of the exemption," and points to self-configured open-source tools such as Matomo as an option.

The UK has gone further. Under the new Schedule A1, paragraph 5, you can collect statistics about how your site is used without consent, but only if all of these hold:

  • the only purpose is to collect statistics on how your service or website is used, so you can improve it

  • the data is not shared with anyone except to let them help you make those improvements

  • visitors get clear and comprehensive information about it

  • visitors get a simple, free way to object, and haven't objected

Whether a particular tool meets the "not shared" condition depends on what the provider does with the data, so check the provider's terms against that wording before relying on the exception. This section quotes the law itself, not the UK regulator's (the ICO's) reading of it, so check the ICO's guidance before relying on it.

What makes a cookie banner valid?

A banner that only has an "Accept" button, or that makes refusing harder than accepting, is the most common failure. In January 2023 the EDPB published the report of its Cookie Banner Taskforce, which set out the minimum positions EU regulators agreed on when handling complaints from the privacy group noyb. The main points:

  • No cookie that needs consent may be set before the visitor gives it, and consent needs a positive action.

  • A "vast majority" of regulators said a banner with an accept button but no reject option on the same layer breaks the law. A few disagreed, so this is the majority view rather than a unanimous one.

  • Pre-ticked boxes in the settings layer don't count as consent.

  • A reject option hidden as a plain link inside a paragraph of text, or placed outside the banner, does not give valid consent.

  • There is no fixed rule on colors, but a reject button with text so faint it can't be read is misleading.

  • Labeling advertising cookies as "essential" or claiming a "legitimate interest" for ad profiling deeper in the banner was also flagged.

The report says these are a minimum, and national regulators can ask for more.

Two French fines from September 2025 show what regulators look at. The CNIL fined Shein €150 million because advertising cookies were placed as soon as visitors arrived, before they touched the banner, the banner didn't say the cookies were for advertising, the settings layer didn't name the third parties placing them, and clicking "Refuse all" did not stop cookies from being placed and read. On the same day it fined Google €325 million in total, partly because refusing personalized ad cookies when creating an account was harder than accepting them until October 2023. These are very large companies, but the failures (cookies before consent, a reject button that doesn't work) are ones any site can have.

What is Google Consent Mode v2, and do you need it?

Consent Mode is not a banner. It is a setting in Google's tags that passes the visitor's choice from your banner to Google Analytics and Google Ads, so the tags behave accordingly. Google updated it in November 2023 with two new signals, ad_user_data and ad_personalization, on top of the existing ad_storage and analytics_storage. This updated version is what people call v2.

Google's EU user consent policy already requires sites using its products to get valid consent from visitors in the EEA, the UK and Switzerland, keep records of consent, and tell visitors how to withdraw it. According to Google Ads Help, advertisers who want to use ad personalization, remarketing or measurement with EEA traffic must collect consent and send these signals to Google. If you use a Google-certified consent tool, the provider handles the signals. If you built your own banner, you need to set up Consent Mode yourself. If you don't run personalized ads and already use Consent Mode, Google says no action is needed.

There are two ways to run it. In basic mode, Google tags don't load at all until the visitor makes a choice. In advanced mode, the tags load with consent set to "denied" and send what Google calls cookieless pings, which Google uses to estimate the conversions you can't see. Advanced mode gives Google more to work with, but it also means data goes to Google before the visitor has chosen anything, so check it against your regulator's view of what counts as access before consent.

What about visitors from the US?

There is no federal cookie consent law, and US state laws mostly work on an opt-out basis rather than asking first. California is the main one to know. The California Consumer Privacy Act applies to for-profit businesses that do business in California and meet any one of these: gross annual revenue over $25 million (the figure the Attorney General's page gives; the law allows it to be adjusted for inflation), personal information of 100,000 or more California residents or households, or half or more of revenue from selling personal information.

A covered business that sells or "shares" personal information must show a "Do Not Sell or Share My Personal Information" link and treat a browser's Global Privacy Control signal as a valid opt-out. Ad tracking can count. In August 2022 Sephora paid $1.2 million after California's Attorney General said letting third-party companies put tracking software on its site and app was a sale of data, and that Sephora ignored Global Privacy Control signals.

Other US states have their own privacy laws, and this article doesn't cover them. The UAE's data protection law has its own article on this blog.

Are the EU rules about to change?

Possibly. On November 19, 2025 the European Commission proposed a "digital omnibus" package that would, in its words, "reduce the number of times cookie banners pop up" and let people give consent with one click and save their cookie preferences in browser settings. A Commission proposal has to be agreed by the European Parliament and the member states before it becomes law, so the rules above still apply until a final text is adopted and takes effect.

How do you check your own site?

  1. Open your site in a private browser window and, before clicking anything on the banner, open the browser's developer tools (in Chrome, right-click, choose Inspect, then the Application tab and Cookies). Anything listed there besides strictly necessary cookies was set before consent.

  2. List every third-party tool on the site: analytics, ad pixels, chat widgets, embedded videos and maps, booking widgets and fonts loaded from other servers. Each may set cookies or read from the device.

  3. Sort each one into strictly necessary, preferences, statistics or advertising, using the table above.

  4. If anything falls outside strictly necessary and you have EU or UK visitors, use a consent tool that blocks those scripts until the visitor accepts, with "Reject" as easy to find and click as "Accept."

  5. Click "Reject," reload the page and check the cookie list again. The Shein fine came partly from cookies still being set after refusal.

  6. Give visitors a way to change their mind later, such as a link in the footer, and keep a record of consents, which Google's policy requires if you use its products.

  7. If you run Google Ads or use Google Analytics data for ads, confirm Consent Mode is sending all four signals.

  8. If California's thresholds apply to you, add the opt-out link and confirm your site responds to Global Privacy Control.

Tocnis builds websites and sets up analytics and ad tracking, so it has an interest in this work being done properly. A small site with no analytics, no ad pixels and no third-party embeds can honestly skip the banner and simply explain its cookies in a privacy notice.

Sources

More from the blog

Have something in mind?

The first call is free.