Klaviyo
Technical guide: email and SMS CRM for Shopify. Native integration, events, consent, flows, attribution, verification.
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
| Destination | Type | Consent |
|---|---|---|
| GA4 | sGTM transport | analytics_storage |
| Meta CAPI | sGTM tag | ad_storage, ad_user_data |
| Google Ads Enhanced Conv. | sGTM tag | ad_storage, ad_user_data |
| Klaviyo | Native Shopify integration | ad_storage |
Essential flows
| Flow | Trigger | Impact |
|---|---|---|
| Welcome Series | Subscribed to List | Onboarding + first conversion |
| Cart Abandonment | Added to Cart → no Placed Order | Revenue recovery |
| Checkout Abandonment | Started Checkout → no Placed Order | Revenue recovery |
| Post-Purchase | Placed Order | Review, upsell, loyalty |
| Winback | Placed Order → inactive 60d+ | Customer reactivation |
| Browse Abandon | Viewed Product → no Add to Cart | Product 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.
| Type | Default window | Condition |
|---|---|---|
| Email opened | 5 days | Open + order |
| Email clicked | 5 days | Click + order |
| SMS clicked | 5 days | Click + order |
| Flow | 5 days | Last 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
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.
4Consent & Privacy
Consent architecture
Cookiebot (CMP in GTM)
↓
Bridge → Shopify Privacy API
↓
setTrackingConsent({ marketing: true/false })
↓
Klaviyo web pixels enabled / blockedThe 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 element | Consent required | Without consent |
|---|---|---|
| App embed (Active on Site, Viewed Product) | No | Always works |
| Checkout web pixels | Yes (marketing) | Blocked |
| API sync (Placed Order, profiles) | No | Shopify server-side |
| Transactional emails | No | Delivery guaranteed |
| Marketing emails | Email opt-in required | Unrelated to the CMP |
Consent per destination (across the stack)
| Destination | Required signals | Cookiebot category |
|---|---|---|
| GA4 | analytics_storage | Statistics |
| Meta CAPI | ad_storage, ad_user_data | Marketing |
| Google Ads | ad_storage, ad_user_data | Marketing |
| Klaviyo | ad_storage | Marketing |
| Cookiebot | None | Necessary |
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 event | Source | Description |
|---|---|---|
| Active on Site | App embed | Visitor active on the store |
| Viewed Product | App embed | Product page view |
| Added to Cart | App embed | Added to cart |
| Started Checkout | Web pixel | Checkout started |
| Placed Order | Shopify API | Order confirmed |
| Ordered Product | Shopify API | Per-product order detail |
| Fulfilled Order | Shopify webhook | Order shipped |
| Cancelled Order | Shopify webhook | Order cancelled |
| Refunded Order | Shopify webhook | Order 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
| Data | Native source | Possible enrichment |
|---|---|---|
| Email, name, address | Shopify API | Already complete |
| Order history | Shopify API (backfill) | Already complete |
| Onsite browsing | App embed | Already complete |
| Checkout events | Web pixel | Consent-gated |
| UTM / source attribution | Not native | Via custom properties or flow triggers |
| Engagement score | Computed by Klaviyo | Custom 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
- 1Install the Klaviyo app from the Shopify App Store
- 2Connect the store in Klaviyo → Integrations → Shopify
- 3Enable the app embed in the theme editor
- 4Check the backfill of historical orders
- 5Configure the essential flows (Welcome, Abandonment, Post-Purchase)
- 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
- 1Klaviyo → Integrations → Shopify → check the status reads "Connected"
- 2Check the number of synced profiles (must match Shopify customers)
- 3Check that historical orders were imported
Verify events
- 1Browse the store (logged in with a known email)
- 2Klaviyo → Analytics → Activity Feed
- 3Check Active on Site and Viewed Product after browsing
- 4Add a product to the cart → check Added to Cart
- 5Complete a test purchase → check Placed Order
Verify consent
- 1Decline consent in Cookiebot
- 2Browse and check that the web pixels are blocked
- 3Check that the app embed still works (Active on Site)
- 4Accept consent → the web pixels must come back
Phase 3 checklist — Destinations (Klaviyo)
8Troubleshooting
Check:
- 1Shopify integration connected and active
- 2App embed enabled in the theme editor
- 3No conflict with another Klaviyo script
- 4Browse while logged in with an email Klaviyo knows
Check:
- Klaviyo web pixel active under Settings → Customer Events
- Marketing consent granted (Cookiebot → Privacy API bridge)
- Visitor identified (known email) for checkout tracking
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
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.