Most Shopify stores that sell into Europe now show a cookie banner. Far fewer have that banner connected to Google properly. The result is one of two problems: GA4 and Google Ads lose a large share of data for no good reason, or Google receives data without the consent signals it needs to use it.
This guide explains what Consent Mode v2 is, how consent works inside Shopify, the three ways to set it up, and how to check that the signals actually reach Google. It is a technical guide, not legal advice: what your banner should ask for is a question for your legal advisor.
What Consent Mode v2 is
Consent Mode is how Google tags learn what a visitor agreed to. Version 2 uses four signals, each granted or denied:
| Signal | Controls |
|---|---|
analytics_storage | Analytics cookies, such as GA4's client and session IDs |
ad_storage | Advertising cookies, such as Google Ads click IDs |
ad_user_data | Sending user data to Google for advertising |
ad_personalization | Remarketing and personalized ads |
The last two were added in version 2. For visitors in the European Economic Area, Google does not use data for personalized advertising unless Consent Mode v2 is active and the visitor has consented. That's why so many stores saw remarketing audiences shrink when they had a banner but no v2 signals.
How consent works on Shopify
- Customer privacy settings. In Settings, Customer privacy, Shopify can show its own cookie banner, per region, based on your markets.
- The Customer Privacy API. Every banner, Shopify's own or a third-party app, should record the visitor's choice through this API. App pixels and custom pixels in Customer events then run or wait based on that choice.
- Third-party banner apps. Apps like Pandectes, Consentmo or Cookiebot must be integrated with the Customer Privacy API. If they aren't, Shopify's pixels never learn the visitor's choice.
So there are two separate questions: does Shopify know the visitor's choice, and does Google? Consent Mode answers the second one.
Three ways to set it up
| Setup | Use when |
|---|---|
| Shopify banner plus the Google and YouTube app | Your Google tracking runs through the Google app. Consent passes to Google from Shopify's privacy settings. |
| Banner app with built-in Consent Mode | You use a third-party banner that sends Consent Mode v2 signals itself and is integrated with Shopify. |
| GTM or gtag in the theme | You run GA4 or Google Ads through your own tags. You set defaults and send updates yourself. |
If GA4 purchases come from a custom pixel, the pixel also needs consent handled. Shopify's help center notes that custom pixels need a code snippet to activate Consent Mode v2. See our guide to rebuilding the GA4 purchase event.
The GTM setup, step by step
1. Set defaults before any Google tag loads. Place this above your GTM or gtag snippet in theme.liquid:
<!-- In theme.liquid, before the GTM or gtag snippet -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
// Denied by default where consent is required (extend the region list for your markets)
gtag('consent', 'default', {
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
analytics_storage: 'denied',
region: ['AT', 'BE', 'DE', 'ES', 'FR', 'IE', 'IT', 'NL', 'PL', 'SE', 'GB', 'CH'],
wait_for_update: 500,
});
// Everywhere else
gtag('consent', 'default', {
ad_storage: 'granted',
ad_user_data: 'granted',
ad_personalization: 'granted',
analytics_storage: 'granted',
});
</script>2. Send an update when Shopify knows the choice. This reads the visitor's choice from the Customer Privacy API on page load and again whenever they answer the banner:
<script>
function sendConsent() {
const p = window.Shopify && window.Shopify.customerPrivacy;
if (!p) return;
const ads = p.marketingAllowed() ? 'granted' : 'denied';
gtag('consent', 'update', {
analytics_storage: p.analyticsProcessingAllowed() ? 'granted' : 'denied',
ad_storage: ads,
ad_user_data: ads,
ad_personalization: ads,
});
}
window.Shopify.loadFeatures([{ name: 'consent-tracking-api', version: '0.1' }], sendConsent);
document.addEventListener('visitorConsentCollected', sendConsent);
</script>3. Set consent requirements on other tags in GTM. Google tags check consent on their own. Non-Google tags in the same container, such as Meta or TikTok, need "Require additional consent" set in each tag's Consent Settings.
Our free tracking check looks at your banner, Shopify's customer privacy settings and the consent signals reaching GA4 and Google Ads, and tells you what to fix first. Read-only, within 3 business days.
Get a free tracking checkCheck the signals are arriving
- Network tab. Every GA4 request has a
gcsparameter.G111means ads and analytics storage are both granted,G100means both denied, andG101means ads denied but analytics granted. - Tag Assistant. Preview the container, open the Consent tab and check the default and update states on page load and after you answer the banner.
- GA4. Admin, Data streams, your web stream, then Consent settings shows whether consent signals are active for EEA traffic.
- Google Ads. Tools, Diagnostics shows Consent Mode status and coverage for your conversion actions.
What to expect in your numbers
A correct setup changes your reports, and it helps to know which changes are expected before someone asks why traffic dropped.
- Fewer observed users and sessions from consent regions. Visitors who decline analytics are no longer counted directly. How many decline depends on your banner design and audience.
- Some of the gap comes back as modeled data. With advanced Consent Mode and enough traffic, GA4 and Google Ads estimate part of what they can't observe. Smaller stores may not reach the thresholds needed for modeling.
- Remarketing audiences recover. Once ad_user_data and ad_personalization arrive correctly for visitors who consent, EEA users can be added to audiences again.
- Shopify still has every order. Consent affects tracking, not sales. Keep reporting revenue from Shopify and use GA4 for patterns, as covered in why GA4 and Shopify revenue don't match.
Common mistakes
- Defaults set after tags load. Tags fire before consent is known. Defaults must come first.
- Only two signals. Version 1 setups send ad_storage and analytics_storage only. Add ad_user_data and ad_personalization.
- Banner not connected to Shopify. Pixels in Customer events never fire, or always fire, regardless of the visitor's choice.
- Denied everywhere. Using EEA rules worldwide throws away data from markets where they are not required. Use region-specific defaults.
- Expecting GA4 to match Shopify. With consent required, GA4 will see fewer orders in those regions. That's expected, and our GA4 missing purchases guide shows how to separate it from real breakage.
Server-side tracking doesn't remove the need for consent either. A correct setup forwards only what the visitor allowed, as covered in our server-side tracking guide.
Common questions
Do I need Consent Mode v2 on Shopify?
If you advertise with Google to visitors in the European Economic Area, yes. Without valid Consent Mode v2 signals, Google does not use EEA data for personalized advertising and remarketing. Stores selling only outside the EEA and UK benefit less, but it is still good practice.
What is the difference between basic and advanced Consent Mode?
In basic mode, Google tags do not load until the visitor accepts. In advanced mode, tags load with consent denied and send cookieless pings, which lets Google model some of the conversions and visits it cannot observe. Advanced recovers more data. Which one is right for you is a legal decision as well as a technical one.
Does Shopify's own cookie banner support Consent Mode v2?
Shopify's customer privacy settings can pass consent to Google through the Google and YouTube app. If you use custom pixels or GTM, you need to send the consent signals yourself, as shown in this guide.
Does Consent Mode v2 cover Meta and TikTok?
No. Consent Mode is Google only. Meta, TikTok and other platforms rely on your banner and Shopify's customer privacy settings to decide whether their pixels run.
