Laws
Cookie Banner Requirements Under GDPR (With Examples)
The nine things a GDPR cookie banner needs: prior consent, a first-layer reject, no pre-ticked boxes, granular choices, easy withdrawal and records.
By the allowedit team · · 9 min read
The short answer
- Under the GDPR and the ePrivacy rules, non-essential cookies need consent that is freely given, specific, informed and unambiguous, before they're set.
- Regulators expect a reject option on the first layer that's as easy and as visible as accept, and no pre-ticked boxes.
- Visitors must be able to withdraw consent as easily as they gave it, which in practice means a link or button to reopen the settings.
- You must be able to show consent was given, so keep a record of each choice.
A GDPR-compliant cookie banner blocks every non-essential cookie until the visitor actively agrees, offers a reject option on the first layer that's as easy as accepting, lets people choose by category, and lets them change their mind later. It explains what each category does, never uses pre-ticked boxes, and you keep a record of each choice. Those rules come from the GDPR's definition of consent combined with the ePrivacy Directive, as read by the courts and the regulators.
Below are the nine requirements, where each one comes from, and what a good and a bad version look like.
Where do the cookie rules come from?
Two laws work together:
- The ePrivacy Directive, Article 5(3): storing or reading information on a user's device needs consent, unless it's strictly necessary for a service the user asked for. Each EU country has its own version in national law.
- The GDPR: defines what valid consent is (Article 4(11) and Article 7) and covers the personal data the cookies collect.
Consent under the GDPR must be freely given, specific, informed and unambiguous, given by a clear affirmative action. Every requirement below follows from those words.
The European Data Protection Board (EDPB) published its consent guidelines (05/2020) and, in January 2023, a report from its Cookie Banner Taskforce. That report records where national regulators agree on common banner practices. It's the closest thing to a shared checklist.
The nine requirements
1. Nothing non-essential before consent
Analytics, advertising pixels, heatmaps and most embeds must not load until the visitor agrees. A banner that shows a message while Google Analytics and the Meta Pixel are already running doesn't meet the rule, however good it looks.
This is the most common failure in practice. The banner exists, but the scripts load anyway. Fixing it means blocking scripts until consent, either automatically or by marking them up.
2. A real choice on the first layer
Visitors must be able to refuse as easily as accept. The Taskforce report recorded that most regulators consider a banner without a reject (or equivalent) option on the first layer to be a breach. France's CNIL fined Google and Facebook a combined €210 million in January 2022 because refusing took several clicks while accepting took one.
Good: Accept all, Reject all and Customise side by side. Bad: Accept all, plus a small "Settings" link where reject is two screens deep.
We cover the details in the Reject all button rules.
3. No deceptive design
The Taskforce flagged several patterns as likely to mislead:
- A reject option that's a plain text link next to a bold accept button.
- Colours or contrast that make reject hard to see.
- Claiming cookies are "essential" when they aren't.
- Using "legitimate interest" for cookies that need consent.
Equal prominence doesn't mean identical buttons, but reject must be just as easy to see, read and click.
4. No pre-ticked boxes
In Planet49 (case C-673/17, October 2019), the EU's Court of Justice ruled that a pre-ticked checkbox isn't valid consent, and that the rule applies to cookies whether or not the data is personal. Every optional category must start switched off.
5. Specific choices by purpose
Consent must be specific. Visitors should be able to accept analytics but refuse marketing. The usual structure is four categories:
| Category | Examples | Needs consent? |
|---|---|---|
| Necessary | Login session, cart, security, the consent cookie | No |
| Preferences | Language, region, saved settings | Usually |
| Analytics | Google Analytics, Matomo (standard setup), Clarity | Yes |
| Marketing | Meta Pixel, Google Ads, TikTok, LinkedIn, YouTube embeds | Yes |
6. Clear information
Informed consent means people know what they're agreeing to. The banner should say, in plain words, what you use cookies for. The preferences panel should describe each category, and your site should have a cookie declaration listing each cookie, who sets it, its purpose and its duration.
Keep the first layer short. A long paragraph of legal text isn't more informed, it's less read.
7. Continuing to browse isn't consent
Scrolling, clicking elsewhere or closing the banner doesn't count. Consent has to be a clear affirmative action, like pressing Accept. The EDPB's consent guidelines say this directly.
That also means a banner that disappears on scroll and treats it as acceptance is a breach.
8. Easy withdrawal
Article 7(3) of the GDPR says withdrawing consent must be as easy as giving it. In practice, that means a persistent way to reopen the preferences: a small floating button, or a "Cookie settings" link in the footer that works on every page. When someone withdraws, the trackers should stop on the next page view.
9. Proof of consent
Article 7(1) says the controller must be able to demonstrate consent. Keep a record of each choice: when it was made, what was chosen and which version of the banner the visitor saw. That record should avoid storing more personal data than it needs. Our post on proof of consent explains what to keep.
What do national regulators add?
The core is the same everywhere, but each country's regulator has its own guidance. A few well-known points:
- France (CNIL): reject must be as easy as accept; it recommends keeping a choice (including a refusal) for about six months before asking again.
- Germany (TDDDG, formerly TTDSG): the German version of Article 5(3), applied strictly. German courts have also ruled against banners that nudge toward accepting.
- UK (ICO, under PECR): the same consent standard; the ICO has written to many large sites about missing reject buttons.
- Ireland, Netherlands, Italy, Spain: all publish cookie guidance aligned with the EDPB's, with minor differences in wording.
If you serve one main market, read your own regulator's page once. It's usually shorter than you expect.
What about Google Analytics and Consent Mode?
Standard Google Analytics needs consent in the EU. Google also requires Consent Mode v2 signals from EEA traffic before it uses that data for ad personalisation, so the banner has to tell Google's tags what was chosen. Consent Mode is Google's rule, not the GDPR, but you'll want both.
What does a compliant banner look like?
A short example of first-layer text:
We use cookies to run this site and, if you agree, to measure visits and show relevant ads. You can accept all, reject all, or choose. You can change your mind any time in Cookie settings.
Then three equal buttons: Accept all, Reject all, Customise. Customise opens a panel with the four categories, each with a switch (necessary is always on and can't be turned off), a description, and the list of cookies in it.
How allowedit covers each requirement
| Requirement | How allowedit handles it |
|---|---|
| Nothing before consent | Auto-blocking of 40+ known trackers, plus manual data-category scripts and your own URL rules |
| Reject on the first layer | Reject all shown by default, with the same style as Accept |
| No pre-ticked boxes | Every optional category starts off |
| Specific choices | Necessary, preferences, analytics and marketing |
| Clear information | Editable text in 7 languages, and a cookie declaration that updates after each scan |
| Withdrawal | A floating Cookie settings button, and links with href="#cookie-settings" |
| Proof | A consent log with a random consent id, timestamp, choices, banner version and region, and no IP address |
The region rules apply opt-in to the EU and EEA, the UK, Switzerland and Quebec automatically, so visitors elsewhere can get the lighter treatment their law allows.
What allowedit doesn't do: it doesn't support the IAB Transparency and Consent Framework yet, so if you sell ads through programmatic exchanges that need a TCF string, you'll need a TCF-registered tool. And while the default wording is written to meet the rules above, it's yours to review with your own lawyer. We're not a law firm.
A five-minute self-check
Open your site in a private window and check:
- Does the banner appear before anything else happens?
- Is there a Reject all button on the first screen, as visible as Accept?
- Click Reject all. Do analytics and marketing requests stop? (Check the Network tab, or run the free cookie checker.)
- Can you reopen the settings from every page?
- Are all optional switches off when you open Customise?
If any answer is no, that's the thing to fix first. The full legal background is on our GDPR cookie consent page.