GuideInfrastructure~15 min

Shopify

Complete technical guide: the e-commerce platform every data point starts from. Store architecture, pre-install cleanup, checkout, pixels, Privacy API, multi-currency markets and verification.

Connectors0/1
Store URL
Shopify Admin > Settings. e.g. my-store.myshopify.com

1Role / Purpose

Shopify is the source of all e-commerce data. The store emits the user events that the rest of the stack (Addingwell, GTM, sGTM) collects and distributes.

  • Source of e-commerce events (page_view, add_to_cart, purchase, …)
  • Proprietary checkout with the Custom Pixel API
  • Shopify Privacy API for pixel consent control
  • Markets for multi-currency and multi-language
  • Customer Events for web pixels and custom pixels

Shopify handles no marketing tag directly. Everything goes through Addingwell (DataLayer + GTM injection) and then GTM (tags + consent).

2Store Architecture

Stack layers on Shopify

Shopify Store
├── Theme (Storefront)
│   └── Public pages (home, collection, product, cart)
│
├── Checkout (isolated iframe)
│   └── Extensible through Custom Pixels
│
├── Customer Events (Settings)
│   ├── Web Pixels (JS sandbox)
│   └── Custom Pixels (arbitrary code)
│
├── Installed apps
│   ├── Addingwell (DataLayer + GTM + sGTM)
│   ├── Cookiebot (CMP via GTM)
│   └── Klaviyo (Shopify-native)
│
└── Privacy API
  └── Consent management for pixels

Key points

  • The theme plays no part in tracking (no custom Liquid code)
  • The checkout is isolated: only Custom Pixels reach it
  • Addingwell handles the whole DataLayer and GTM layer automatically
  • The Privacy API governs Shopify web/custom pixels only

3Pre-install Cleanup

Before installing the tracking stack you must clean up whatever is already there. Two tracking systems running in parallel means duplicate events, which means corrupted data.

Absolute rule

Clean up before installing the stack. One forgotten pixel or tracking app can corrupt all the data.

Apps to remove

AppReason
Facebook & Instagram (Meta native)Built-in Meta pixel, conflicts with Meta CAPI via GTM
Google & YouTube (Google native)Built-in Google tracking, conflicts with GA4 + Google Ads via GTM
Trackify, Pixel Perfect, Elevar, etc.Third-party tracking apps, guaranteed duplicates
Tracking scripts hardcoded in the theme<script> tags injected by hand into theme.liquid

Where to check

  1. 1Shopify Admin > Settings > Apps and sales channels: uninstall the tracking apps listed above
  2. 2Shopify Admin > Settings > Customer events (custom pixels): delete the old custom pixels
  3. 3theme.liquid — find and remove fbq('init', …), gtag('config', …) and any hand-injected tracking script

Disable Shopify's native privacy features

Consent conflict

Consent is handled by Cookiebot through GTM, not by Shopify. The native banner and opt-out page must be disabled to avoid conflicts (double banner, contradictory signals).

Go to Shopify Admin > Settings > Customer privacy:

SettingRequired value
Cookie banner — automated settingsOFF
Cookie banner — regionsNot shown in any region (uncheck every region)
Opt-out page — automated settingsOFF
Opt-out page — regionsNot active in any region (uncheck every region)
Privacy policyMay stay "Automated" (legal content, does not interfere)
Data hostingEuropean Union (consistent with CDS Region .eu in Cookiebot)

4DataLayer Events

The DataLayer is generated automatically by Addingwell. No custom code is needed in the theme.

Events per page

PageEventsKey data
Allpage_viewURL, title, referrer
Collectionview_item_list, select_itemProduct list, position
Productview_itemSKU, price, variant
Product / Collectionadd_to_cartItem, quantity, value
Cartview_cart, remove_from_cartItems, total value
Checkoutbegin_checkoutItems, value (Custom Pixel)
Checkoutadd_shipping_info, add_payment_infoShipping/payment method
Thank youpurchaseTransaction ID, revenue, items (Custom Pixel)

Single source

Every event flows through the same DataLayer. There is no second source: Addingwell is the only injector.

5Checkout Extensibility

The Shopify checkout is an isolated iframe. Theme JavaScript cannot reach it directly. Shopify offers two mechanisms for checkout tracking:

MechanismAccessUsage
Web PixelsJS sandbox (limited)Standard pixels (Meta)
Custom PixelsArbitrary code (full)Custom DataLayer, GTM events

Addingwell Custom Pixel

Addingwell uses a Custom Pixel to capture begin_checkout and purchase inside the checkout, then pushes them to the GTM DataLayer.

Permission: Not required

The Addingwell Custom Pixel uses "Not required". That is deliberate: consent is handled by Cookiebot inside GTM (Consent Mode v2), not by the Shopify Privacy API.

Checkout sandbox — testing limitation

GTM Preview does not work on the checkout

The Shopify checkout is an isolated sandbox. GTM Preview does not run there. Verify the begin_checkout and purchase events through DevTools > Network and the JavaScript console only.

6Web Pixels vs Custom Pixels

Web PixelsCustom Pixels
EnvironmentJS sandbox (worker)JS sandbox (iframe)
DOM accessNoNo
Cookie accessNoNo
Custom codeNo (config only)Yes (arbitrary code)
ConsentShopify Privacy APIConfigurable (Required / Not required)
ExampleKlaviyo, native MetaAddingwell DataLayer

Web pixels are managed by Shopify apps (Klaviyo and friends). Custom pixels are configured by hand under Settings → Customer Events.

7Shopify Privacy API

Role

The Shopify Customer Privacy API decides which web pixels and custom pixels are allowed to fire. It is kept in sync with Cookiebot through the bridge.

Consent flow

Cookiebot (CMP in GTM)
      ↓
Bridge cookie-consent_boostecom.liquid
      ↓
Shopify.customerPrivacy.setTrackingConsent({
marketing: true/false
})
      ↓
Web pixels fire / blocked

What the Privacy API governs

ElementGoverned by Privacy APIGoverned by GTM Consent Mode
Web pixels (Klaviyo, native Meta)YesNo
Custom pixelsIf permission = RequiredNo
GTM tags (GA4, Meta CAPI, …)NoYes
Theme scriptsNoNo

Shopify's native banner

The Shopify cookie banner and opt-out page must be disabled (no region checked) to avoid conflicts with Cookiebot. See the Pre-install Cleanup section for details.

8Markets & Multi-currency

Shopify Markets handles multi-currency and multi-language. Tracking must support conversions in the local currency.

Impact on tracking

  • Addingwell includes the currency in every e-commerce event
  • Values (value, price) are in the visitor's local currency
  • GA4 supports multi-currency natively
  • Meta CAPI receives the correct currency through the sGTM
  • No extra configuration needed

The Addingwell DataLayer handles the local currency automatically. No extra configuration is needed for markets.

9Configuration

Prerequisites

  • Active Shopify store (Basic plan or above)
  • Admin access with the Apps and Customer Events permissions
  • Custom domain configured
  • Pre-install cleanup done (see section 3)

Apps to install

  1. 1Addingwell — GA4 DataLayer, GTM injection, adblocker bypass, cookie restore
  2. 2Cookiebot — GDPR CMP (consent banner, configured through GTM)

Addingwell features to enable

FeatureRole
GA4 DataLayer11+ automatic e-commerce events
GTM injectionGTM on every page of the store
Checkout Custom PixelCheckout events (begin_checkout, purchase)
Adblocker bypassCDN proxy, works around blockers
Cookie restoreSafari ITP bypass, long-window attribution

Checkout Custom Pixel

  1. 1Go to Shopify Admin > Settings > Customer Events
  2. 2Add custom pixel > paste the code Addingwell provides
  3. 3Permission: "Not required" (not "Required"), consent is handled by GTM, not the Privacy API

sGTM server

  1. 1Create the server in Addingwell
  2. 2Configure the custom domain (e.g. tags.my-store.com)
  3. 3Recommended region: Europe multi-region
  4. 4DNS: the CNAME provided by Addingwell > Server > Custom Domain

Post-install checks

  1. 1Addingwell connected and active in the dashboard
  2. 2Addingwell Custom Pixel present under Settings → Customer Events
  3. 3Custom Pixel permission = "Not required"
  4. 4Shopify native banner disabled (Settings → Customer Privacy)
  5. 5Consent bridge present in theme.liquid (cookie-consent_boostecom.liquid)
  6. 6DataLayer Monitor custom pixel installed under Customer Events
  7. 7sGTM custom domain answers with status 200

10Verification

Verify the DataLayer

  1. 1Open the browser console on the store
  2. 2Type dataLayer and check the events are there
  3. 3Browse: home → collection → product → cart
  4. 4Check page_view, view_item_list, view_item, add_to_cart, view_cart
  5. 5Complete a test checkout → check begin_checkout and purchase

Verify the Custom Pixels

  1. 1Shopify Admin → Settings → Customer Events
  2. 2Check the Addingwell Custom Pixel is present and active
  3. 3Check the permission reads "Not required"
  4. 4Check the DataLayer Monitor is present and active
  5. 5No other conflicting custom pixel

Verify the Privacy API

  1. 1Browser console → Shopify.customerPrivacy.getTrackingConsent()
  2. 2Before consent: marketing = "no_interaction"
  3. 3After accepting in Cookiebot: marketing = "yes"
  4. 4After declining in Cookiebot: marketing = "no"

Pre-consent test (private window)

  1. 1Open the site in a private window
  2. 2Click "Deny all" in the Cookiebot banner
  3. 3GTM Preview: check that only Necessary tags fire
  4. 4Network: no request to GA4, Meta or Google Ads

Post-consent test

  1. 1Open the site in a private window
  2. 2Click "Accept all" in the banner
  3. 3GTM Preview: analytics and marketing tags must fire
  4. 4GA4 DebugView: events visible in real time

Purchase test — test order

Place a test order, then run this in the console:

javascript
dataLayer.filter(e => e.event === 'purchase')
  • transaction_id unique (no duplicates)
  • value correct (total price including tax and shipping)
  • currency valid (ISO 4217, e.g. EUR, USD)
  • items array complete, with every product

Final cleanup

Once the stack is verified, confirm that nothing left behind can interfere:

  • "Facebook & Instagram" app removed (native Meta pixel)
  • "Google & YouTube" app removed (native Google tracking)
  • Old tracking apps removed (Trackify, Pixel Perfect, Elevar, …)
  • No manual tracking script left in the theme (liquid)
  • Shopify cookie banner + opt-out page disabled (no region checked)

11Troubleshooting

Empty DataLayer

Check:

  1. 1Addingwell app installed and active
  2. 2Store connected in the Addingwell dashboard
  3. 3No conflict with another DataLayer script
purchase missing

Check:

  • Custom Pixel active under Settings → Customer Events
  • Permission = "Not required"
  • No JS error in the checkout console
  • DataLayer Monitor active for diagnosis (?awdebug=1)
Privacy API returns no_interaction after consent

Check:

  • Bridge cookie-consent_boostecom.liquid present in theme.liquid
  • Position: after {{ content_for_header }}
  • Shopify.loadFeatures fine in the console
  • CookiebotOnConsentReady event fires
Duplicate events

Check:

  • Native pixels still active (Facebook & Instagram, Google & YouTube)
  • event_id not passed in the DataLayer
  • GTM containers imported more than once
  • Remove the native tracking apps and check the event_id
Checkout events missing (begin_checkout, purchase)

Check:

  • Addingwell checkout custom pixel not active
  • purchase trigger missing in GTM
  • sGTM request not sent (check Network)
  • Check in the console: dataLayer.filter(e => ['begin_checkout','purchase'].includes(e.event))
Cookie restore not working

Check:

  • Not enabled under Addingwell > Settings
  • sGTM custom domain DNS incorrect
  • Check the shopify_y field in the DataLayer
  • Check the DNS records (CNAME)
Cookiebot banner missing

Check:

  • Wrong CBID in the GTM variable
  • Domain invalid under Cookiebot > Settings > Domain Groups
  • Cookiebot tag disabled in GTM
Klaviyo loads before consent (~16 requests)

Check:

  • Expected behaviour — the Klaviyo app embed loads on first render
  • The Cookiebot → Shopify Privacy API bridge governs consent for the Klaviyo web pixels
  • Check that cookie-consent_boostecom.liquid is installed
  • setTrackingConsent must be called after CookiebotOnConsentReady
Shopify Checklist0/12

Check the layer you just set up

Scan the store: 41 checks read what it now sends to GA4, Meta and Google Ads.