Website care7 min read

Cookie consent banners: what GDPR and UK rules require

Cookie consent banner guide: what GDPR, PECR, the ICO and CNIL expect, equal reject buttons, no pre-ticked boxes, Consent Mode v2 and testing that tags wait.

DDawnwire team
Design, web and motion studio in Dubai
A laptop on a desk beside a mug and a plate of cookies
Photo: Olu Eletu, StockSnap (CC0)

A cookie consent banner asks visitors for permission before your website sets non-essential cookies, such as advertising and most analytics tags. Under EU rules (the ePrivacy rules and GDPR) and UK rules (PECR and UK GDPR), consent must be a clear, active choice, refusing should be as easy as accepting, boxes must not be pre-ticked, and the tags must actually wait until the visitor agrees.

This guide covers what the rules require in plain words, which cookies need consent, how to design a compliant banner, Google Consent Mode v2, choosing a tool and testing that it works. It is general information, not legal advice: rules differ between countries and are changing, particularly in the UK, so check your regulator's current guidance.

Key takeaways

  • Under EU and UK rules, non-essential cookies such as advertising and most analytics tags need consent before they are set; strictly necessary cookies do not.
  • Regulators including the ICO and France's CNIL expect refusing to be as easy as accepting, and the 2019 Planet49 ruling confirmed that pre-ticked boxes are not valid consent.
  • Advertisers using Google services for users in the EEA have needed Consent Mode v2 signals since March 2024.
  • A banner is only half the job: test that tags really wait for consent, and keep records of what each visitor chose.

What the rules require, in plain words

In the EU, the ePrivacy rules require consent before a website stores or reads information on a visitor's device, unless it is strictly necessary for the service the visitor asked for. GDPR sets the standard for that consent: freely given, specific, informed and unambiguous, given by a clear action, and as easy to withdraw as to give. National regulators interpret and enforce the rules, which is why guidance differs slightly between, for example, France and Germany.

In the United Kingdom, cookies fall under PECR (the Privacy and Electronic Communications Regulations) and UK GDPR, with guidance from the ICO, the UK's data protection regulator. The Data (Use and Access) Act 2025 is changing some cookie rules in stages, so check the ICO's current guidance before you rely on any exemption.

What a compliant banner looks like

Regulators have been consistent on the design points that matter. A banner that follows these is far less likely to draw a complaint:

  • Accept and Reject buttons on the first layer, with equal size, colour and prominence.
  • A Settings or Manage choices option for visitors who want to pick categories.
  • Plain wording that says what each category does and names the main third parties.
  • No pre-ticked boxes, and no consent assumed from scrolling or carrying on browsing.
  • A link to your cookie policy and privacy notice that can be read before choosing.
  • No tags firing before a choice is made.
  • A permanent link or icon, usually in the footer, to change or withdraw consent at any time.
  • Usable with a keyboard and a screen reader, with focus moved to the banner and readable contrast.

Pre-ticked boxes: the Planet49 ruling

In the Planet49 case in 2019, the Court of Justice of the EU ruled that a pre-ticked checkbox is not valid consent for cookies. Visitors must take an active step, such as ticking a box or clicking a button, to agree.

Reject as easy as accept

A banner with a bright Accept all button and a Reject option hidden two layers down nudges people into agreeing, and regulators treat that as a problem. Both the ICO and France's CNIL expect refusing to be as easy as accepting, and the CNIL has taken enforcement action against large websites where refusing was harder. Put both options side by side on the first screen.

Test that your tags really wait

Many sites have a correct-looking banner while the tags behind it fire anyway, often because a tag was pasted straight into the theme rather than added through the consent tool. A ten-minute test catches most of it:

Cookie consent test

  • Open the site in a private browser window, so no earlier choice is stored.
  • Before clicking anything, open the browser's developer tools and check cookies and local storage: only strictly necessary items should be there.
  • Check the Network tab for requests to analytics, advertising or social domains; there should be none yet.
  • Click Reject, reload and browse a few pages: still no tracking cookies or requests.
  • Clear the site data, start again, click Accept and confirm the tags now load.
  • Use the consent link in the footer to withdraw consent, and confirm tracking stops.
  • Repeat on mobile and on key templates such as product, checkout and blog pages.
  • Retest after adding any new plugin, app, pixel or embedded video.
Download the checklist (.txt)

Getting it fixed

If your test shows tags firing before consent, the fix is usually in how they are installed: move them into your tag manager or consent tool, assign each one a consent category and remove duplicates hard-coded into the theme. Our website fixes and care plans cover set-ups like this, and our free website check flags speed, SEO and mobile issues at the same time.

Selling into Germany or the wider EU? Our guides to the Impressum and the European Accessibility Act cover the other legal pages and duties. For the Gulf, see our UAE and Saudi data protection checklist.

Frequently asked questions

Do I need a cookie banner if I only use Google Analytics?

In most EU countries, yes: analytics cookies are not strictly necessary, so they need consent before they are set. Some regulators allow narrowly configured audience measurement without consent under strict conditions, and the UK is changing its rules in stages. If you use a standard Google Analytics set-up, assume you need consent and check your regulator's current guidance.

Is a cookie wall allowed under GDPR?

A cookie wall blocks access to a site unless the visitor accepts tracking. European regulators have generally been critical of them, because consent is not freely given if refusing means losing access. Some accept alternatives, such as a paid option without tracking, under conditions that differ between countries. For most business sites, a normal banner with a clear reject option is the safer choice.

How long does cookie consent last?

GDPR and PECR do not set a single expiry period. Many sites ask again after six to twelve months, or sooner when they add new tools or purposes, and some regulators publish their own recommendations. Whatever you choose, record when consent was given, and let visitors change their choice at any time through a link in the footer.

What is Google Consent Mode v2?

It is Google's framework for passing a visitor's consent choices to Google tags such as Analytics and Ads. Version 2 added signals for whether user data may be sent to Google for advertising and whether ads may be personalised. Google has required these signals for personalised advertising to users in the EEA since March 2024. It works alongside a consent banner, not instead of one.

The Dawnwire Agency Deck

Our process, what each service includes, how we price and hand over, and a selection of real client work, in one free deck.

Next step

Havesomethingworthbuilding?

Tell us what you are building. We will come back with a clear scope, a timeline and a price.