Back to Blog
GDPR
Cookie Consent
Privacy Law
Europe
Compliance

GDPR Cookie Consent Requirements: Complete Compliance Guide 2025

Written by Cookie Banner Team
14 min read min read
Start Building Today

Ready to add a cookie banner to your site?

Join 1,000+ Canadian businesses who trust our free cookie banner generator. No credit card required, unlimited banners, fully compliant with PIPEDA & CASL.

First 1,000 accounts are free forever. No catches, no limits.

TL;DR (Too Long; Didn't Read)

Quick Summary:

  • What: GDPR requires explicit consent for cookies in Europe
  • Applies to: Any website with EU visitors (yes, even if you're not in Europe)
  • Key Rule: Get consent BEFORE setting cookies
  • Penalty: Up to €20 million or 4% of revenue
  • Must-Haves: Accept/Reject buttons, granular choices, privacy policy link

6 Core Requirements:

  1. Consent must be freely given (no pre-ticked boxes)
  2. Consent must be specific (per category)
  3. Consent must be informed (explain what cookies do)
  4. Consent must be unambiguous (active opt-in)
  5. Consent before cookies (block until accepted)
  6. Easy to withdraw consent (one-click access)

Get GDPR-compliant cookie banner →


What is GDPR and Why Does It Matter for Cookies?

The General Data Protection Regulation (GDPR) is Europe's comprehensive privacy law that went into effect on May 25, 2018. If your website has visitors from the EU — even if you're based elsewhere — you need to comply with GDPR.

For cookies, GDPR is crystal clear: You must get explicit, informed consent before setting non-essential cookies on a user's device.

The stakes are high:

  • Fines up to €20 million or 4% of global annual revenue (whichever is greater)
  • Companies like Google, Amazon, and Meta have faced hundreds of millions in GDPR fines
  • Even small businesses can be fined for non-compliance

This guide will show you exactly what GDPR requires for cookie consent and how to get it right.

1. ✅ Consent Must Be Freely Given

Users must have a genuine choice to accept or reject cookies. This means:

❌ NOT Allowed:

  • Pre-ticked consent boxes
  • Consent as a condition to access content (with some exceptions)
  • Making "Accept" easy but "Reject" difficult (dark patterns)
  • Bundled consent (forcing users to accept all cookies together)

✅ Allowed:

  • Clear "Accept" and "Reject" options
  • Granular choices (accept analytics but reject marketing)
  • Easy-to-find cookie settings

Example of Freely Given Consent:

We use cookies to improve your experience.

[Accept All]  [Reject All]  [Customize]

2. ✅ Consent Must Be Specific

GDPR requires granular consent for different cookie categories. You can't bundle everything together.

Cookie Categories:

  • Strictly Necessary — No consent needed (security, authentication)
  • Functional — Preferences, language settings
  • Analytics — Google Analytics, Hotjar, tracking
  • Marketing/Advertising — Facebook Pixel, Google Ads, retargeting

Users must be able to accept some categories and reject others.

❌ Bad Example:

"We use cookies. [Accept All] [Learn More]"

✅ Good Example:

"We use cookies in 4 categories:

  • ☑ Strictly Necessary (always active)
  • ☐ Functional
  • ☐ Analytics
  • ☐ Marketing

[Save Preferences] [Accept All] [Reject Non-Essential]"

3. ✅ Consent Must Be Informed

Users must understand what they're consenting to. This means you need to provide:

  • Clear explanation of what cookies do
  • Purpose of each cookie category
  • Who receives the data (third parties like Google, Facebook)
  • Link to full privacy/cookie policy
  • Data retention periods (how long cookies last)

Minimum Information Required:

  1. "We use cookies"
  2. "Here's what they do" (brief explanation)
  3. "Here's who we share data with" (third parties)
  4. "[Privacy Policy]" (link to full details)

Example:

"We use cookies to analyze our traffic (Google Analytics) and show you relevant ads (Facebook, Google Ads). We share this data with our advertising partners. [Privacy Policy]"

4. ✅ Consent Must Be Unambiguous

Implied consent is NOT valid under GDPR.

❌ Invalid Consent Methods:

  • "By continuing to browse, you consent to cookies"
  • Scrolling = consent
  • Silence = consent
  • Inactivity = consent

✅ Valid Consent Methods:

  • Clicking an "Accept" button
  • Checking an unchecked box
  • Toggling a switch to "on"

Clear affirmative action is required.

5. ✅ Consent Must Be Given Before Cookies Are Set

This is one of the most commonly violated rules. Your website MUST NOT set non-essential cookies until the user consents.

The Sequence:

  1. User lands on your page
  2. Cookie banner appears
  3. User clicks "Accept" or "Reject"
  4. Cookies load (or don't) based on choice

❌ Violation:

  • Loading Google Analytics before showing the banner
  • Setting marketing cookies, then asking for consent
  • Using "consent" to just inform, not prevent

✅ Compliance:

  • Block all tracking scripts until consent
  • Only load accepted cookie categories
  • Respect "Reject" choices

How to Test:

  1. Open your site in incognito mode
  2. Open browser DevTools → Network tab
  3. Reload the page
  4. Check if tracking requests (analytics, ads) fire before you click "Accept"

If they do, you're not compliant.

6. ✅ Consent Must Be Easy to Withdraw

Users must be able to:

  • Change their cookie preferences anytime
  • Withdraw consent as easily as they gave it
  • Find cookie settings without hassle

Best Practices:

  • Add a "Cookie Settings" link in your footer
  • Make it one click to reopen preferences
  • Allow users to toggle categories on/off
  • Respect withdrawal immediately

Example Footer Link:

Footer:
About | Privacy Policy | [Cookie Settings] | Contact

🟢 Strictly Necessary Cookies (No Consent Required)

These cookies are essential for your website to function and are exempt from GDPR consent requirements:

Examples:

  • Session management
  • User authentication (login status)
  • Security features (CSRF tokens)
  • Load balancing
  • Shopping cart functionality

Key point: If the cookie is truly necessary for the service the user requested, no consent is needed. But you must still disclose them in your privacy policy.

🟡 Functional Cookies (Consent Required)

These enhance user experience but aren't strictly necessary:

Examples:

  • Language preferences
  • Theme selection (dark mode)
  • Volume settings for media players
  • Recently viewed products

GDPR requirement: Technically requires consent, but less strictly enforced if genuinely functional.

🔴 Analytics & Performance Cookies (Consent Required)

These track user behavior and absolutely require consent:

Examples:

  • Google Analytics
  • Google Tag Manager
  • Hotjar
  • Microsoft Clarity
  • Mixpanel
  • Custom analytics

Exception: Some argue anonymized analytics with proper safeguards might not require consent, but this is risky. Best practice: Always get consent for analytics.

🔴 Marketing & Advertising Cookies (Consent Required)

These are used for targeting and retargeting and always require consent:

Examples:

  • Facebook Pixel
  • Google Ads conversion tracking
  • LinkedIn Insight Tag
  • Twitter Pixel
  • Retargeting pixels
  • Affiliate tracking cookies

No exceptions: These always require explicit consent.

Must-Have Elements

Your cookie banner must include:

  1. Clear headline ("We use cookies")
  2. Brief explanation of cookie purposes
  3. Accept button (e.g., "Accept All")
  4. Reject button (e.g., "Reject All" or "Reject Non-Essential")
  5. Preferences/Customize button (e.g., "Cookie Settings")
  6. Link to privacy/cookie policy
  7. Information about third parties (if applicable)
  • Close/dismiss button (only if no cookies are set)
  • Logo (for branding consistency)
  • Icons (to make categories clearer)
  • Estimated number of cookies per category

Visual Design Best Practices

✅ Do:

  • Make "Accept" and "Reject" buttons equally prominent
  • Use clear, readable fonts (minimum 14px)
  • Ensure good color contrast (WCAG AA minimum)
  • Make it mobile-responsive
  • Ensure touch targets are at least 44x44px
  • Position it so it doesn't block critical content

❌ Don't:

  • Hide the "Reject" button or make it tiny
  • Use confusing language or double negatives
  • Make users scroll to find the reject option
  • Use pre-ticked boxes
  • Block access to the site completely (unless justified)

What it is: Blocking access to your website unless users accept cookies.

Example:

"You must accept cookies to access this site. [Accept] [Leave]"

GDPR says: Generally not allowed, unless:

  • You have a legitimate business model that requires consent
  • You offer an alternative way to access content (e.g., paid subscription)

Most cookie walls are non-compliant.

❌ Mistake #2: "Accept or Leave" Patterns

What it is: Only offering "Accept Cookies" or "Leave Site" options.

Why it's wrong: Consent must be freely given. If the only option is to accept or leave, that's not a real choice.

Fix: Add a "Reject All" or "Only Essential" button.

❌ Mistake #3: Pre-Ticked Boxes

What it is: Cookie consent checkboxes that are checked by default.

Example:

☑ Analytics Cookies
☑ Marketing Cookies

GDPR says: Consent must be an active opt-in, not opt-out. Boxes must be unchecked by default.

What it is: Setting Google Analytics, Facebook Pixel, or other tracking cookies before the user accepts them.

Why it's wrong: GDPR requires consent BEFORE cookies are set.

How to test: Open DevTools → Network tab. If you see tracking requests before clicking "Accept," you're violating GDPR.

What it is: Forcing users to accept all cookies together.

Example:

"[Accept All Cookies] [Learn More]"

No option to accept some but reject others.

GDPR says: Users must be able to accept specific categories and reject others. Granular consent is required.

What it is: Assuming continued browsing = consent.

Example:

"By continuing to use this site, you consent to cookies. [OK]"

GDPR says: This is NOT valid consent. Users must actively opt-in.

❌ Mistake #7: Making Rejection Difficult

What it is: Hiding the "Reject" button, requiring multiple clicks, or using confusing language.

Examples:

  • "Accept" button is big and colorful, "Reject" is tiny gray text
  • "Reject" requires going to settings, clicking through multiple screens
  • Using language like "Deny" or "Refuse" instead of "Reject"

GDPR says: Withdrawing consent must be as easy as giving it.

Step 1: Audit Your Cookies

List all cookies your website uses:

  1. Open DevTools → Application → Cookies
  2. Visit your site and note every cookie
  3. Categorize each one (necessary, functional, analytics, marketing)
  4. Document the purpose, duration, and third parties involved

Option 1: Cookie Consent Platform

  • Use a tool like Cookie Banner Generator
  • Pros: Fast setup, guaranteed compliance, customizable
  • Cons: May require a small code snippet

Option 2: Build Custom

  • Write your own cookie banner
  • Pros: Full control
  • Cons: Requires legal + technical expertise

Option 3: WordPress/Shopify Plugin

  • Use platform-specific plugins
  • Pros: Easy installation
  • Cons: Often limited in free versions

Your consent solution must:

  1. Block non-essential cookies by default
  2. Only load accepted categories after consent
  3. Respect "Reject" choices

Example (JavaScript):

// Check if user has consented to analytics
if (getCookieConsent('analytics') === true) {
  loadGoogleAnalytics();
}

Step 4: Add a Privacy/Cookie Policy

Create a dedicated page that explains:

  • What cookies you use (by name and category)
  • Purpose of each cookie
  • Duration of each cookie
  • Third parties involved
  • How to manage/delete cookies
  • User rights under GDPR

Step 5: Test Thoroughly

Test checklist:

  • [ ] Banner appears on first visit
  • [ ] No tracking cookies load before consent
  • [ ] "Accept All" loads all cookies
  • [ ] "Reject All" only loads essential cookies
  • [ ] Granular choices work correctly
  • [ ] Consent is remembered (cookie/localStorage)
  • [ ] Footer link reopens settings
  • [ ] Mobile responsive
  • [ ] Accessible (keyboard navigation, screen readers)

Step 6: Document Compliance

Keep records of:

  • When consent was obtained
  • What the user consented to
  • Version of your cookie policy at the time
  • How consent was given (button click, toggle, etc.)

Do I need GDPR compliance if I'm not in Europe?

Yes, if you:

  • Have visitors from the EU
  • Target or monitor EU citizens
  • Offer goods/services to EU residents

GDPR applies based on where your users are, not where you're located.

What's the difference between GDPR and CCPA?

GDPR (Europe):

  • Requires opt-in consent before setting cookies
  • Applies to all EU visitors

CCPA (California):

  • Requires opt-out option (less strict)
  • Applies to California residents

GDPR is stricter. If you comply with GDPR, you'll generally be fine for CCPA.

No (with rare exceptions). Google Analytics collects personal data and requires consent under GDPR.

Exception: Google Analytics 4 with IP anonymization and strict settings might not require consent, but this is a gray area. Best practice: Get consent.

What if I only use strictly necessary cookies?

If you only use cookies that are essential for your site to function (authentication, security, shopping cart), you don't need a consent banner under GDPR.

But: You still need to disclose these cookies in your privacy policy.

GDPR doesn't specify an exact timeframe, but:

  • Common practice: 12 months
  • Recommended: Re-ask for consent if your cookie usage changes
  • Maximum: 24 months (conservative estimate)

After this period, ask for consent again.

No, if they're strictly necessary for the service the user requested (e.g., keeping them logged in, maintaining their shopping cart).

Yes, if they're used for analytics or tracking.

What's the penalty for non-compliance?

GDPR fines can be:

  • Up to €20 million
  • OR 4% of annual global revenue (whichever is greater)

Real examples:

  • Google: €50 million (2019)
  • Amazon: €746 million (2021)
  • Meta (Facebook): €265 million (2022)

Even small businesses have been fined tens of thousands of euros.

Generally no, unless:

  • You offer an alternative way to access content
  • Your business model genuinely requires tracking

Most cookie walls violate GDPR's "freely given consent" requirement.


Use this checklist to ensure your cookie banner is GDPR compliant:

  • [ ] Banner appears before any non-essential cookies are set
  • [ ] "Accept All" button is clearly visible
  • [ ] "Reject All" or "Only Essential" button is equally prominent
  • [ ] "Customize" or "Cookie Settings" option is available
  • [ ] No pre-ticked boxes
  • [ ] Clear explanation of cookie purposes
  • [ ] Link to privacy/cookie policy
  • [ ] Mentions third parties (if applicable)

Functionality

  • [ ] Blocks non-essential cookies until consent is given
  • [ ] Loads only accepted cookie categories
  • [ ] Respects "Reject" choices
  • [ ] Allows granular selection (analytics, marketing, functional)
  • [ ] Remembers user's choice
  • [ ] Provides easy way to withdraw consent (footer link)

Privacy Policy

  • [ ] Lists all cookies by name
  • [ ] Explains purpose of each cookie
  • [ ] States duration of each cookie
  • [ ] Identifies third parties
  • [ ] Explains how to manage/delete cookies
  • [ ] Describes user rights under GDPR

Testing

  • [ ] Tested on desktop browsers (Chrome, Firefox, Safari, Edge)
  • [ ] Tested on mobile devices (iOS, Android)
  • [ ] Verified no tracking requests before consent (DevTools check)
  • [ ] Confirmed consent is stored properly
  • [ ] Tested withdrawal of consent
  • [ ] Checked accessibility (keyboard navigation, screen readers)

Don't risk GDPR fines. Use a proven, compliant cookie consent solution.

Cookie Banner Generator is designed specifically for GDPR compliance:

✅ Blocks cookies until consent ✅ Granular user choices ✅ Easy withdrawal of consent ✅ Fully customizable to match your brand ✅ Works on any website ✅ First 1,000 accounts free forever

Create your compliant cookie banner →


Have questions about GDPR compliance? Check out our other guides:

Stay Updated on Privacy Law Changes

Get notified when Canadian privacy laws change and receive our latest compliance guides.

No spam. Unsubscribe anytime. We respect your privacy.

Key Takeaways

Compliance Requirements

PIPEDA and CASL require explicit consent for tracking cookies in Canada

Cookie Categories

Only strictly necessary cookies can be set without consent

Quebec Law 25

Stricter requirements for Quebec residents - opt-in required

Best Practices

Use clear language, provide granular controls, and keep records

Next Steps: Choose a cookie banner solution that's designed specifically for Canadian compliance, or build your own following the guidelines above.

Ready to add a cookie banner to your site?

Get your free, compliant cookie banner in minutes. No credit card required.

Create Your Banner

Related Articles

PIPEDA
Canada

PIPEDA Compliance Checklist 2025: Complete Guide for Canadian Websites

Comprehensive PIPEDA compliance checklist for Canadian businesses. Learn cookie consent requirements, privacy policy essentials, and how to avoid violations.

14 min read min readRead more
WordPress
Cookie Banner

How to Add a Cookie Banner to WordPress in 2025 (Step-by-Step Guide)

Learn how to add a GDPR and PIPEDA compliant cookie banner to your WordPress website. No coding required, works with any theme, includes free options.

11 min read min readRead more
PIPEDA
CASL

Complete Guide to Cookie Consent in Canada for 2025

Everything Canadian website owners need to know about cookie consent laws including PIPEDA, CASL, and how to stay compliant with privacy regulations.

9 min read min readRead more