Skip to content

Guide · Shopify and privacy

Shopify analytics without a cookie banner?

When a Shopify store needs consent for analytics, what Shopify's banner and Customer Privacy API do, and what cookieless analytics can and cannot give you.

Updated

The rules

When a store needs consent for analytics.

This guide is not legal advice. It explains the rules and the tools in plain words. Your duties depend on your market, your apps and how you use the data. Ask a lawyer for your store.

Does Shopify analytics need a cookie banner?

For visitors in the EU and the UK, usually yes, unless every tool on the store fits an exemption. Shopify can set up its own banner for these regions.

Shopify's privacy settings can configure the cookie banner automatically for visitors in the UK and the EEA when you have active markets there. In those regions, Shopify says that "non-essential data is collected only after obtaining consent". Outside the configured regions, the banner is not active by default.

Shopify's own reports follow the banner. In the Shopify analytics fields, Sessions are "only counted when visitors consent to cookies through your cookie banner". So a store with a banner sees fewer sessions in Shopify than it gets. Shopify sets the _shopify_analytics cookie, which "contains analytics data for buyer surfaces such as the storefront or checkout", for one year.

What does EU law say about analytics cookies?

Article 5(3) of the ePrivacy Directive covers any storage of information on a visitor's device, and any access to it. Such storage or access needs consent, unless it is necessary for one of the purposes in that article.

The European Data Protection Board (EDPB) explains the scope in its Guidelines 2/2023. It says that storage and access are "only allowed on the basis of consent or necessity for specific purposes set out in that Article". It also says that Article 5(3) "does not exclusively apply to cookies". JavaScript that tells the browser to send information from the device to a server "clearly falls within the scope". Each EU country writes the directive into its own law, so the details differ.

Is there an exemption for audience measurement?

In France and the UK, yes, with conditions. The CNIL and the ICO each describe an exemption for simple analytics. A tool that also follows single people does not fit it.

The CNIL lists these conditions for audience measurement trackers that do not need consent:

  • Tell users about the trackers, and let them object.
  • Use the data only for audience measurement and A/B testing.
  • Do not cross-check the data with other processing, such as customer files.
  • Limit the tracker to a single site or app publisher.
  • Truncate the last byte of the IP address.
  • Limit the lifetime of the trackers to 13 months.

The ICO describes a "statistical purposes" exception, which it also calls the "analytics" exception. It needs "clear and comprehensive information about the purpose, and a 'simple and free' means to object". The ICO also says that it "does not allow you to monitor or track individual visitors to your service".

Ecommerce analytics often goes past counting. A report that joins an order to one customer's visits follows a single person. Check each feature that you use against the conditions, not only the cookie names.

Is cookieless analytics exempt from consent?

Not by default. No cookies makes the case simpler, but the EDPB guidelines are not only about cookies. Your lawyer has to look at what the script reads and sends.

A cookieless tool stores nothing on the device, so a big part of the question goes away. But the script still runs in the browser and sends a request for each page. The EDPB lists routing identifiers, such as the IP address, among the information that Article 5(3) can concern. Many site owners use cookieless analytics without a banner. That is a decision that you take for your store, not a feature that a vendor can give you.

On Shopify

Shopify's banner and the Customer Privacy API.

What does Shopify's cookie banner control?

Shopify's banner controls Shopify's own tools and the pixels that run in Shopify's pixel manager. Other scripts must read the consent themselves.

Shopify says that its banner "governs Shopify-specific tools, including cookies and Shopify Pixels". The banner can show on the storefront, the cart, the checkout and the customer account pages. For cookies or pixels that you add by hand or through apps, Shopify says that "you may need to use a third-party cookie banner or add custom logic" to make sure that they respect consent.

What is the Shopify Customer Privacy API?

It is a JavaScript API in the browser. It tells a script which kinds of processing the visitor allows: analytics, marketing, preferences and sale of data.

A script loads the API with loadFeatures and the feature consent-tracking-api. Then it calls window.Shopify.customerPrivacy.analyticsProcessingAllowed(), which returns true or false. Shopify combines the merchant settings, the visitor's location and the visitor's choice to get that answer. When the visitor makes a choice, the API sends the document event visitorConsentCollected. Shopify says that in regions that require consent, "non-essential purposes are not allowed by default until consent is given".

Web pixels use the same consent. A pixel declares the permissions that it needs, and Shopify's pixel manager "will only load your pixel if there is visitor permission for all of the settings" that it requires.

Do script tags respect Shopify's banner?

Shopify does not promise that. Its help page says that cookies and pixels that you add by hand or through apps may need custom logic to respect consent.

Shopify's developer changelog also says that script tags have an end date. From 1 October 2026, the scriptTagCreate and scriptTagUpdate API calls return an error. On 1 March 2027, "Shopify will stop injecting script tags into storefronts". Shopify recommends a web pixel for scripts that only collect analytics or conversion data. The changelog says that web pixels "run in a sandbox and respect customer privacy permissions".

Your options

Three ways to run analytics on a Shopify store.

Each option gives up something. The table shows what you keep and what you lose.

Options for analytics on a Shopify store and consent
OptionShopify banner and Customer Privacy APICookieless analyticsFirst-party analytics after consent
What it isShopify's banner asks each visitor. Tools that read the Customer Privacy API wait for a yes.The analytics tool stores nothing on the device. It counts visits on the server.A first-party tool that loads only after the visitor allows analytics.
Banner on the storeYes, in the regions you setMaybe. It depends on your law and on the rest of the store.Yes
Visitors you countOnly the visitors who acceptAll visitorsOnly the visitors who accept
Returning visitorsYes, for visitors who acceptNo. A visitor is new each day.Yes, for visitors who accept
Order to visit linkYes, for visitors who acceptOnly through an email matchYes, for visitors who accept
Work for youTurn on the banner. Check that each app respects it.Turn on the mode. Check what else on the store sets cookies.A theme snippet that reads the Customer Privacy API

twelvebit on Shopify

What twelvebit does on a Shopify store today.

twelvebit is one of the tools that you can use for these options. This part says what it does, also where it does not fit an option yet.

Does twelvebit set cookies on a Shopify store?

Yes, by default. The script sets two first-party cookies unless cookieless mode is on.

The cookies are _tb_vid, a random visitor ID for 1 year, and _tb_sid, a random visit ID for 30 minutes. twelvebit sets no third-party cookies. In Shopify mode, the script also writes both IDs into the cart as attributes, so each order carries them. Then twelvebit joins the paid order to the visit that led to it. The ecommerce revenue attribution guide explains this model.

Does the twelvebit Shopify install respect the Customer Privacy API?

No, not today. The script does not call the Customer Privacy API, and it does not wait for the visitor's choice on Shopify's banner.

When you connect a store, twelvebit adds the script with a ScriptTag on the online store. twelvebit does not ask Shopify to hold that tag until consent. The copy also does not read the site's cookieless setting: it sets the two cookies. With the cookieless setting on, the twelvebit server ignores the cookie IDs and counts with its daily hash, but the browser still stores the cookies.

twelvebit installs its Shopify script with a ScriptTag today. Shopify's script tag deprecation applies to this install method too. The orders come through the orders/paid and refunds/create webhooks, from Shopify's server to twelvebit's server. They do not use the visitor's browser.

Can twelvebit run cookieless on Shopify?

Yes, with a theme tag and a loss of order attribution. Paste the tag with data-cookieless="true" into theme.liquid, and turn on cookieless mode in the site settings.

In cookieless mode the script sets no cookies and uses no storage. The server makes the visitor ID from a hash of the IP address, the user agent, the site and a secret salt that changes each day. The IP address is not stored. The script then puts no IDs on the cart. An order joins a visit only when its email matches a visitor who identified. A visitor is new each day, so returning visitors and multi-day journeys are not counted.

Only one copy of the script runs on each page. If you also connect the store, the ScriptTag copy can run before your theme tag. Then it sets the two cookies. Check the cookies in a private window after each change.

Can twelvebit load only after consent?

Yes, with your own theme code, but not together with the store connection today.

A snippet in theme.liquid can load the Customer Privacy API, call analyticsProcessingAllowed(), and add the twelvebit tag only when it returns true. It can also listen for visitorConsentCollected. twelvebit does not ship this snippet. The ScriptTag from the store connection does not wait for that answer, so this setup works only without the connection. Then twelvebit counts the visits but does not get the orders from Shopify.

Where does twelvebit process the data?

In the EU. The app runs in Frankfurt, Germany, and the database runs in Vienna, Austria. twelvebit uses the IP address only while it handles a request, for exclusions, flood protection and the cookieless hash. It does not store IP addresses. The privacy docs list each field, and security and data covers the hosting.

Cookieless mode is part of every plan. Plans start at $9 a month for 10k events. Setup for a store is in the Shopify revenue docs, and the ecommerce page shows the reports.

Decide

Which option fits your store?

How do you choose between them?

Choose by what you need to know. If you need the channel for each order, you need an ID on the cart, and in the EU and the UK that usually means consent.

If you sell mostly outside the EU and the UK, Shopify does not show the banner by default, and a cookie-based tool gives you the most data. Check the law of each market first. If you sell in the EU or the UK and want counts of all visitors, cookieless analytics counts visitors who decline or ignore the banner, but you lose returning visitors and most of the order attribution. If you need order attribution in the EU or the UK, plan for consent and accept that you count fewer visitors.

What should you check before you remove a banner?

  • List every app, pixel and script on the store. Shopify's banner controls Shopify's own tools. Other tools can need their own logic.
  • Open the store in a private window from an EU or UK address. Look at the cookies before you click the banner, after you accept, and after you decline.
  • Write down which tool sets which cookie, how long it lives, and why. Put this in your privacy notice.
  • Give visitors an easy way to object, also when you rely on an analytics exemption.
  • Ask a lawyer who knows the law of your market. Rules differ between countries.

A store with no banner must have no tool that needs consent. One theme app or marketing pixel can be enough to need one. No analytics setup, from twelvebit or another vendor, removes that check for you.

Sources

Facts about Shopify and about the law come from these pages, read on 19 October 2026. Facts about twelvebit come from its own code and docs. Write to hello@twelvebit.io if something here is out of date.

More guides →

Paste one prompt. Watch the first events arrive.

Start free. Your agent does the setup, and you see revenue next to the traffic that brought it.

14-day free trial · cancel any time