lunalink.ai
← lunalink.ai blog
November 16, 2026 · The lunalink.ai team

Should Shopify merchants use a cookie banner for basic store analytics?

A tempting display of homemade cookies under glass dome at a cozy café in Tanzania.
Photo by Og Mpango on Pexels

You want to know where store traffic comes from, which products people view, and whether a campaign led to orders.

A cookie banner can make those numbers less complete. It can also be the right thing to use.

The question is not really whether banners are annoying. The question is where your visitors are, what data your store collects, and whether the banner actually controls that collection.

For a Shopify store serving the UK or EEA, use a properly integrated cookie banner before collecting basic Shopify analytics. For a US-only store, Shopify’s default setup is different, but you still need to inspect the tools installed on your store.

Start with where you sell

Shopify’s current default is region-based.

For new stores using automated privacy settings, Shopify shows its cookie banner by default to visitors in the UK and EEA when those regions are active markets. It does not activate the banner by default outside those regions, including the US.

That difference matters because Shopify treats analytics as non-essential data in its configured banner regions. A visitor there needs to consent before Shopify collects that data.

So, if you sell into the UK or EEA, turning the banner off because you want cleaner session counts is not a sensible fix. Those counts are meant to reflect consent in those regions.

If your store is US-only, Shopify says the US generally does not require opt-in consent for cookie-based data collection. That does not mean you can ignore privacy settings. Shopify separately supports data-sharing opt-outs for applicable US states, and tools beyond Shopify may have their own requirements.

Open Settings > Customer privacy in Shopify. Check:

  • Which regions are active markets
  • Whether automated privacy settings are on
  • Whether Shopify’s cookie banner is enabled for the UK and EEA
  • Whether you have a data-sharing opt-out setting for the places you serve

That takes less than a minute and gives you the starting point.

Basic analytics still uses cookies

“Basic analytics” can sound harmless because it is not an ad campaign or a pop-up retargeting list. But it can still involve non-essential cookies.

Shopify identifies `_shopify_s` as an analytics and reporting cookie. It identifies a browser-session and store combination. Its expiry rolls for 30 minutes.

Shopify also identifies `_shopify_y` as a cookie that supports Shopify Analytics, with a one-year expiry.

In banner regions, Shopify Analytics sessions depend on consent. Shopify’s own analytics reference says it counts sessions only when visitors consent through the cookie banner.

This changes how you should read your reports.

A fall in reported sessions after enabling a banner does not necessarily mean fewer people visited. Some visitors may have declined analytics cookies. Shopify also notes that other analytics platforms can calculate sessions differently, so two dashboards may not match even when both are working as designed.

Treat session figures as useful direction, not a census of every person who reached your store.

A banner is only useful if it controls the right things

The weak version of a cookie banner is a box that appears on screen but does not control tracking.

The other weak version is a third-party banner set up for one group of countries while Shopify is set up for another. Shopify warns that, when the regions do not match, non-essential data may be processed before the visitor has given consent.

If you use Shopify’s built-in banner, Shopify can manage consent for its own tools, cookies, and Pixels.

If you build or use another banner, it needs to work with Shopify’s Customer Privacy API. Shopify documents `shouldShowBanner()` for deciding whether the banner should appear. It documents this call for recording analytics consent:

```js window.Shopify.customerPrivacy.setTrackingConsent({"analytics": true}) ```

You do not need to write that code yourself to make a decision. But you should know whether the banner provider or developer has integrated it.

Ask one plain question: Does this banner pass analytics consent to Shopify’s Customer Privacy API?

If the answer is unclear, do not assume the banner controls Shopify Analytics correctly.

Check the tools outside Shopify

Shopify’s built-in banner does not automatically govern every script added to your store.

Shopify says manually installed third-party cookies, pixels, apps, and services may need a third-party consent banner or custom consent logic. This is the part that gets missed when a store owner sees Shopify’s banner and assumes the job is done.

Look in these places:

  • Settings > Customer privacy for Shopify’s own configuration
  • Apps for email, reviews, loyalty, heatmap, affiliate, and advertising apps
  • Online Store > Themes > Edit code for scripts added to theme files
  • Settings > Customer events for pixels
  • Your theme’s `theme.liquid` file for manually pasted tracking code

You are not trying to become a privacy engineer in one afternoon. You are making a list of what collects visitor data.

For each item, write down:

  • What it is
  • Whether it runs on every page
  • Whether it sets a cookie or sends data before consent
  • Whether it follows Shopify’s consent choice
  • Who can answer these questions if you cannot

A short list is better than an assumed answer.

Consider whether you need cookie-based analytics at all

We made a different trade for our own analytics.

Our analytics runs cookieless. We do not use cookies or a consent banner for it, and sessions stay in memory. That means we accepted less precision in return for a cleaner page and no banner.

That choice fits what we need to learn from our own site. It does not make cookie-based analytics wrong, and it does not answer the privacy question for every store.

It does show the real decision behind this topic: what information do you actually need, and what are you prepared to collect to get it?

Say you run a small catalogue and mainly need to know whether product pages get traffic, which referral sources send visitors, and whether a collection page is being found. Less detailed measurement may be enough.

Say you rely on advertising tools, remarketing, or detailed visitor journeys. Your setup may need more tracking, more careful consent handling, and a closer review of every tool.

Do not install extra tracking because a dashboard makes it available. Start with a question you need the data to answer.

European analytics exemptions are narrow

It is tempting to look for a broad rule saying analytics is always exempt from consent. The guidance is not that simple.

EU business guidance lists analytics or market-research tracking cookies among examples that require consent.

France’s CNIL describes a limited audience-measurement exemption, but only under strict conditions. These include analytics-only use, no matching with other customer files or cross-site data, IP truncation, a maximum 13-month tracker lifetime, clear user information, and an objection mechanism. CNIL also says most large analytics offerings do not qualify.

That is another reason not to relabel ordinary analytics as “essential” because you find it useful. Useful and necessary are not the same thing.

A practical decision for your store

Use this as a working rule.

  • You serve the UK or EEA: Use a cookie banner and make sure it is integrated with Shopify’s Customer Privacy API. Do not expect Shopify Analytics sessions to include people who decline.
  • You sell only in the US: Shopify does not activate its banner by default for basic cookie-based collection. Review your privacy settings, state-specific opt-out needs, and every non-Shopify tracker before deciding to leave it off.
  • You use Google Analytics, ad pixels, or scripts installed outside Shopify: Check them separately. Shopify’s built-in banner may not control them.
  • You want simple store trends, not detailed user tracking: Consider whether a cookieless measurement approach would meet your needs, with the understanding that it may be less precise.

The goal is not a perfect dashboard. It is a store setup you understand.

Your next step is simple: open Settings > Customer privacy, then make a list of every pixel, app, and tracking script that runs on your storefront. Decide on the banner after you know what it needs to control.

Sources

shopifyanalyticsprivacycookies

See how AI assistants actually read your store — a free 30-second scan, no install and no signup.

Check my store