Cookie Consent Banner Requirements for Ecommerce Stores (2026)
By shopifypolicy Editorial Team · Last updated 2026-09-24 · 11 min read
A cookie consent banner is not a nicety — it is a legal requirement for any ecommerce store that runs analytics, advertising pixels, or third-party tracking scripts on visitors from the EU, UK, or California. Get it wrong and you face regulatory complaints, ad platform suspensions, or fines. Get it right and you protect your ad data while staying on the right side of regulators.
This guide covers exactly what the law requires in 2026, which cookies need consent and which do not, what a compliant banner UI must include, how to log consent as proof, and how to implement a banner on Shopify or WooCommerce. If you also need a privacy policy that references your cookie practices, generate one for your store and update the cookie section to match your banner.
GDPR vs CCPA: Two Different Consent Models
The two major frameworks that affect ecommerce stores take opposite approaches to consent, and you may need to satisfy both simultaneously.
Under the GDPR and the ePrivacy Directive, consent must be obtained before any non-essential cookie is set. This is the opt-in model. A visitor who arrives on your store must be shown the banner, must actively choose to accept cookies, and no tracking code may fire until they do. Pre-ticked boxes, “by continuing to browse you agree,” and banner-only accept buttons (no reject option) are all non-compliant under the EDPB’s 2023 dark patterns guidance.
Under the CCPA/CPRA, the model is opt-out. Cookies may be set by default, but California residents have the right to opt out of the sale or sharing of their personal information. In practice this means a “Do Not Sell or Share My Personal Information” link must be accessible (usually in the footer), and a Global Privacy Control signal from the browser must be honored automatically.
| Aspect | GDPR / ePrivacy (EU/UK) | CCPA/CPRA (California) |
|---|---|---|
| Consent model | Opt-in — no cookies before consent | Opt-out — cookies allowed, right to stop sharing |
| Reject button required? | Yes — must be equally prominent as accept | Yes — “Do Not Sell or Share” link required |
| Cookie wall allowed? | No — in most EU member states | Not applicable in the same way |
| GPC signal | Must be respected as a valid opt-out signal | Legally required to honor under CPRA |
| Consent proof required | Yes — timestamp, version, choice logged | Opt-out preference must be recorded |
If your store serves both EU and California visitors — which most stores do — you need a banner that satisfies both. The practical approach is to implement GDPR-level opt-in globally and add a separate “Do Not Sell or Share” footer link for California. Many consent management platforms handle this with geo-targeted banner variants.
Cookie Wall Prohibition: Where “Accept or Leave” Is Illegal
A cookie wall is a gate that blocks access to website content unless the visitor consents to non-essential cookies. Under the GDPR, consent must be “freely given,” which the EDPB has consistently interpreted to mean that denying consent cannot result in denial of service. If a visitor cannot read your store or browse products without agreeing to tracking, their consent is not free.
Regulators in Germany, the Netherlands, France, Italy, and Spain have all issued enforcement actions or guidance against cookie walls. The Austrian DPA ruled in 2021 that a cookie wall on a news site was unlawful. The French CNIL’s 2022 cookie wall guidance confirmed that cookie walls are only acceptable if you offer a paid alternative, and even then only with strict conditions.
For ecommerce stores the practical implication is simple: visitors must be able to reject all non-essential cookies and still browse and purchase. Your banner must not block the page content or prevent checkout.
Strictly Necessary Cookies: What Is Exempt from Consent
Not every cookie requires consent. Strictly necessary cookies — those required for the basic functioning of the store — are exempt under the ePrivacy Directive. The GDPR’s “legitimate interests” basis also covers these in most interpretations.
Strictly necessary cookies include:
- Shopping cart session cookies: the cookie that keeps a visitor’s cart contents across pages (
cart,_shopify_s). - Authentication cookies: the session token that keeps a customer logged into their account.
- Security cookies: CSRF tokens and fraud-prevention identifiers used by the platform itself.
- Load balancing cookies: server-routing tokens that ensure a session stays on the same server during a request.
- Consent preference cookies: the cookie that stores the visitor’s own consent choice so the banner does not reappear on every page.
Analytics, advertising pixels, A/B testing tools, and personalization features are not strictly necessary. A common mistake is classifying Google Analytics or Shopify Analytics as strictly necessary because the store owner uses them to run the business. The legal test is not whether the cookie is useful to the merchant — it is whether the website would fail to function for the visitor without it.
Common Third-Party Scripts: Cookie Category and Consent Behavior
Understanding which category each tracking script falls into determines when it can fire. Under GDPR opt-in rules, analytics and marketing scripts must be blocked until the visitor accepts the relevant category.
| Script / Tool | Cookie Category | Before Consent | After Consent |
|---|---|---|---|
| Google Analytics 4 | Analytics | Blocked — no _ga cookie set | Fires normally; sets _ga, _gid |
| Meta Pixel (fbq) | Marketing / Advertising | Blocked — no _fbp set | Fires; sets _fbp, _fbc |
| Klaviyo | Marketing (tracking portion) | Email send functionality allowed; behavioral tracking blocked | Full tracking including browse abandon fires |
| TikTok Pixel | Marketing / Advertising | Blocked — no _ttp set | Fires; sets _ttp |
| Hotjar | Analytics (session recording) | Blocked — no recording starts | Heatmaps and session recordings begin |
| Shopify Analytics | Analytics (platform-level) | Basic session data collected; behavioral analytics blocked | Full analytics including source attribution |
| Google Ads (gtag) | Marketing / Advertising | Blocked — no conversion cookie set | Conversion tracking and remarketing fires |
A well-configured consent management platform (CMP) automatically blocks the script tags for marketing and analytics tools until the appropriate consent category is granted. This is done by converting <script type="text/javascript"> to <script type="text/plain" data-cookieconsent="analytics"> and only restoring the runnable type attribute after consent is given.
The 6 Required UI Elements of a Compliant Banner
A banner that just says “We use cookies. OK.” is not compliant. The EDPB’s guidance on consent and dark patterns, combined with enforcement actions across Europe, has established a clear set of UI requirements.
- Accept button: clearly labeled, accepts all non-essential cookies in the categories displayed.
- Reject button: must be equally prominent — same font size, same visual weight, same position level as the accept button. Hiding reject behind a link while accept is a button is a dark pattern that regulators in France, Spain, and Germany have fined operators for.
- Category-level controls: ideally accessible through a “Manage preferences” or “Customize” option that lets visitors accept analytics but reject marketing, or vice versa.
- Clear description of each category: plain-language explanation of what each cookie category does — not legal definitions.
- Link to the privacy policy and/or cookie policy: must be accessible directly from the banner, not just from the footer.
- Withdraw consent link: a persistent way for users to reopen the consent preferences panel and change their choice after the initial banner is dismissed — typically a small link or icon in the footer.
Banners that omit the reject button, use low-contrast text for it, or bury it inside a multi-step “Manage preferences” flow without a top-level reject option all fail the equal-prominence requirement. The CNIL fined Google €150 million and Facebook €60 million in January 2022 specifically for making the accept button easier to click than the reject button.
Consent Logging: How to Keep Proof of Consent
Under the GDPR, the burden of proof lies with the data controller. If a regulator or a data subject requests evidence that consent was given, you must be able to produce it. This is called a consent record or proof of consent.
A minimum consent record should contain:
- Timestamp: the date and time (UTC) when the consent was given or withdrawn.
- Banner version: the version number or hash of the consent notice that was displayed at the time. If you update your cookie list, that increments the version and requires re-consent from users.
- Choices recorded: which categories were accepted and which were rejected — not just “consent given,” but the granular choices.
- User agent: the browser and device string, to confirm the consent came from a real browser session.
- IP address (hashed or truncated): the last two octets of the IP address or a hash are typically sufficient to demonstrate the geographic origin of consent without over-collecting. Storing the full IP is itself a personal data collection that needs to be disclosed.
Retention period for consent records: keep them for the duration of the consent period plus any statute of limitations for regulatory complaints. In practice, most CMPs retain consent records for 13 months (aligned with cookie validity periods) to 3 years (aligned with GDPR limitation periods in some jurisdictions).
Most paid CMP solutions handle consent logging automatically and provide an audit log you can export on request. If you are building a custom solution, you need to architect this storage into your implementation from the start.
The Relationship Between Your Consent Banner and Privacy Policy
The consent banner and the privacy policy are not the same document, but they must be consistent with each other and mutually referenced.
Your privacy policy should include a dedicated cookies section that:
- Lists each cookie category (strictly necessary, functional, analytics, marketing)
- Names the specific cookies or scripts in each category
- States the purpose and retention period of each category
- Explains how users can withdraw or change their consent
- Links to the consent preferences panel (or explains how to reopen it)
Your consent banner should:
- Link directly to the privacy policy and/or a dedicated cookie policy
- Reference the same cookie categories described in the privacy policy
- Be updated every time the privacy policy’s cookie section is updated
A mismatch between your banner and your privacy policy — for example, the banner mentions “analytics cookies” while the privacy policy does not contain a cookies section — is a red flag in a GDPR audit and undermines the validity of any consent you collect. If you need to update your privacy policy to include a proper cookies section, the generator covers this.
Global Privacy Control (GPC): What It Is and How to Handle It
The Global Privacy Control is a browser signal (a Sec-GPC: 1 HTTP header) that tells websites the user prefers not to have their data sold or shared. It is supported by Firefox, Brave, DuckDuckGo, and several privacy-focused browser extensions.
Under the CPRA, honoring GPC is legally required for businesses covered by the CCPA. The California Attorney General’s first enforcement sweep explicitly included GPC non-compliance. For EU stores, the EDPB has not issued binding guidance making GPC mandatory as a GDPR consent signal, but several DPAs have encouraged treating it as such.
In practice, handling GPC means:
- Detecting the
Sec-GPC: 1header server-side or thenavigator.globalPrivacyControlproperty client-side. - If GPC is set, automatically applying a “do not sell or share” opt-out for California visitors without requiring them to click a banner.
- For EU visitors with GPC set, the guidance is less settled — some CMPs treat it as a signal to default to reject-all, others treat it as informational only.
Most major CMPs (OneTrust, CookieYes, Pandectes) have GPC detection built in. If you are using a lightweight custom solution, you will need to add this detection manually.
Shopify and WooCommerce: Platform Options for Consent Management
Both major ecommerce platforms have options for implementing a consent banner, ranging from built-in tools to dedicated apps.
Shopify
Shopify introduced the Customer Privacy API as the platform’s native consent mechanism. It provides a JavaScript API that lets theme code check whether a visitor has consented to analytics or marketing cookies, and it integrates with Shopify’s built-in consent banner (available in themes that support it).
Shopify’s built-in banner limitations:
- It covers Shopify’s own analytics and the categories it recognizes — it does not automatically block third-party scripts added via the theme or apps.
- Consent records are stored in Shopify’s infrastructure but are not easily exportable for audit purposes.
- Category-level granularity is basic compared to dedicated CMPs.
Dedicated consent apps on Shopify:
- Pandectes GDPR Compliance: deep Shopify integration, Customer Privacy API support, auto-scan of installed apps, consent logging, GPC detection, geo-targeting for EU vs California variants.
- Consentmo GDPR Compliance: similar feature set, popular for stores with heavy Klaviyo and Meta Pixel usage, includes a cookie policy generator.
- Enzuzo: covers consent banner, privacy policy generator, and DSAR (data subject access request) management in one app.
WooCommerce
WooCommerce runs on WordPress, which gives you a wider range of plugin options and more control over script blocking.
- CookieYes: the most widely used CMP on WordPress, auto-scans cookies, generates a cookie policy, blocks scripts by category, and handles GPC. Free tier available.
- Complianz: privacy-first CMP, handles GDPR, CCPA, and other regulations (PIPEDA, LGPD), geo-targeted banners, and direct WooCommerce integration for checkout consent.
- Borlabs Cookie: developer-friendly, supports content blocker for embedded YouTube/Google Maps, precise script blocking via a tag-based system.
- OneTrust / TrustArc: enterprise-grade options if you manage multiple stores or need centralized consent records across domains.
Whichever plugin you use, make sure it integrates with your tag manager (Google Tag Manager or Shopify’s Custom Pixels) so that marketing scripts are blocked server-side in GTM until consent is granted — not just hidden in the UI.
6-Step Banner Implementation Runbook
This is the sequence to follow when setting up a consent banner from scratch on an ecommerce store:
- Audit your cookies: run your store URL through a cookie scanner (most CMPs have one built in, or use tools like cookieserve.com or the CookieYes scanner) to get a full list of cookies currently set.
- Categorize each cookie: map every cookie to strictly necessary, functional, analytics, or marketing. Resolve any scripts that are currently loading without consent.
- Install and configure a CMP: install your chosen consent app or plugin, set up the cookie categories based on your audit, configure the banner text and button labels, and enable GPC detection.
- Update your privacy policy: make sure the cookies section of your privacy policy matches the categories and scripts in your banner. Add a link from the cookies section to the consent preferences panel.
- Test the blocking: open your store in a private browser window, reject all cookies, and verify in the browser dev tools (Application → Cookies) that no marketing or analytics cookies are set. Then accept and verify they fire correctly.
- Add the “Do Not Sell” footer link: add a “Do Not Sell or Share My Personal Information” link to your store footer pointing to your opt-out flow or the consent preferences panel. This is required for California visitors regardless of whether they triggered the GDPR banner.
5 Common Consent Banner Mistakes
- Making the reject button visually smaller or less prominent than accept: this is the single most-fined dark pattern in EU enforcement. Accept and reject must have identical visual weight — same font size, same button style, same placement level.
- Discarding consent records: if you cannot prove a specific visitor consented to analytics cookies on a specific date, you cannot legally defend that data collection. Log consent records and retain them for at least 13 months.
- Classifying analytics as strictly necessary: Google Analytics, Meta Pixel, Hotjar, and Shopify behavioral analytics are not strictly necessary. Running them before consent is a GDPR violation. The French CNIL alone issued €300 million+ in fines for this between 2022 and 2024.
- Not updating the privacy policy when adding a new script: every time you add a tracking pixel, install a new app, or change analytics providers, the cookies section of your privacy policy needs to be updated — and if the change is material, you need to re-trigger consent for existing visitors.
- Not providing a way to withdraw consent: consent must be as easy to withdraw as it is to give. A footer link that reopens the consent panel is the minimum. If a visitor cannot find a way to change their cookie preferences after dismissing the banner, you are non-compliant.
Compliance Checklist: 12-Point Banner Audit
| # | Requirement | Pass Condition |
|---|---|---|
| 1 | Banner appears before non-essential cookies are set | No _ga, _fbp, or marketing cookies in browser before accept |
| 2 | Accept and reject buttons equally prominent | Same font size, same visual weight, same level in hierarchy |
| 3 | No pre-ticked boxes for non-essential categories | Analytics and marketing toggles default to off |
| 4 | Cookie wall absent | Visitor can browse and purchase after rejecting all cookies |
| 5 | Link to privacy/cookie policy in banner | Clickable link present without dismissing banner |
| 6 | Withdraw consent accessible from footer | Footer link or icon reopens consent preferences |
| 7 | GPC signal detected and honored | Brave browser with GPC on triggers opt-out automatically |
| 8 | Consent records logged | CMP audit log shows timestamp, version, choices per session |
| 9 | “Do Not Sell or Share” link in footer | Link present in footer, visible without scrolling on mobile |
| 10 | Privacy policy cookies section up to date | Policy lists same categories and scripts as banner |
| 11 | Banner version increments on cookie list change | Adding a new pixel triggers re-consent for existing visitors |
| 12 | Consent records retained for minimum 13 months | CMP retention settings configured, not set to session-only |
Frequently Asked Questions
Do I need a consent banner if I only use Shopify’s built-in analytics?
Shopify Analytics sets cookies (_shopify_s, _shopify_y) that track behavioral data across sessions. Under strict GDPR interpretation, these require consent. Shopify’s Customer Privacy API handles this if your theme has the banner enabled. Verify in your theme settings that the consent banner is active and that analytics are blocked until accepted.
How often do I need to re-ask for consent?
There is no fixed legal interval, but consent records expire when the consent cookie does — typically 12 to 13 months. You must also re-ask if you materially change your cookie practices (add new tracking scripts, change analytics providers) or update your banner to a new version. The re-consent banner should clearly state what has changed.
Can I use Google Consent Mode instead of a full CMP?
Google Consent Mode v2 is a signal layer that tells Google tags how to behave based on consent status. It is not a substitute for a consent management platform. You still need a compliant banner that collects and records consent — Consent Mode simply routes the signals from your CMP to Google’s tags. Using Consent Mode without a proper banner does not satisfy the GDPR.
What about server-side tracking — does it bypass consent requirements?
Server-side tracking (sending events from your server to GA4, Meta CAPI, or TikTok Events API) does not bypass consent requirements. Data collected before consent is given still cannot be sent to these platforms. A proper server-side implementation should only fire events after client-side consent is confirmed and passed as a parameter to the server.
Your consent banner and privacy policy need to match. If you need to update your Shopify privacy policy to include a proper cookies section, or generate a fresh policy that covers your current tracking stack, the generator handles it in seconds — no login required. Also read our GDPR compliance guide for small ecommerce stores for the broader compliance picture.