Stape - Shopify: recommended cookie banner + consent setup

Hi,

Looking for recommendations on a best-practice cookie banner + consent architecture for a Shopify setup using Stape server-side tracking.

Setup:

  • Shopify + Stape Shopify App (enabled)
  • Web + server-side GTM (via Stape)
  • Tags implemented via GTM

Requirements:

  • Google Consent Mode v2 is correctly implemented across web + server-side GTM
  • Tracking respects consent in all contexts, including Shopify checkout / purchase flow
  • With multiple consent/CMP apps in Shopify I’m currently running into issues where auto-blocking prevents GTM from loading correctly, which breaks Google Consent Mode implementation. This should be avoided in the recommended setup.

What is the recommended cookie banner / CMP + consent architecture for this stack?

Hi,

There isn’t really a specific cookie banner that we recommend.
You can use any banner that supports GCM v2 - Set up your consent banner with a consent management platform or a content management system - Analytics Help

But we would recommend not blocking the GTM loader at the consent banner level. (if this is not a problem for you from a legal point of view)
The best practice is to manage consent - at the tag level (which is what you are doing now).
It’s also best to initialize the CMP banner through GTM, that way you’ll be sure it will cover all pages where GTM is loaded+ consent status will work as expected in checkout extensibility for begin_checkout and purchase events.

The auto-blocking issue you’re hitting is one of the most common architectural problems in this stack — but the fix depends on which Consent Mode approach you’re using.

The core distinction: Advanced vs Basic Consent Mode.

In Advanced mode, GTM loads before consent and sets all consent types to denied via a Consent Initialization trigger. Tags with built-in consent checks wait for the CMP to update consent state. Google may send limited pings without storage access, depending on consent state and whether first-party identifiers are already present. In this setup, your CMP should not block GTM from loading — it should integrate via GTM’s consent API and push updates to the dataLayer.

In Basic mode, tags are intended to be fully blocked until consent is granted — but this depends on correct enforcement in your GTM setup, it’s not automatic. Some interpretations — particularly in Germany after the Hanover Administrative Court ruling (VG Hannover, 10 A 5385/22) — treat GTM loading itself as terminal access under TTDSG §25(1), which increases legal risk for Advanced setups with significant German traffic. If your exposure to strict jurisdictions is high, the safer architecture is: CMP loads first, GTM is dynamically injected only after consent for the relevant categories.

Bottom line: “CMP blocks GTM” isn’t always a bug — it depends on your Consent Mode choice and your traffic’s jurisdictional risk profile. For a pan-EU Shopify store, you may need region-specific logic.

Recommended architecture (Advanced mode):

  1. CMP: use one that integrates via GTM consent API — Cookiebot, Usercentrics, or CookieYes all have GTM templates. But don’t stop there: your CMP also needs to sync with Shopify’s Customer Privacy API. Usercentrics has a specific integration for this. Without that sync, you’ll end up with conflicting consent states — and this is the single biggest operational risk in this stack: CMP pushes one state to GTM, Shopify’s Customer Privacy API holds another, the checkout pixel reads Shopify’s _tracking_consent cookie, and sGTM reads Google’s gcs/gcd parameters. That’s four potential consent sources. Pick one source of truth and sync everything to it.

  2. GTM web container: Consent Initialization tag sets all consent types (analytics_storage, ad_storage, ad_user_data, ad_personalization) to denied by default. Verify in Tag Assistant that this fires before any GA4/Ads tag.

  3. sGTM consent propagation: consent signals reach sGTM via gcs and gcd parameters — but only for requests generated by Google tags that actually load after Consent Mode is initialized. Important: gcs/gcd are Google-ecosystem parameters. They do not cover Meta CAPI, custom endpoints, or server-side enrichment payloads. For non-Google tags, you need to enforce consent checks independently in your server container. Also not covered: webhook/data connector events that bypass the web container, or checkout events where consent state wasn’t passed. Check your sGTM Preview for consent fields in the event data.

  4. Shopify checkout: your GTM container doesn’t run in checkout natively — Shopify’s checkout uses a sandboxed environment. The supported path is Customer Events / Web Pixels with Shopify’s Customer Privacy API controlling when pixels can fire. Consent in checkout does not come from your GTM dataLayer — it comes from Shopify’s _tracking_consent cookie and Customer Privacy API state. Note: _tracking_consent is not automatically synchronized with your CMP — even if you have a single banner on the storefront, checkout consent state can diverge unless you explicitly sync your CMP with Shopify’s Customer Privacy API. If you’re using Stape’s data connector for purchase events, be aware it does not require accepted consent by default — you need to enable the Customer Privacy API consent toggle and verify that purchase webhooks actually carry consent state. Test this separately.

Diagnostic checklist:

  • Tag Assistant: does Consent Default fire before any measurement tag?

  • Network tab: are gcs/gcd parameters present on page_view, add_to_cart, begin_checkout, purchase?

  • sGTM Preview: do consent fields appear in event data — including for purchase events?

  • Checkout: run a separate test — does the purchase event carry correct consent state from _tracking_consent / Customer Privacy API, or does it arrive with default/denied regardless?

  • Non-Google tags (Meta CAPI, etc.): are you enforcing consent checks server-side independently from gcs/gcd?

Hi @enricoforte,

Thanks for your detailed explanation, I really appreciate it.

From what I understand, your recommendation leans toward a Usercentrics-style architecture as the cleaner long-term setup, especially for syncing CMP → GTM → Shopify Customer Privacy API → sGTM.

What is still not fully clear to me (apologies if I’m misunderstanding) is the following:

Are you advising to implement the Shopify Cookiebot app (CMP handled inside Shopify), or would you recommend setting up the consent banner directly via GTM instead and letting GTM be the central point of consent handling?

In other words:

  • Should Shopify act as the CMP layer (via the Cookiebot app / Shopify app integration), with GTM simply consuming consent signals?

  • Or should GTM become the primary layer for consent logic, with the banner and consent handling fully controlled there?

I want to make sure I choose the right “source of truth” architecture from the start, so everything (Shopify checkout, GA4, Ads, and server-side tracking via Stape) stays fully aligned.

Looking forward to your guidance on this.