Cookie Banner

Cookie Banner Best Practices: How to Maximize Consent Rates While Staying Compliant

Learn how to design a cookie banner that maximizes consent rates without dark patterns. Covers legal requirements, design best practices, GCM v2 integration, and performance optimization.

Compliso Team
8 min read

Cookie banners sit at the intersection of legal compliance, user experience, and business performance. Get them wrong, and you face regulatory fines, lost ad revenue, or both. Get them right, and you can achieve consent rates above 80% while fully respecting user choice.

This guide distills the legal requirements from CJEU rulings and EDPB guidelines, combines them with proven UX practices, and addresses the technical considerations — from Google Consent Mode v2 integration to bundle size impact — that determine whether your consent solution is an asset or a liability.

What the Law Actually Requires

Cookie consent in the EU is governed by two overlapping frameworks: the ePrivacy Directive (2002/58/EC) for storing and accessing information on devices, and the GDPR for processing personal data. Both apply simultaneously in most real-world scenarios.

Prior consent (opt-in): The CJEU established in Planet49 (C-673/17, 2019) that consent for cookies must be obtained before they are set. Pre-ticked checkboxes, implied consent from scrolling, and “continued browsing = consent” approaches are all invalid.

Informed consent: Users must know what they are consenting to. At minimum, this means disclosing the categories of cookies, their purposes, and the third parties involved — before consent is given.

Freely given consent: The EDPB’s Guidelines 05/2020 clarify that consent is not “free” if access to a service is conditional on accepting cookies (cookie walls), unless a genuine alternative is available.

Granular consent: Users must be able to consent to specific purposes (e.g., analytics, marketing, personalization) rather than only having an all-or-nothing choice.

Easy withdrawal: Article 7(3) GDPR requires that withdrawing consent be as easy as giving it. A persistent, accessible link to cookie settings is essential.

The Reject Button Problem

Multiple European DPAs have taken a firm stance: the option to reject non-essential cookies must be presented with the same visual prominence as the option to accept them.

DPAPositionYear
CNIL (France)Reject must be on first layer, same size/color as accept2022
Garante (Italy)“Continue without accepting” must be equally visible2022
AEPD (Spain)Reject must not require more clicks than accept2023
DSB (Austria)Hidden reject in settings = invalid consent2023
EDPB (Guidelines 03/2022)Dark patterns making reject harder invalidate consent2022

Bottom line: If your reject button is smaller, less colorful, or buried in a second layer while accept is prominent on the first layer, your consent is legally invalid.

Compliance and high consent rates are not mutually exclusive. In fact, the most effective banners are straightforward and honest.

Layout Patterns

There are three dominant layout patterns, each with trade-offs:

Bottom bar: A horizontal strip at the bottom of the screen. Low visual intrusiveness, but often ignored by users accustomed to dismissing bottom elements. Typical consent rate: 55-70%.

Center modal: An overlay that demands attention. Higher interaction rates but can feel intrusive, especially on mobile. Typical consent rate: 70-85%.

Side panel: A panel that slides in from the left or right. A compromise between visibility and intrusiveness. Typical consent rate: 60-75%.

Copy and Tone

  • Use plain language. “We use cookies for analytics” is better than “We deploy information storage and access technologies pursuant to applicable legislation.”
  • Be specific about the value exchange. “Help us improve by allowing analytics” is more honest and more effective than vague statements.
  • Avoid manipulative language. Phrases like “Accept to continue with the best experience” imply degraded service for refusers, which is coercive.

Visual Design Principles

  • Both accept and reject buttons should have the same size, prominence, and visual weight.
  • Use neutral colors. If accept is a bright primary-color button, reject should be styled equally — not as a text link or ghost button.
  • Category toggles should default to “off” and let users actively enable them.
  • Ensure adequate color contrast (WCAG AA: 4.5:1 ratio) for both buttons and text.

Mobile Optimization

More than 60% of European web traffic is mobile. Your cookie banner must:

  • Not cover the entire viewport (respect content visibility)
  • Have touch targets of at least 44x44 pixels
  • Be dismissible with one hand
  • Not cause layout shifts that harm Core Web Vitals

Legitimate Optimization Techniques

TechniqueImpactCompliant?
Center modal instead of bottom bar+15-25% consent rateYes, if reject is equally visible
Clear value proposition (“Help us improve”)+5-10% consent rateYes, if truthful
Reducing categories to 3-4 groups+8-12% consent rateYes, simpler choices improve engagement
Faster banner load (< 100ms)+3-5% consent rateYes, performance is always good
Remembering choice for 12 monthsReduces banner fatigueYes, GDPR allows reasonable retention
A/B testing button copyVariableYes, if both variants are compliant

Techniques That Cross the Line

  • Making the reject button smaller, lighter, or less prominent
  • Requiring more clicks to reject than to accept
  • Pre-selecting consent categories
  • Using confusing double negatives (“Don’t not allow cookies”)
  • Displaying the banner repeatedly after a user has rejected (nagging)
  • Color-coding accept as positive (green) and reject as negative (red)

Since March 2024, Google requires Consent Mode v2 for any EEA website using Google Ads, Analytics, or related services. Without it, remarketing audiences and conversion data will not function correctly.

How GCM v2 Works

  1. Default state (page load): Your CMP fires a gtag('consent', 'default', {...}) call with all consent types set to 'denied'.
  2. User grants consent: The CMP fires gtag('consent', 'update', {...}) with the relevant consent types set to 'granted'.
  3. Google tags respond: Tags adjust their behavior based on the consent state — collecting full data when granted, using cookieless pings when denied.
ParameterPurposeDefault
ad_storageAdvertising cookiesdenied
ad_user_dataSending user data to Google for adsdenied
ad_personalizationPersonalized advertisingdenied
analytics_storageAnalytics cookiesdenied
functionality_storageFunctionality cookies (e.g., language)granted
personalization_storagePersonalization (e.g., video recommendations)denied
security_storageSecurity-related cookiesgranted

Advanced vs. Basic Mode

  • Basic mode: Google tags only fire after consent is granted. No data collection without consent.
  • Advanced mode: Google tags fire immediately but in a restricted way (cookieless pings), enabling conversion modeling. This requires clear disclosure in your privacy policy.

Performance Impact

Cookie banner scripts can significantly impact page load performance. A slow banner delays First Contentful Paint and harms Core Web Vitals.

Bundle Size Comparison

CMP SolutionTypical Bundle Size (gzipped)Render Time
Compliso Banner Widget< 15 KB< 50ms
Cookiebot~80-120 KB200-400ms
OneTrust~150-300 KB300-600ms
Usercentrics~100-180 KB200-500ms
Custom implementationVariableVariable

A lightweight banner that renders in under 50ms has a measurable positive impact on both consent rates (users see the banner before bouncing) and SEO (Core Web Vitals remain unaffected).

A/B testing your cookie banner is legitimate — provided both variants are fully compliant. Test:

  • Layout pattern (bottom bar vs. center modal)
  • Copy variations (value proposition, tone)
  • Number of consent categories
  • Button label text (“Accept all” vs. “Allow cookies”)

Do not test variations where one option is less compliant than the other. Both A and B must meet the same legal standard.

Compliance Checklist

  • Non-essential cookies are blocked until consent is given
  • Reject option is equally prominent as accept option on the first layer
  • Consent categories are granular (analytics, marketing, functionality, etc.)
  • Category toggles default to “off”
  • Users can change their consent via a persistent, accessible link
  • Banner describes purposes and third parties before consent
  • No pre-ticked checkboxes
  • Banner is accessible (keyboard navigation, screen reader support, contrast)
  • Banner does not cover the entire viewport on mobile
  • Google Consent Mode v2 default state fires on page load
  • Consent update fires correctly when user grants/revokes consent
  • Banner loads in under 100ms and weighs under 30 KB gzipped
  • Consent record is stored for audit purposes

Key Metrics to Track

Once your cookie banner is live, monitor these metrics to understand its performance:

  • Consent rate: Percentage of users who accept at least one non-essential category. Industry average: 60-80%.
  • Reject rate: Percentage of users who reject all non-essential cookies. A high reject rate is healthy — it means your banner is working correctly.
  • Ignore rate: Percentage of users who do not interact with the banner at all. A high ignore rate suggests the banner is not visible or prominent enough.
  • Category-level consent: Which categories (analytics, marketing) users consent to most and least frequently.
  • Time to interaction: How long users take to make a choice. Under 5 seconds indicates a clear, well-designed banner.

Build a Better Banner With Compliso

Compliso’s cookie banner widget is designed from the ground up for compliance and performance: under 15 KB gzipped, Shadow DOM isolation, automatic script blocking, Google Consent Mode v2 built in, and three layout options. No dark patterns, no legal gray areas — just a clean banner that respects your users and your business.

Try the free compliance scan to see how your current banner scores, or sign up to deploy a compliant banner in minutes.

cookie-banner consent gdpr eprivacy best-practices

Make your website GDPR-compliant?

Compliso automatically checks your website for cookies, trackers, dark patterns, and accessibility issues.