Shopify guideGuide·11 min read
How to Set Up Cookie Consent on Shopify (Step by Step)
Shopify's built-in cookie banner takes minutes to switch on, but it only works if your tracking waits for it. Here are the exact admin steps for the UK, EU and US, plus the checks that make consent real.

Key takeaways
- Shopify has a built-in cookie banner under
Settings > Customer privacy > Cookie banner. You have to publish a privacy policy before you can turn it on. - With automated settings, a new store shows the banner to UK and EEA visitors when it has active markets there. Everywhere else it stays off unless you switch it on.
- US privacy laws such as California's CCPA work on opt-out, not opt-in. Shopify covers that with a Data sharing opt-out page and treats the Global Privacy Control signal as an opt-out.
- A banner only protects you if your tracking waits for it. Set each custom pixel's Permission to Required, and make any third-party banner use exactly the same regions as Shopify.
- Who it is for
- Store owners selling to the UK, EU or US
- Time needed
- About an hour, including testing
- What you need
- Admin access and a list of your apps and pixels
Switching on a cookie banner in Shopify takes about ten minutes. The harder part is making sure tracking actually waits for the visitor's answer. On a lot of stores I review, the banner looks right, the visitor clicks decline, and an ad pixel that someone pasted into the theme two years ago has already fired. The banner was never the problem. The scripts behind it were.
This guide covers both halves: the admin steps for Shopify's own banner and opt-out page, and the checks that make them work. Shopify's settings and the rules below come from Shopify's Help Center, the European Commission's Your Europe pages, GOV.UK and the California Attorney General, as checked on 7 November 2026.
What the rules ask for, by region
The UK and EU work on opt-in: no non-essential cookies until the visitor agrees. US state laws mostly work on opt-out: you may track, but people must be able to stop the sale or sharing of their data. One store selling to all three needs both setups.
| Region | Main rule | What your store needs |
|---|---|---|
| EU and EEA | ePrivacy Directive and GDPR | Consent before non-essential cookies, per purpose |
| UK | PECR, amended by the Data (Use and Access) Act 2025 | Consent for non-essential cookies, with a narrow analytics exception |
| California | CCPA | A "Do Not Sell or Share" link, and GPC honored |
| Other regions | Local privacy law | Check locally; the banner can run anywhere |
EU. The European Commission's guidance says tracking cookies used for advertising, analytics or market research need consent, and that they can't be set when the page first opens. Cookies that are strictly necessary for a service the visitor asked for, such as the shopping cart or a logged-in account, are exempt. Consent has to be specific to each purpose, so visitors must be able to accept some types and refuse others. Withdrawing consent must be as easy as giving it.
UK. The Data (Use and Access) Act 2025 keeps the ban on storing or reading information on a visitor's device without consent, unless an exception applies. Strictly necessary storage is still exempt, and the Act adds a new exception for collecting statistical information about how your online service is used, so you can improve it. That exception is narrow. Advertising and retargeting cookies still need consent, and whether your analytics setup qualifies depends on how it's configured, so read the ICO's current guidance before relying on it. On UK and EU stores I usually keep analytics behind consent anyway, so the banner behaves the same in both places.
US. The CCPA applies to for-profit businesses doing business in California that meet one of three tests: gross annual revenue over $25 million, buying, selling or sharing the personal information of 100,000 or more California residents or households, or earning half or more of their revenue from selling it. "Sharing" means cross-context behavioral advertising, which is exactly what ad pixels do. A covered business that sells or shares personal information must give a clear "Do Not Sell or Share My Personal Information" link and treat a Global Privacy Control (GPC) signal as a valid opt-out. Plenty of small stores fall below those thresholds, but Shopify's opt-out page costs nothing to switch on, so I add it to most US-facing stores.
Before you switch anything on
- Publish a privacy policy. Go to
Settings > Customer privacy > Privacy policy, chooseUse automated policyor write your own, and clickSave. Shopify won't activate the banner or the opt-out page without one. - List everything that tracks. Open
Settings > Customer eventsto see app pixels and custom pixels, then check your installed apps and your theme code for scripts pasted in directly. The free Shopify app detector shows which apps load on your storefront, which is a quick way to spot ones you forgot about. - Check your markets. Automated banner regions follow your active markets in
Settings > Markets. If you sell to the UK or EU without a market for them, the automated setup may not cover those visitors. - Decide between Shopify's banner and an app. Both work. The comparison further down helps you choose before you configure anything twice.
How to turn on Shopify's cookie banner
- Open the banner settings. Go to
Settings > Customer privacyand clickCookie banner. - Choose the regions. In
Regions and content, turn onUse automated settingsto follow Shopify's recommendations. To pick regions yourself, clickEditin theRegionssection, select them, clickDone, thenSave. - Write the wording. Click
Editin theContentsection. Say in one or two sentences what you use cookies for and that visitors can change their choice later. ClickDone, thenSave. - Set the appearance. Adjust colors and preferences, then click
Save. Give declining the same size and contrast as accepting. A banner that hides the reject option is hard to square with the rule that saying no must be as easy as saying yes. - Pick the position. In
Position, choose where the banner sits, clickSave, then clickViewto preview it. - Translate it. From the banner page, click
More actions > Localize. This opens Translate & Adapt, where the banner text sits underOnline store. A Dutch or German visitor shouldn't get an English-only consent request. - Check the footer link. Visitors change their mind through a
Cookie preferenceslink in the footer menu or the policies section. Open your storefront and make sure it shows.
In the regions you choose, the banner appears on the storefront, cart, checkout and customer account pages, so one setting covers the whole buying path.
Add the data sharing opt-out page for US visitors
- Check staff permissions. The person setting this up needs
Manage settings,Blog posts and pagesandMenuspermissions, because Shopify creates a page and a menu link. - Open the page settings. Go to
Settings > Customer privacyand clickData sharing opt-out page. - Set regions and content. Turn on
Use automated settings, or clickEditinRegionsto choose the regions, andEditinContentto change the text. - Place the link. In the
Menussection, choose where the link appears, usually the footer, and clickSave. Shopify adds an opt-out icon next to it automatically. A developer can restyle it with the CSS classshopify-dns-link-icon. - Link it from your privacy policy. If you edit the policy by hand, the Liquid variable
{{data_sharing_opt_out_page_url}}inserts the page address, and{% if data_sale_opt_out_enabled %}lets you show the paragraph only when the page is on.
You don't need a separate setting for Global Privacy Control. When a visitor's browser sends the GPC signal, Shopify opts them out of data sale, sharing and targeted advertising in the regions where your opt-out page is active.
Make your pixels and apps respect the choice
Shopify's consent features control what runs through Shopify. A script pasted straight into theme.liquid or a section file never asks Shopify for permission, so it fires whatever the visitor chose. That's the most common leak I find, and no banner setting fixes it.
- Custom pixels. Go to
Settings > Customer events, click theCustom pixelstab and open each pixel. UnderPermission, chooseRequiredand tick the purposes it serves: marketing, analytics or preferences. Set theData saleoption for visitors who have opted out, then clickSave. - Hard-coded scripts. Move them into a custom pixel or the vendor's official Shopify app, so they inherit the consent check. Delete the old snippet afterwards, or it keeps firing.
- Google consent mode. If you send data to Google through a custom pixel, Shopify says you have to add the Google Consent Mode v2 code yourself. Without it, and without valid consent, Google won't use that data for personalized advertising for visitors such as those in the EEA.
- Third-party banners. If you use a consent app, it must be properly integrated with Shopify's customer privacy settings. Otherwise Shopify doesn't know what the visitor chose.
Shopify's banner or a consent app
| Question | Shopify banner | Consent app |
|---|---|---|
| Cost | Included in your plan | Free or paid, by app |
| Where it's set up | Settings > Customer privacy | App settings, plus Shopify regions |
| Checkout and accounts | Shown in your chosen regions | Check the app's documentation |
| Translations | Translate & Adapt | Inside the app |
| Main risk | Scripts outside Shopify's pixels | Regions that don't match Shopify |
For most stores, Shopify's banner is enough. An app makes sense when your adviser wants something the built-in banner doesn't offer, such as a detailed cookie declaration, or when you run the same consent tool across several sites. If you go that way:
- Install and configure the app. Pick one from the Cookie Consent category of the Shopify App Store, turn on its banner and set its regions.
- Remove Shopify's banner. In
Settings > Customer privacy > Cookie banner, ifRemove cookie banneris available, click the horizontal menu icon, thenRemove cookie bannerandRemove. Two banners at once confuse visitors and give you two consent records that may disagree. - Match the regions exactly. Click the menu icon and
Set custom banner regions, orEditin theRegionssection, select every region where the app's banner shows, and clickSave. Shopify warns that if the regions don't match, non-essential data can be processed before a visitor consents.
Which consent setup does your store need?
- 1
Do visitors from the UK or EEA reach your store?
Yes: turn on the cookie banner for those regionsNo: next question
- 2
Do US visitors see ad pixels or retargeting on your store?
Yes: add the data sharing opt-out pageNo: next question
- 3
Does your adviser want features Shopify's banner doesn't offer?
Yes: use a consent app and match its regionsNo: Shopify's built-in tools will do
Whichever you choose, move hard-coded tracking scripts into custom pixels so they wait for consent.
Test it like a visitor would
- Open a private browser window, so no earlier choice is stored.
- Appear to be in a banner region. If you're outside one, use a VPN location inside it, or add your own region to the banner while you test.
- Watch the network before you click. Open your browser's developer tools, go to the Network tab and load a product page. Filter for your ad and analytics vendors. Nothing that needs consent should load yet.
- Decline, then browse. Click decline, add a product to the cart and go to checkout. Check the Network tab again on each page.
- Accept in a fresh window. Repeat with accept and confirm your pixels now fire. If they don't, your consent settings are blocking too much.
- Change your mind. Use the
Cookie preferencesfooter link to switch from accept to decline, and check tracking stops. - Test the US opt-out. In a US region, open the opt-out page and opt out, then repeat with a browser that sends the GPC signal.
Common mistakes
- Tracking code in the theme. Pixels pasted into
theme.liquidignore the banner. This is the one I fix most often. - A third-party banner with different regions. Data from visitors outside the overlap can be processed before consent.
- A hidden or tiny decline option. If accepting takes one click and declining takes four, consent is hard to defend.
- Manual regions that never get updated. If you picked regions by hand and later open a new market, check the banner covers it.
- An English-only banner on translated storefronts. Localize it in Translate & Adapt along with the rest of the store.
- Turning the banner off because conversions dropped. Measured conversions fall because less is measured, not because fewer people buy.
- A privacy policy that doesn't match reality. If you add apps or pixels, update the policy so it describes what you actually collect.
Cookie consent checklist
- Privacy policy published under
Settings > Customer privacy. - Cookie banner on for the UK, EEA and any other region you've chosen.
- Decline is as easy to find and click as accept.
- Banner text translated for every storefront language.
Cookie preferenceslink visible in the footer.- Data sharing opt-out page live and linked in the footer for US visitors.
- Every custom pixel set to
Requiredwith the right purposes. - No tracking scripts hard-coded in theme files.
- Google Consent Mode v2 code added to any custom Google pixel.
- Third-party banner regions, if used, match Shopify's exactly.
- Tested with decline, accept, a changed choice and GPC.
Next steps
Cookie consent is one part of handling customer data properly. My GDPR guide for Shopify stores covers the rest: privacy policies, marketing consent and customer data requests. If you sell mainly to American shoppers, my Shopify developer page for US stores explains how I work with US brands.
If you want someone to check what fires before consent on your store, I can look at your pixels, apps and theme code as part of a free store review. Moving tracking into custom pixels is usually a small job, and store development work starts from $300 with a fixed quote.
Free tools
Check your own store
Free, no sign-up. Each one runs a part of this guide for you.
Frequently asked questions
Does Shopify have a built-in cookie banner?
Yes. Go to Settings > Customer privacy > Cookie banner. You need a published privacy policy first. With automated settings, new stores show the banner to UK and EEA visitors when they have active markets there, and you can switch it on for any other region.
Do US Shopify stores need a cookie consent banner?
Most US state privacy laws, including California's CCPA, are built on opt-out rather than opt-in consent. Covered businesses need a clear way to opt out of the sale or sharing of data and must honor Global Privacy Control. Shopify's Data sharing opt-out page handles that, and you still need the banner for any UK or EU visitors.
Is Shopify's cookie banner enough for GDPR?
It records consent and stops data from visitors who decline being used for non-essential purposes, for tracking that runs through Shopify. Scripts hard-coded into your theme aren't covered, so move them into custom pixels. This is general information, not legal advice, so confirm your setup with a privacy adviser.
Why did my analytics numbers drop after adding a cookie banner?
Shopify says banners reduce the data available for analytics, marketing and personalization, such as session counts and conversion rates. Visitors who decline aren't measured in the same way, so reported numbers fall even if sales don't. Compare periods with the same consent settings.
Do I need a cookie consent app on Shopify?
Not usually. Shopify's own banner covers most stores. An app makes sense if your adviser wants features the built-in banner doesn't offer, such as a detailed cookie declaration. If you use one, remove Shopify's banner and set the same regions in both places.
What is Global Privacy Control?
GPC is a signal a visitor's browser can send to say they don't want their data sold or shared. Shopify treats it as an opt-out from data sale, sharing and targeted advertising in the regions where your data sharing opt-out page is active. California's Attorney General says covered businesses must honor it.
Sources
- Privacy settings, Shopify Help Center
- Understanding customer privacy settings, Shopify Help Center
- Managing custom pixels, Shopify Help Center
- Online privacy: cookies, European Commission, Your Europe
- Data (Use and Access) Act factsheet: PEC Regulations, GOV.UK
- California Consumer Privacy Act (CCPA), State of California Department of Justice
Related services and work

Written by Ashraf Siddik
I'm a Shopify developer and CRO specialist. I have built and improved Shopify stores since 2018, completed more than 1,000 projects, and hold a 4.96 average rating across 719 client reviews.
More guides
-
CRO8 min readUpdated
Why Shopify Stores Lose Sales on Mobile: A Practical CRO Checklist
Mobile visitors decide fast, with one thumb and plenty of distractions. Here is how to find the leaks on a Shopify store and fix them in the right order.
Read the guide -
CRO6 min readUpdated
Shopify CRO Audit Checklist for DTC Brands
The checklist I use to audit DTC Shopify stores, from checking that the data can be trusted to deciding which fixes to ship first.
Read the guide -
Apps6 min readUpdated
When to Build a Custom Shopify App Instead of Adding Another Subscription
Another subscription is the quickest fix, until you are paying for five apps that still don't match how your business works. Here is how to decide.
Read the guide -
Themes6 min readUpdated
How to Find Out What Theme a Shopify Store Uses
Every Shopify store names its theme in the page code. Here is where to look, how to read what you find, and what it means for your own theme choice.
Read the guide -
Apps5 min readUpdated
How to See What Apps a Shopify Store Uses
Apps leave traces in a store's page code: scripts from their own servers, app embed folders and pixel settings. Here is how to read them, and what to do with the list.
Read the guide -
Branding7 min readUpdated
How to Name a Shopify Store (and Check the Name Is Free)
A store name has to be easy to say, free as a domain and a handle, and clear of other brands. Here is the process I use with clients, and what Shopify lets you change later.
Read the guide