GuideCRM~10 min

Klaviyo

Technical guide: email and SMS CRM for Shopify. Native integration, events, consent, flows, attribution, verification.

Connectors0/1
Klaviyo Public API Key
Klaviyo > Settings > API Keys. e.g. pk_xxxxx (native Shopify integration)

1Role / Purpose

Klaviyo is the email/SMS CRM wired natively into Shopify. It collects customer data and e-commerce events to drive automated marketing flows.

  • Automated emails (welcome, cart abandonment, post-purchase, winback)
  • Marketing and transactional SMS
  • Advanced behaviour-based segmentation
  • Email/SMS attribution (revenue credited to campaigns)
  • Native Shopify integration (no GTM needed)

Klaviyo uses the native Shopify integration, not GTM. It is not part of the DataLayer → GTM → sGTM flow, it is a standalone destination.

Place in the stack

DestinationTypeConsent
GA4sGTM transportanalytics_storage
Meta CAPIsGTM tagad_storage, ad_user_data
Google Ads Enhanced Conv.sGTM tagad_storage, ad_user_data
KlaviyoNative Shopify integrationad_storage

Essential flows

FlowTriggerImpact
Welcome SeriesSubscribed to ListOnboarding + first conversion
Cart AbandonmentAdded to Cart → no Placed OrderRevenue recovery
Checkout AbandonmentStarted Checkout → no Placed OrderRevenue recovery
Post-PurchasePlaced OrderReview, upsell, loyalty
WinbackPlaced Order → inactive 60d+Customer reactivation
Browse AbandonViewed Product → no Add to CartProduct engagement

Key segments

  • Engaged (opened/clicked in the last 30d)
  • VIP (3+ orders or 500+ EUR)
  • At Risk (no order for 60d)
  • Churned (no order for 120d)
  • New Subscribers (signed up in the last 7d)

Email / SMS attribution

Klaviyo credits a conversion when the recipient opened or clicked inside the attribution window.

TypeDefault windowCondition
Email opened5 daysOpen + order
Email clicked5 daysClick + order
SMS clicked5 daysClick + order
Flow5 daysLast email/SMS in the flow

Double attribution

Klaviyo and GA4/Meta can both credit the same conversion. That is expected: each platform has its own attribution model. Never add revenue across platforms.

2Architecture

Native Shopify vs sGTM

Unlike GA4, Meta CAPI and Google Ads, which travel through the DataLayer → GTM → sGTM stack, Klaviyo runs on an independent native Shopify integration.

sGTM tracking stack:
Shopify → Addingwell → DataLayer → GTM Web → sGTM
  ├── GA4 (server-side transport)
  ├── Meta CAPI (Full CAPI, server-only)
  └── Google Ads Enhanced Conversions

Klaviyo (independent):
Shopify → Native integration
  ├── Shopify API (orders, customers, products)
  ├── App Embed (onsite tracking)
  ├── Web Pixels (checkout, consent-gated)
  └── Webhooks (fulfillment, refunds)

Klaviyo has no GTM configuration. The integration is handled entirely by the Shopify app. Its only link to the tracking stack is consent, through the Cookiebot → Privacy API bridge.

3Native Shopify Integration

Data flow

Shopify Store
├── Shopify API (orders, customers, products)
│   └── Automatic sync to Klaviyo
│
├── Klaviyo App Embed (storefront)
│   └── Enables Identify, onsite tracking
│
├── Klaviyo Web Pixels (checkout)
│   └── Checkout events (via Shopify Privacy API)
│
└── Shopify webhooks → Klaviyo
  └── Orders, fulfillment, refunds

What Klaviyo receives from Shopify

  • Product catalogue (automatic sync)
  • Order history (backfilled at install time)
  • Customer profiles (email, name, address)
  • Real-time events (Placed Order, Started Checkout, …)
  • Fulfillment and refund data

Installation steps

1Install the Klaviyo app from the Shopify App Store
2Configure the Public API Key in the Klaviyo app
3Check that the Klaviyo app embed is active in the theme
4The Cookiebot → Shopify Privacy API bridge (Step 1.4) controls consent for Klaviyo

Klaviyo Web Pixels

Klaviyo web pixels are installed automatically by the app. They track checkout events inside the Shopify sandbox.

  • Started Checkout — the purchase process begins
  • Order Completed — purchase confirmed (deduplicated against the API)

Web pixels are governed by the Shopify Privacy API. The Cookiebot bridge controls whether they activate, via setTrackingConsent.

Consent architecture

Cookiebot (CMP in GTM)
      ↓
Bridge → Shopify Privacy API
      ↓
setTrackingConsent({ marketing: true/false })
      ↓
Klaviyo web pixels enabled / blocked

The app embed loads before consent

The Klaviyo app embed loads before consent (~16 requests). Those initial requests are technical, not marketing. The Cookiebot → Shopify Privacy API bridge then decides which web pixels may fire.

What consent controls

Klaviyo elementConsent requiredWithout consent
App embed (Active on Site, Viewed Product)NoAlways works
Checkout web pixelsYes (marketing)Blocked
API sync (Placed Order, profiles)NoShopify server-side
Transactional emailsNoDelivery guaranteed
Marketing emailsEmail opt-in requiredUnrelated to the CMP

Consent per destination (across the stack)

DestinationRequired signalsCookiebot category
GA4analytics_storageStatistics
Meta CAPIad_storage, ad_user_dataMarketing
Google Adsad_storage, ad_user_dataMarketing
Klaviyoad_storageMarketing
CookiebotNoneNecessary

CMP consent (Cookiebot) governs the Klaviyo web pixels. It does not block the Shopify API sync or the emails. Email opt-in is a separate consent, collected by the Klaviyo form.

5Events & Data

Klaviyo events

Klaviyo eventSourceDescription
Active on SiteApp embedVisitor active on the store
Viewed ProductApp embedProduct page view
Added to CartApp embedAdded to cart
Started CheckoutWeb pixelCheckout started
Placed OrderShopify APIOrder confirmed
Ordered ProductShopify APIPer-product order detail
Fulfilled OrderShopify webhookOrder shipped
Cancelled OrderShopify webhookOrder cancelled
Refunded OrderShopify webhookOrder refunded

Difference from GA4

Klaviyo events are independent of the GTM DataLayer. Klaviyo collects on its own through the app embed and the Shopify API. There is no duplication.

Native data vs enrichment

DataNative sourcePossible enrichment
Email, name, addressShopify APIAlready complete
Order historyShopify API (backfill)Already complete
Onsite browsingApp embedAlready complete
Checkout eventsWeb pixelConsent-gated
UTM / source attributionNot nativeVia custom properties or flow triggers
Engagement scoreComputed by KlaviyoCustom segments

6Configuration

Prerequisites

  • Active Klaviyo account
  • Klaviyo app installed on Shopify
  • Shopify integration connected inside Klaviyo
  • App embed enabled in the theme (Online Store → Themes → Customize)

Steps

  1. 1Install the Klaviyo app from the Shopify App Store
  2. 2Connect the store in Klaviyo → Integrations → Shopify
  3. 3Enable the app embed in the theme editor
  4. 4Check the backfill of historical orders
  5. 5Configure the essential flows (Welcome, Abandonment, Post-Purchase)
  6. 6Check that the Cookiebot consent bridge works

Klaviyo has no GTM configuration. The integration is handled entirely by the Shopify app. Its only link to the tracking stack is consent, through the Cookiebot → Privacy API bridge.

7Verification

Verify the integration

  1. 1Klaviyo → Integrations → Shopify → check the status reads "Connected"
  2. 2Check the number of synced profiles (must match Shopify customers)
  3. 3Check that historical orders were imported

Verify events

  1. 1Browse the store (logged in with a known email)
  2. 2Klaviyo → Analytics → Activity Feed
  3. 3Check Active on Site and Viewed Product after browsing
  4. 4Add a product to the cart → check Added to Cart
  5. 5Complete a test purchase → check Placed Order

Verify consent

  1. 1Decline consent in Cookiebot
  2. 2Browse and check that the web pixels are blocked
  3. 3Check that the app embed still works (Active on Site)
  4. 4Accept consent → the web pixels must come back

Phase 3 checklist — Destinations (Klaviyo)

Klaviyo Checklist0/3

8Troubleshooting

No events in Klaviyo

Check:

  1. 1Shopify integration connected and active
  2. 2App embed enabled in the theme editor
  3. 3No conflict with another Klaviyo script
  4. 4Browse while logged in with an email Klaviyo knows
Started Checkout missing

Check:

  • Klaviyo web pixel active under Settings → Customer Events
  • Marketing consent granted (Cookiebot → Privacy API bridge)
  • Visitor identified (known email) for checkout tracking
Revenue attribution does not add up

Expected causes:

  • Double attribution Klaviyo + GA4/Meta (each platform has its own model)
  • Different attribution windows (5d Klaviyo vs 7d Meta)
  • Never add revenue across platforms
  • Use Shopify as the source of truth for total revenue
Klaviyo loads before consent (~16 requests)

Explanation:

  • The Klaviyo app embed loads on first render, before consent is granted. That is the expected behaviour.
  • The Cookiebot → Shopify Privacy API bridge governs consent for the Klaviyo web pixels.
  • Check that the cookie-consent_boostecom.liquid snippet is installed and that setTrackingConsent is called after CookiebotOnConsentReady.

Check the layer you just set up

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