Troubleshooting

Klaviyo Add to Cart not tracking — fix in 10 minutes

Why Klaviyo's Added to Cart event stops recording — onsite tracking snippet, Shopify pixel layer, theme regressions, JS conflicts, and event mapping — with the diagnostic step for each.

Published


title: "Klaviyo Add to Cart not tracking — fix in 10 minutes" description: "Why Klaviyo's Added to Cart event stops recording — onsite tracking snippet, Shopify pixel layer, theme regressions, JS conflicts, and event mapping — with the diagnostic step for each." slug: "klaviyo-add-to-cart-not-tracking" publishedAt: "2026-05-19" updatedAt: "2026-05-19" painCluster: 1 intent: 9 tier: 2 faq:

  • q: "Why is Added to Cart not tracking in Klaviyo?" a: "The most common cause is the Klaviyo onsite tracking snippet (klaviyo.js) isn't loading on your storefront, usually because a Shopify theme update removed it or another app is breaking JavaScript load order. Added to Cart is a client-side event — if klaviyo.js doesn't load, the event can't fire. Re-enable Onsite Tracking in Settings → Integrations → Shopify."
  • q: "How do I test if Added to Cart is firing in Klaviyo?" a: "Open an incognito browser. Visit your storefront. Add a product to cart. Wait 30 seconds. Open Klaviyo → Analytics → Metrics → Added to Cart. Your test should appear in the recent events list with a fresh timestamp. If it doesn't, the tracking is broken."
  • q: "Does Added to Cart fire server-side or client-side in Klaviyo?" a: "Client-side. Added to Cart fires from the klaviyo.js script running in the user's browser when they add a product. Compare to Placed Order, which fires from Shopify's server-side webhook — that's why order tracking can work even when Added to Cart is broken."
  • q: "Why does Started Checkout work but Added to Cart doesn't?" a: "Different event paths. Started Checkout fires from Shopify's checkout webhook (server-side). Added to Cart fires from the JS snippet (client-side). If the JS snippet isn't loading, you'll see Started Checkout firing on orders but Added to Cart missing — a classic signal that the client-side tracking is broken while the server-side integration is fine."
  • q: "Will Shopify's new pixel layer affect Klaviyo's Added to Cart tracking?" a: "Shopify's customer events pixel layer (introduced in 2023) coexists with traditional script-tag tracking. Klaviyo's onsite tracking can use either path depending on integration version. If you've recently migrated to Shopify's pixel layer, verify Klaviyo is configured to receive events through it; otherwise stay on the legacy script-tag path."
  • q: "Why does Added to Cart show in some browsers but not others?" a: "Almost always ad blockers or privacy extensions. uBlock Origin with default lists, DuckDuckGo Privacy Essentials, and Brave Shields on aggressive mode block the klaviyo.js domain. Affected users won't generate Added to Cart events even though the product is being added to their cart correctly."
  • q: "Will Klaviyo notify me if Added to Cart stops firing?" a: "No. Klaviyo's UI shows the metric chart with whatever data exists; it doesn't proactively alert if the chart goes flat. An Added to Cart event that fires hundreds of times yesterday and zero times today will sit broken until you check manually. Detecting that drop within the hour is what continuous monitoring is for." related:
  • klaviyo-checkout-started-event-not-working
  • klaviyo-abandoned-cart-flow-not-firing
  • klaviyo-shopify-integration-not-syncing

Added to Cart is the smallest meaningful event in a Klaviyo account that breaks silently. Started Checkout breaks loudly — orders are also down, attribution drops to zero, the flow report goes red. Added to Cart breaks quietly: cart-abandonment flows keep firing on Started Checkout, orders keep landing through server-side webhooks, and the only signal is a metric chart that flatlines on the right edge while everything else looks fine.

The reason it breaks quietly is the same reason it's important to track separately: Added to Cart is client-side. It fires from JavaScript running in the customer's browser, not from a server-to-server webhook. Every reason that JavaScript can fail to execute is a reason Added to Cart can stop tracking.

This page walks through those failure modes in order of frequency. If you're seeing the flat chart right now, work through the diagnostic checklist first; the fix is usually one of the first three items.

Quick diagnosis checklist

  • Open Klaviyo → Analytics → Metrics → Added to Cart. Look at the chart. A flat line on the right edge with previous-week volume showing normal patterns confirms the metric has stopped firing.
  • Open your storefront. View page source. Search for "klaviyo". You should see a script tag pulling from static.klaviyo.com. If it's missing, that's the issue.
  • Open the browser console (F12 → Console). Reload the page. Look for red errors. Errors mentioning klaviyo or _learnq usually indicate a script issue.
  • Run a manual test. Incognito window. Add a product to cart. Wait 30 seconds. Check Analytics → Metrics → Added to Cart for your test event.
  • Check your Shopify integration status. Settings → Integrations → Shopify. Confirm Onsite Tracking is enabled.
  • Test in a browser with no ad blockers. If the event fires in clean browsers but not in your normal browser, an extension is blocking the tracking.
  • Compare to Started Checkout volume. If Started Checkout is firing normally but Added to Cart isn't, the issue is specifically the client-side script (Added to Cart) rather than the integration generally.

1. The klaviyo.js tracking snippet isn't loading

The single most common cause. The script that records Added to Cart isn't running on your storefront, usually because something removed it or broke its load.

How to verify. View page source. Search for "klaviyo." You should see a script tag pulling from static.klaviyo.com near the head of the page. If you find nothing, the snippet isn't being injected.

How to fix it. Settings → Integrations → Shopify in Klaviyo. Toggle Onsite Tracking off and then back on. This forces Klaviyo to re-inject the script through Shopify's script-tag API. Reload your storefront and re-check the source.

Why the snippet disappears. Shopify theme updates frequently strip third-party scripts during major version updates. Custom theme edits can accidentally remove the snippet. Switching themes resets the script-tag configuration.

For custom or headless themes. If your store uses a heavily customized theme or runs on Shopify's headless storefront, the automatic snippet injection may not work. In that case, add the snippet manually to your theme's layout file. Klaviyo's integration page shows the exact tag to include.

2. Another app is breaking JavaScript load order

The second-most-common failure. The klaviyo.js snippet loads fine — and then another script on the page throws an error that prevents the Added to Cart tracking from executing.

How to verify. Open the browser console. Reload the page. Watch for red errors. Errors that reference undefined functions, type errors, or specific app names often indicate a conflict.

How to fix it. This is iterative. The fastest path: temporarily disable storefront apps one at a time until Added to Cart starts firing again. Start with apps that inject their own scripts — page builders (Shogun, PageFly), review widgets, chat tools, A/B testing platforms.

Once you identify the conflicting app, contact its support. Some apps have a "load after Klaviyo" or "wait for klaviyo.js" setting; some don't. If they don't and the conflict is structural, you may need to choose between the apps.

The pattern over time. Each new app increases conflict surface. Stores with 12+ storefront apps will have brittle JavaScript regardless of which apps they are. Periodic app audits — removing apps you no longer use — reduce the risk.

3. Ad blockers are blocking the script for some users

A meaningful percentage of ecommerce traffic uses ad blockers that block the klaviyo.js domain. Affected users add products to cart but don't generate Added to Cart events.

How to verify. Test in a clean incognito session with no extensions. If Added to Cart fires here but not in your normal browser, an extension is blocking it. Common culprits: uBlock Origin with default lists enabled, DuckDuckGo Privacy Essentials, Brave Shields on aggressive mode, privacy-focused browsers like Firefox Focus.

What you can do. Not much. Klaviyo's terms prohibit proxying the script through your own domain to evade blockers, and the blockers catch up to evasion techniques within months. The honest response is to estimate the blocked share (5-15% of ecommerce traffic) and account for it in your tracking expectations.

One thing this changes. If your Added to Cart volume is consistently lower than your actual cart-add behavior would predict, ad blockers explain part of the gap. Don't assume Klaviyo is misconfigured if the volume is 10-15% lower than your Shopify session data suggests — that gap is structural.

4. The Shopify theme migrated to a layer that Klaviyo isn't on

Shopify rolled out a customer events pixel layer in 2023 as a more controlled alternative to script-tag injection. Klaviyo can integrate through either path, but the integration must be configured for whichever path your theme uses.

How to verify. Check your theme's customer-events configuration. Shopify Admin → Settings → Customer events. If Klaviyo's pixel is listed here, you're on the pixel layer. If it isn't, you may be on script-tag injection, on the pixel layer with Klaviyo missing, or on neither.

How to fix it. If you've recently migrated to the pixel layer and Klaviyo is missing from it, add Klaviyo's pixel through Shopify Admin → Customer events → Add custom pixel, following Klaviyo's documentation for the pixel code. If you haven't migrated, the legacy script-tag path should still work, and the issue is one of the failure modes above.

The trap. Some operators migrate to the pixel layer without realizing Klaviyo needs to be re-added. The migration looks successful; Started Checkout (server-side) keeps working; Added to Cart (client-side) silently stops.

5. The event mapping is configured wrong

Less common, but: Klaviyo allows custom event mapping in some integration configurations. If a custom mapping was set up at some point and then forgotten, it may be routing events away from the canonical Added to Cart metric.

How to verify. Check Klaviyo's integration settings for any custom event mappings. Verify the standard mapping for Added to Cart hasn't been overridden.

How to fix it. Restore the default mapping. Unless you have a documented reason to use custom event mapping, the default is what you want.

6. The product page itself isn't triggering the event

A less common scenario: klaviyo.js is loading, the integration is fine, but a specific page or product configuration isn't triggering the Added to Cart event when expected.

How to verify. Test on multiple product pages. If Added to Cart fires on most products but not on one specific product or page type, the issue is page-specific. Common causes: a product with a custom template that bypasses the standard add-to-cart flow, a "quick add" widget that doesn't trigger the same JS hook, a third-party app's add-to-cart button that doesn't dispatch the expected event.

How to fix it. This usually requires custom JS work. Klaviyo's documentation describes how to manually fire the Added to Cart event from custom add-to-cart flows. For a one-off custom template, fixing the template is more practical than working around it in Klaviyo.

How to verify the fix

After any change:

  1. Open an incognito browser (no extensions, no cached cookies).
  2. Navigate to your storefront. Add a product to cart. Use a known email if your add-to-cart flow captures one.
  3. Wait 30-60 seconds for the event to land in Klaviyo.
  4. Check Analytics → Metrics → Added to Cart. Your event should appear in the recent events list.
  5. Click through to the event. Verify the event payload includes the expected product information (name, SKU, value, quantity).
  6. Repeat on mobile. Real device, not just device toolbar. Mobile-specific JS issues exist.
  7. Check overall event volume the next day. Should return to historical norms.

If all checks pass, the tracking is restored. Compare daily event volume against your historical baseline for the following week to confirm the fix is stable.

Why this keeps happening

Added to Cart sits at an awkward intersection. It's the most useful early-funnel event Klaviyo tracks — it powers browse abandonment flows, cart-recovery analytics, and the engagement segments that feed everything downstream. But it's also the most fragile because it's client-side, and client-side tracking depends on the JavaScript environment of every visitor's browser staying compatible with klaviyo.js.

The fragility shows up in patterns: theme update breaks it on Tuesday, new storefront app breaks it on Friday, a customer's browser extension blocks it permanently. Each individual break is small. The cumulative drift over a quarter can be substantial — a metric that should be firing thousands of times daily firing in the low hundreds, with no signal anywhere in Klaviyo's UI that anything is wrong.

That's the structural case for monitoring. Watching Added to Cart's daily volume against its trailing baseline — and surfacing a finding the day it drops sharply — catches the failure within hours of when it happens. The flow keeps working, the dashboard looks fine, but we'd surface the underlying drift before it costs you a week of attribution.

Frequently asked questions

Why is Added to Cart not tracking in Klaviyo?
The most common cause is the Klaviyo onsite tracking snippet (klaviyo.js) isn't loading on your storefront, usually because a Shopify theme update removed it or another app is breaking JavaScript load order. Added to Cart is a client-side event — if klaviyo.js doesn't load, the event can't fire. Re-enable Onsite Tracking in Settings → Integrations → Shopify.
How do I test if Added to Cart is firing in Klaviyo?
Open an incognito browser. Visit your storefront. Add a product to cart. Wait 30 seconds. Open Klaviyo → Analytics → Metrics → Added to Cart. Your test should appear in the recent events list with a fresh timestamp. If it doesn't, the tracking is broken.
Does Added to Cart fire server-side or client-side in Klaviyo?
Client-side. Added to Cart fires from the klaviyo.js script running in the user's browser when they add a product. Compare to Placed Order, which fires from Shopify's server-side webhook — that's why order tracking can work even when Added to Cart is broken.
Why does Started Checkout work but Added to Cart doesn't?
Different event paths. Started Checkout fires from Shopify's checkout webhook (server-side). Added to Cart fires from the JS snippet (client-side). If the JS snippet isn't loading, you'll see Started Checkout firing on orders but Added to Cart missing — a classic signal that the client-side tracking is broken while the server-side integration is fine.
Will Shopify's new pixel layer affect Klaviyo's Added to Cart tracking?
Shopify's customer events pixel layer (introduced in 2023) coexists with traditional script-tag tracking. Klaviyo's onsite tracking can use either path depending on integration version. If you've recently migrated to Shopify's pixel layer, verify Klaviyo is configured to receive events through it; otherwise stay on the legacy script-tag path.
Why does Added to Cart show in some browsers but not others?
Almost always ad blockers or privacy extensions. uBlock Origin with default lists, DuckDuckGo Privacy Essentials, and Brave Shields on aggressive mode block the klaviyo.js domain. Affected users won't generate Added to Cart events even though the product is being added to their cart correctly.
Will Klaviyo notify me if Added to Cart stops firing?
No. Klaviyo's UI shows the metric chart with whatever data exists; it doesn't proactively alert if the chart goes flat. An Added to Cart event that fires hundreds of times yesterday and zero times today will sit broken until you check manually. Detecting that drop within the hour is what continuous monitoring is for.