Shopify Cookie Banner: Setup, Consent & Compliance
Shopify has a built-in cookie banner and a Customer Privacy API that, set up correctly, blocks its own analytics until a shopper consents. But the moment you add a Meta Pixel, GA4, or Hotjar through theme code instead of Shopify's pixel system, those scripts fire regardless of the banner. This guide covers both halves: enabling and configuring the native banner, and closing the tracking gap it leaves — the one that carries real GDPR and CIPA risk.
To set up the Shopify cookie banner: go to Settings → Customer privacy → Cookie banner, choose your region visibility and banner position, and enable it. Then, critically, make sure every tracker runs through Shopify's Customer Privacy API and Web Pixels — not pasted into theme code.
- Selling to the EU/UK: the banner must block marketing and analytics by default until opt-in — verify it actually does, don't assume.
- Running Hotjar/Clarity with US traffic: session-replay via theme code bypasses the banner and creates CIPA exposure — this is the highest-risk gap.
- Just need Shopify-native tracking gated: the built-in banner alone may be enough.
What this guide covers
Do you need a cookie banner on Shopify?
For most stores, yes. Shopify sets its own analytics cookies (_shopify_y, _shopify_s) by default, and the moment you add Google Analytics 4, a Meta Pixel, a Klaviyo tag, a reviews app, or any marketing tool, your store places non-essential cookies on shoppers. The EU's GDPR and ePrivacy rules require opt-in before those load; California's CCPA and 18 other US state laws require a clear opt-out. A cookie banner is how you offer that choice — and increasingly, how you avoid both regulatory fines and the US wiretapping-lawsuit wave covered below.
Shopify has genuinely improved here: its native consent system, built around the Customer Privacy API, is more capable than most hosted platforms'. The nuance — and the reason setup and compliance are two separate conversations — is that the banner only governs the trackers wired into that API. Everything else fires freely.
The Customer Privacy API — how Shopify consent actually works
This is the piece most "Shopify cookie banner" tutorials skip, and it's the whole game. Shopify's consent isn't a simple show-a-banner toggle — it's an API that stores each shopper's consent state across four categories: analytics, marketing, preferences, and sale of data (the last for CCPA). Apps and tags check that API to decide whether to fire.
A correct setup works like this: your banner collects consent, maps the shopper's choices to those four categories, and passes the signals to the Customer Privacy API. Trackers registered through Shopify's Web Pixels system then read those signals and hold until consent. When it's wired correctly, GA4, the Meta Pixel, and TikTok tags all respect the shopper's choice.
If you added tracking scripts by pasting them into theme code (theme.liquid, or a custom Liquid/HTML block) rather than through Shopify's Web Pixels or a consent-aware app, those scripts bypass the Customer Privacy API entirely. They fire on every page load regardless of consent — the banner never had a hook into them.
Migrating manual theme-code tags into Shopify's pixel system (or a consent tool that intercepts them) is the single quickest compliance win on most stores. Until you do, a shopper can decline and still be tracked.
How to set up the Shopify cookie banner
Here's the current path to enable and configure the native banner. It takes a few minutes.
- From your Shopify admin, go to Settings → Customer privacy.
- Under Cookie banner, set the region visibility — at minimum the EU/EEA and UK (opt-in), plus California and other US state-law regions (opt-out). Shopify shows the appropriate banner per region.
- Choose the banner position (bottom, or bottom-left/right) and, if available on your theme, the preferences control so returning shoppers can change their choice.
- Enable the banner and save. Confirm the "Manage cookie preferences" link appears so shoppers can revisit consent.
- In Settings → Customer privacy → Data sales, configure the "Do not sell or share" behaviour for US state-law regions.
- Confirm on a fresh incognito visit: only essential cookies should load until the shopper chooses. Check DevTools → Network to verify — this is the step most setups skip.
For third-party tags to respect consent, add them through Shopify's Web Pixels (Settings → Customer events) or a consent-aware app — not by editing theme code. Tags added the wrong way won't honour the banner even when the banner is configured perfectly.
See which trackers fire before consent on your Shopify store
A banner that's showing isn't proof anything is blocked. Run a free scan to see every tracker and cookie firing before a shopper opts in — including your theme-code scripts and app tags — in about 10 seconds. No account needed.
Scan your site free →What the native Shopify cookie banner doesn't block
Here's the part sizing-and-setup tutorials skip, and it's the part that matters most: Shopify's banner governs trackers wired into the Customer Privacy API — but not scripts and apps that fire outside it. On a real store, that's a large surface area.
- Theme-code tags — a GA4, Meta Pixel, or GTM snippet pasted into theme.liquid fires on load, outside the API. The most common single gap.
- Apps that don't respect the API — reviews (Judge.me, Loox, Yotpo), email (Klaviyo, Omnisend), pop-ups (Privy), chat (Gorgias, Tidio), loyalty (Smile.io), and analytics (Lucky Orange, Hotjar) can set cookies via app embeds or ScriptTag independently of consent.
- Session-replay tools — Hotjar and Microsoft Clarity record shopper behaviour and carry specific US legal risk (see below).
- Embedded content — a YouTube embed, a Google Map, or a third-party iframe can set cookies on render, not on interaction.
This isn't a knock on Shopify — its API is more capable than most. But "a banner is showing" and "trackers are blocked" are two different things. Closing the gap needs every tracker wired into the API, or a consent layer that intercepts the ones that aren't. We built the deeper, Shopify-specific version of this — including the exact Web Pixels setup and a native-vs-ConsentPixel breakdown — into our cookie consent for Shopify guide.
Your 3 options for a compliant Shopify cookie banner
Once you know the gap exists, there are three realistic routes — honestly compared, strongest coverage first.
1. An independent consent tool (e.g. ConsentPixel)
Best for: any store running GA4, GTM, a Meta Pixel, non-API apps, or session-replay — especially with US visitors. A dedicated consent layer that blocks trackers before consent regardless of how they were added, passes all four Google Consent Mode v2 parameters, writes to the Customer Privacy API, detects GPC, and keeps a timestamped consent log. Among independent tools, ConsentPixel — Privacy · Verified is built prevention-first: it blocks the scripts rather than showing a notice over them.
2. A Shopify consent app (Pandectes, Enzuzo, and others)
Best for: stores wanting a native app-store install with a banner and policy bundle. These install from the App Store and integrate with the Customer Privacy API. They're capable and widely used. The difference is emphasis: verify the tier you pick actually blocks theme-code and non-API app scripts before consent — some manage API-wired tags well but leave manual injections firing.
3. Shopify's native cookie banner alone
Best for: stores using only Shopify-native features and Web-Pixels-wired tags, with no theme-code trackers. For that setup it's a reasonable baseline. But on its own it can't reach theme-code scripts or non-API apps, and its consent logging is basic — so it's rarely sufficient once you've added a real marketing stack.
Native vs Shopify apps vs ConsentPixel: an honest comparison
Here's the category-level view — where each route lands on what privacy law cares about. (For the tool-by-tool breakdown, see the Shopify platform page.)
| Capability | Shopify native | Shopify consent app | ConsentPixel |
|---|---|---|---|
| Writes to Customer Privacy API | Yes | Most | Yes |
| Blocks theme-code scripts before consent | No | Varies | Yes |
| Google Consent Mode v2 (all 4) | Partial | Some | Yes |
| GPC signal detection | No | Varies | Yes |
| CIPA session-replay blocking | No | Varies | Yes |
| Timestamped, exportable consent log | Basic | Varies | Full |
| Works on any platform (not just Shopify) | No | No | Yes |
The pattern: API-wired tags are table stakes. Coverage diverges on the thing that creates risk — blocking the scripts that live outside the API before consent.
The US angle most Shopify guides skip: CIPA
Nearly every "Shopify cookie banner" tutorial focuses on GDPR. It matters — but if any of your shoppers are in the United States, the more urgent 2026 risk is often the California Invasion of Privacy Act (CIPA). Plaintiffs' firms have built a sustained wave of "wiretapping" lawsuits arguing that session-replay tools, tracking pixels, and chat widgets capturing a shopper's activity before consent amount to unlawful interception. Under California Penal Code §637.2, a plaintiff can seek statutory damages of $5,000 per violation — often read per affected visitor — with no proof of harm required.
Why this hits Shopify stores specifically: the highest-risk category — session-replay like Hotjar and Clarity, plus conversion pixels on checkout — is exactly what gets added via theme code or non-API apps, outside the Customer Privacy API. A store running Hotjar on checkout and serving California shoppers can carry real exposure even with the native banner enabled. The fix is to hard-block those scripts until consent, not merely display a notice. You can follow the trend on our CIPA Lawsuit Tracker.
If your Shopify store uses any session-replay or heatmap tool added via theme code or a non-API app, and gets US traffic, confirm it does not fire before consent. It's the single highest-value privacy fix on most stores — and one the native banner's settings don't address.
See exactly what fires on your Shopify store before consent
Run the same scan a plaintiff's firm would: every tracker and cookie loading before opt-in — theme-code scripts and non-API apps included — in about 10 seconds. Then, if it's your store, close the gap and run ConsentPixel free for 14 days.
Scan your Shopify store free →Frequently asked questions
Does Shopify have a built-in cookie banner?
Yes. Shopify includes a native cookie banner under Settings → Customer privacy, built around its Customer Privacy API. You set region visibility (opt-in for the EU/UK, opt-out for US state-law regions), banner position, and a preferences control. With it configured, it can defer Shopify's own analytics and any tags wired through the Web Pixels system until a shopper consents. It does not, however, block scripts added through theme code — which is where much store tracking lives.
What is the Shopify Customer Privacy API?
It's Shopify's consent framework. Rather than a simple banner toggle, it stores each shopper's consent across four categories — analytics, marketing, preferences, and sale of data — and lets apps and tags check that state before firing. A correct setup maps the banner's Accept/Reject choices to those categories and passes them to the API; tags registered through Web Pixels then respect the choice. Tags added outside the API (via theme code) bypass it entirely.
Why do my tracking scripts still fire after a shopper declines?
Almost always because those scripts were added through theme code (theme.liquid or a custom HTML/Liquid block) rather than Shopify's Web Pixels or a consent-aware app. Scripts added that way fire on page load regardless of the banner — the Customer Privacy API never had a hook into them. The fix is to migrate them into the pixel system, or use a consent tool that intercepts theme-code scripts before they run. This is general information, not legal advice.
Is the Shopify cookie banner GDPR compliant on its own?
Not by default. The native banner can defer Shopify's own cookies and API-wired tags, but GDPR requires all non-essential processing to wait for consent — and the banner does not block theme-code scripts or non-API apps. If a shopper declines and your theme-code GA4, Meta Pixel, or Hotjar keep firing, you've met the notice requirement but not the consent requirement. To make a Shopify store genuinely compliant, wire every tracker into the API or pair the banner with a tool that blocks the rest before consent. This is general information, not legal advice.
Does my Shopify store have CIPA (US wiretapping) risk?
Potentially, yes — if your store uses session-replay or heatmap tools (like Hotjar or Clarity), tracking pixels, or chat widgets that capture shopper activity before consent, and you receive visitors from California. Under California Penal Code §637.2, plaintiffs can seek statutory damages of $5,000 per violation, often read per affected visitor, with no proof of harm required. These tools are usually added via theme code or non-API apps, outside the Customer Privacy API — so the native banner may not control them. The protective step is to hard-block session-replay and similar scripts until consent. This is general information, not legal advice.
Can I switch to an independent consent tool without downtime?
Yes. A single-snippet tool like ConsentPixel can be added alongside your existing setup; you verify the new banner is live, blocking, and writing to the Customer Privacy API, then remove any redundant consent app. Running a scan before and after confirms nothing non-essential fires before consent during the switch. Consent records don't transfer between platforms, so returning shoppers will re-consent — a normal event, not a defect.