GDPR Cookie Consent: 2026 Implementation Guide

GDPR Cookie Consent: Implementation Guide

A 2018-era cookie banner may fall short of what EU regulators now enforce. Reject All parity, the audit log shape, and the code patterns for an enforcement review.

A cookie banner built to 2018 standards may fall short of what national DPAs now enforce. This guide covers what changed since 2021 — Reject All parity, the EDPB Cookie Banner Taskforce positions, Google's consent-signal requirement for EEA traffic — and gives you the code, audit log shape, and decision patterns to bring to a 2026 review.

This is the EU-specific implementation article in our cookie compliance topic. The conceptual framework — the four-category model and the trinity of notice, choice, and control — lives in the main guide on web cookies and privacy law.

Why a 2018-era cookie banner may no longer pass

The cookie banner most teams shipped in 2018 was technically GDPR-compliant at the time. Years of enforcement since then have moved the bar.

The EDPB Cookie Banner Taskforce report (January 2023) records the positions national DPAs agreed while coordinating their handling of NOYB's cookie banner complaints — a minimum threshold, not standalone findings. It covers banners with no Reject option on a layer that has an Accept button, pre-ticked boxes, reject options offered only as a link without enough visual emphasis, deceptive button colors and contrast, legitimate-interest claims in deeper layers, cookies wrongly classified as essential, and how users can withdraw consent. Two other patterns were already ruled out in the EDPB's 2020 consent guidelines: scrolling as consent, and cookie walls that make access to a service conditional on consent.

Enforcement has been substantial. CNIL says it has imposed several sanctions since 2020 on organizations that failed to comply with the French rules on advertising cookies, and in September 2025 it fined Google EUR 325M and Shein EUR 150M, in particular for failing to comply with the cookie rules. The Google decision also covered ads shown as emails in Gmail without prior consent, and the Shein decision concerned cookies placed without consent. Earlier, according to the Irish Times' January 2022 report, CNIL fined Google EUR 150M and Facebook EUR 60M because their sites did not let users refuse cookies as easily as accept them. The 2021 Google and Facebook fines, as reported, concerned refusal being harder than acceptance; the 2025 Shein decision concerned cookies placed without consent.

Choice symmetry (is rejection as easy as acceptance) now sits alongside notice quality (do users know what they are consenting to) as an enforcement focus. A banner that informs users well but makes refusal harder than acceptance is the pattern behind the 2021 Google and Facebook fines as reported.

The legal stack: GDPR + ePrivacy + national laws

Three layers of law govern EU cookie consent, and many teams misread which one applies to which question.

GDPR provides the consent definition. Article 4(11) defines consent as freely given, specific, informed, and unambiguous. Article 7 sets accountability requirements — controllers must demonstrate that consent was given, and withdrawal must be as easy as giving consent. These provisions tell you what consent must look like.

The ePrivacy Directive 2002/58 Article 5(3), as amended in 2009, tells you when consent is needed. It allows information to be stored in, or read from, the terminal equipment of a subscriber or user only if that person has given consent, having been provided with clear and comprehensive information, including about the purposes of the processing. The exceptions are storage or access for the sole purpose of carrying out the transmission of a communication, and storage or access strictly necessary for the provider of an information society service explicitly requested by the subscriber or user to provide that service. This is the actual cookie law. The Commission withdrew its 2017 proposal for an ePrivacy Regulation, announcing the withdrawal in the Official Journal on October 6, 2025 (as of Oct 2026, European Parliament Legislative Train), so the directive remains the operative law, applied through each Member State's transposing law.

National implementations diverge. The Taskforce report notes that its common positions must be combined with additional requirements in the national laws transposing the directive and with further guidance from national authorities; CNIL, for example, published cookie guidelines and a recommendation in 2019. A banner compliant with one national DPA may fail another. A practical approach for multi-country sites is to design to the strictest rule among your target markets and document the choice.

Five design requirements your banner should satisfy

Five design requirements follow from the GDPR consent conditions, the EDPB's consent guidelines and Taskforce positions, and national enforcement. The fourth is a recommended practice rather than a legal rule.

  1. Reject All button on the first layer, alongside Accept All. A vast majority of the authorities in the EDPB Cookie Banner Taskforce treated a layer with a consent button but no refuse or reject option as an infringement. On colors and contrast, they agreed that no general standard can be imposed on controllers and that each design is assessed case by case for whether it is obviously misleading. Matching color, size, and position avoids that question, but it is not a rule the Taskforce imposed. CNIL's December 2021 fines on Google and Facebook, as reported, concerned refusal being harder than acceptance.
  2. No pre-ticked boxes for any non-strictly-necessary category. Invalid since CJEU Planet49 (C-673/17) in October 2019.
  3. No legitimate interest tab for advertising or analytics that hides the opt-out. The EDPB Cookie Banner Taskforce said in 2023 that the legal basis for placing or reading cookies cannot be the controller's legitimate interests, and that legitimate-interest options in deeper layers could confuse users.
  4. Granular categories as a recommended practice — strictly necessary, functional, analytics, and advertising as a minimum, with vendor-level disclosure for advertising.
  5. Easy revocation from every page. A persistent floating icon or footer link that opens the same preference panel as the banner. Equivalent friction to giving consent.

Authorities assess each banner case by case, so meeting these five does not guarantee a pass, and missing one is a serious risk rather than an automatic failure.

Implementation pattern: a compliant banner from scratch

A practical architecture is layered consent with build-time inventory.

The first layer shows on first visit: a short notice explaining purpose and categories, plus three buttons of equal visual weight — Accept All, Reject All, Customize. No vendor logos, no pre-ticked boxes, no asymmetric color treatment.

The second layer (Customize) shows per-category toggles defaulted off, with one-line descriptions per category. Advertising includes vendor-level disclosure — a list of third-party processors with a link to each one's privacy policy. A Save Preferences button completes the layer.

The cookie inventory is generated at build time, not discovered at runtime. A static JSON file lists every cookie name, purpose, duration, processor, and lawful basis. A Playwright script crawls the site in CI and flags new cookies that need categorization.

Consent storage is a single first-party cookie or localStorage entry holding category booleans plus a consent identifier for audit lookup. The identifier links to the server-side audit log.

Script gating is the load-time enforcement. Every analytics and advertising script must wait for the consent event before initialization. The pattern is data attribute based — scripts are tagged with a consent category, and a small bootloader reads consent state and decides what to load.

Code: a minimal compliant consent gate

A vanilla JavaScript pattern for script gating, framework-agnostic:

html
<script>
  // 1. Read consent before any third-party script loads
  const consent = JSON.parse(localStorage.getItem('consent') || '{}')

  // 2. Once the page is parsed, load only gated scripts with consented categories
  document.addEventListener('DOMContentLoaded', () => {
    document.querySelectorAll('script[data-consent-category]').forEach(s => {
      const category = s.dataset.consentCategory
      if (consent[category] === true) {
        const real = document.createElement('script')
        real.src = s.dataset.src
        if (s.dataset.async !== undefined) real.async = true
        document.head.appendChild(real)
      }
    })
  })
</script>

<!-- Analytics and ad scripts live in the page as data-attribute placeholders -->
<script
  type="text/plain"
  data-consent-category="analytics"
  data-src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXX">
</script>

The placeholder script's type="text/plain" prevents the browser from executing it on page load. The bootloader replaces it with a real script tag only when the relevant consent category is true. It waits for DOMContentLoaded because an inline script runs as soon as the parser reaches it, before placeholders further down the page exist in the DOM.

For sites using Google tags on EEA traffic, Google requires advertisers to collect consent from end users in the EEA and share consent signals with Google to keep using its tags for measurement, ad personalization, and remarketing. Consent mode is the mechanism Google describes for passing those signals (as of Oct 2026, Google Ads Help); the parameters are listed in the consent mode reference. Integration is an additional layer on top of the gate above:

javascript
// Default state: deny everything until consent is read
gtag('consent', 'default', {
  analytics_storage: 'denied',
  ad_storage: 'denied',
  ad_user_data: 'denied',
  ad_personalization: 'denied',
})

// After consent decision is read
gtag('consent', 'update', {
  analytics_storage: consent.analytics ? 'granted' : 'denied',
  ad_storage: consent.advertising ? 'granted' : 'denied',
  ad_user_data: consent.advertising ? 'granted' : 'denied',
  ad_personalization: consent.advertising ? 'granted' : 'denied',
})

Consent Mode v2 is a signaling layer, not a substitute for the consent gate. Both must be present.

Audit log and accountability — the part most teams skip

Where processing is based on consent, GDPR Article 7(1) requires the controller to be able to demonstrate that the data subject has consented. The GDPR does not prescribe exactly how. The EDPB's consent guidelines give as an example keeping information on the session in which consent was expressed, documentation of the consent workflow at the time, and a copy of the information presented, and say it would not be sufficient to merely refer to a correct configuration of the website. For a cookie banner, a server-side log is one way to meet this.

The minimum log fields:

FieldExampleRetention
`consent_id``c_4f2a8e3b9c1d`Duration of processing + limitation period
`timestamp``2026-05-09T10:23:14Z`Same
`ip_truncated``203.0.113.0/24` (or hashed)Same
`ua_class``Chrome 124 / macOS`Same
`banner_version``v3.2.1`Same
`categories``{strictly_necessary: true, analytics: false, advertising: false}`Same
`consent_text_version``en-2024-11-15`Same

The EDPB says the obligation to demonstrate consent lasts as long as the processing, and that afterwards proof should be kept no longer than strictly necessary for compliance with a legal obligation or for the establishment, exercise, or defense of legal claims. How long that is depends on the limitation periods that apply to you. Pseudonymize the IP (truncate to /24 or hash) to avoid creating a new privacy problem in the audit log itself. The user-agent should be classified into browser and OS category, not stored verbatim.

The log query path is the test. Given a consent ID, can you reproduce the exact banner version, category state, and consent text shown to the user at the recorded timestamp? If yes, you can demonstrate consent. If not, the log is decorative.

Edge cases that catch teams out

Five situations consistently surprise implementation teams.

EU users on a US-hosted site. Under Article 3(2), GDPR applies to a controller or processor not established in the EU that processes personal data of people who are in the EU, where the processing relates to offering them goods or services (whether or not they pay) or to monitoring their behavior as far as it takes place in the EU — regardless of where the servers live. A Delaware-registered SaaS that offers its service to people in the EU is in scope for that processing. The cookie step itself falls under the national law transposing the ePrivacy Directive.

B2B sites with employee-only access. Article 5(3) of the ePrivacy Directive has no exception for business users: storing or reading information on a visitor's device that is not strictly necessary for a service they explicitly requested needs that visitor's consent, whether or not they act for an employer. The B2B exemption most teams imagine does not exist in GDPR or in the ePrivacy Directive.

Multilingual sites. Consent must be informed (GDPR Article 4(11)), so present the consent text in the user's language rather than a single English fallback.

Embedded third-party content (YouTube, Vimeo, Maps). Where an embed stores or reads information on the device that is not strictly necessary, it must be gated until consent — not loaded with a thin overlay that says "click to accept." The pattern that works: a thumbnail placeholder with an explicit "Click to load and accept advertising cookies" button that triggers both the consent update and the iframe load.

Cookieless analytics tools. Plausible, for example, says it uses no cookies or local storage and never stores raw IP addresses or User-Agent strings, although it processes them, hashed with a salt rotated every 24 hours, to count daily visitors; its own position is that no consent banner is needed (as of Oct 2026, Plausible data policy). Some other "cookieless" analytics use fingerprinting or persistent IP-based identification, which may still require consent. Verify the specific tool's data flow, and your DPA's position, before claiming exemption.

Frequently asked questions

Q

Can we use legitimate interest instead of consent for analytics?

A

No. ePrivacy Article 5(3) requires consent for storing or reading information on the user's device unless it is for the sole purpose of transmitting a communication or is strictly necessary for a service the user explicitly requested, and the EDPB Cookie Banner Taskforce confirmed in 2023 that the legal basis for placing or reading cookies cannot be the controller's legitimate interests. Legitimate interest may work for some downstream processing of already-collected data but does not bypass the cookie consent step itself.

Q

Does Google Consent Mode v2 alone make us compliant?

A

No. Consent Mode v2 is a signaling layer that propagates the consent decision to Google services. It assumes a compliant consent collection mechanism is in place upstream. Implementing Consent Mode without a compliant banner fails on the collection side.

Q

How long can we remember a Reject All choice before re-asking?

A

The GDPR sets no specific time limit for how long consent lasts, and the EDPB recommends refreshing consent at appropriate intervals as a best practice (Guidelines 05/2020). National authorities may set their own expectations for how long a choice is remembered, so check the guidance in each market you target.

Q

Can we use scroll-to-consent if the banner copy makes it clear?

A

No. The EDPB's 2020 consent guidelines state that scrolling or swiping through a web page will not under any circumstances satisfy the requirement of a clear and affirmative action. Users must make an explicit choice, such as clicking Accept, Reject, or Customize.

Project Inquiry