---
title: "Troubleshooting added to cart tracking"
description: "For some ecommerce platforms, Added to Cart events are tracked automatically. For other ecommerce platforms, a code snippet must be manually added to your site."
canonical_url: "https://help.klaviyo.com/hc/en-us/articles/6985692431259"
markdown_url: "https://help.klaviyo.com/hc/en-us/articles/6985692431259.md"
locale: "en-us"
category: "Analytics"
section: "Metrics troubleshooting"
updated: "2026-10-30"
---

# Troubleshooting added to cart tracking

## Before you begin

For some ecommerce platforms, *Added to Cart* events are tracked automatically. For other ecommerce platforms, a code snippet must be manually added to your site.

Before consulting this guide, make sure you:

- Enable *Added to Cart* tracking, if it was not added automatically through your integration.

- Enable Klaviyo’s onsite JavaScript, known as Klaviyo.js, if your *Added to Cart* tracking uses a JavaScript snippet. Learn how in the [troubleshooting scenarios](#h_01J6FASZBM5FH8TYA500CGTT6V) below. Shopify pixel tracking uses the separate setting described below.



If you are using BigCommerce, make sure to enable *Viewed Product* tracking, which is required in order for *Added to Cart* tracking to function properly. Guidance around enabling *Viewed Product* tracking is given in the setup guides linked below. If you are experiencing issues with *Viewed Product* tracking, please see our guide on [troubleshooting Viewed Product tracking](https://help.klaviyo.com/hc/en-us/articles/4416172774939.md).

The following ecommerce integrations support *Added to Cart* tracking, and it works as follows:

- [Shopify
](https://help.klaviyo.com/hc/en-us/articles/115005080407.md)Enabled via a [Shopify pixel](https://help.klaviyo.com/hc/en-us/articles/4425956184731.md#h_01J6F7TREZAJM7M3R3DFVZSDGT) when you check the **Track behavioral events** setting

- [BigCommerce
](https://help.klaviyo.com/hc/en-us/articles/115005082547.md)Requires a [manually installed code snippet](https://help.klaviyo.com/hc/en-us/articles/360024310292.md)

- [Magento 2
](https://help.klaviyo.com/hc/en-us/articles/115005254348.md)Automatically added by Klaviyo

- [WooCommerce
](https://help.klaviyo.com/hc/en-us/articles/115005255808.md)Automatically added by Klaviyo

- [PrestaShop
](https://help.klaviyo.com/hc/en-us/articles/360054551492.md)Automatically added by Klaviyo

- [Salesforce Commerce Cloud
](https://help.klaviyo.com/hc/en-us/articles/360033744951.md)Automatically added by Klaviyo - only tracked for logged-in users



If you’re using an ecommerce platform without a pre-built Klaviyo integration, or a custom platform, learn about [how to enable Viewed Product and Added to Cart tracking on our Developer site](https://developers.klaviyo.com/en/docs/guide-to-integrating-a-platform-without-a-pre-built-klaviyo-integration#viewed-product).

## Test Added to Cart tracking

To test that your *Added to Cart* tracking is set up properly, follow these steps:

If your Shopify store requires consent for onsite tracking, provide that consent before testing.

1. Navigate to your website

2. Identify yourself using the method for your platform:

   - **Shopify:** Log in to a customer account on your store using an email address that already has a Klaviyo profile. For other ways to identify yourself, see [testing Shopify pixel tracking](https://help.klaviyo.com/hc/en-us/articles/4425956184731.md#h_01JQPRT1915HYBXPCW9V1GXTRC).

   - **Salesforce Commerce Cloud:** Log in to your store account using your test email address.

   - **Other platforms:** On your homepage, add the following to the end of the URL, replacing *example@gmail.com* with your email address:
*?utm_email=example@gmail.com*



![After modifying the email address used in the example, add it to the end of your site's URL and visit your site in any browser.](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/30ecd350281c6fd1a5c4019b245898a07d8c5ece-512x96.png?auto=format)

3. Reload the page

4. Navigate to a product page on your site with a product that is in stock

5. Click the “Add to Cart” button on the page

6. Search in Klaviyo for the email address you used in step 2, then open the matching profile.



![The searchbar can be found in the top right of Klaviyo where you can search for profiles by email address.](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/aaffe9ed60f1b5a9f7b73131fb652f98f6549f58-512x197.png?auto=format)

You should see that a Klaviyo profile has been created for you (if one didn't exist already) and that an *Added to Cart* event has been tracked on your activity feed.

To see a feed of all *Added to Cart* events over time:

1. Navigate to **Analytics > Metrics** in Klaviyo.

2. Search for **Added to Cart**, click the metric name, then select **Activity feed** to view the events. You can also use **Chart**, **Activity map**, **Best people**, and **Cohorts** to explore the data. Shopify pixel events have a Shopify icon; events sent through Klaviyo.js have a gear icon. If you have more than 1 Added to Cart metric, choose the one for your current tracking setup.



![At the top of the Metrics page there is a searchbar where you can search for different metric by name.](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/36d933da355b11f83bc86bff8772e5578014d2ad-459x238.png?auto=format)

Once you’ve reviewed the troubleshooting scenarios below and made changes, you should test your tracking again to make sure it’s working correctly. 

## Troubleshooting scenarios

Review the following questions in order to diagnose the cause of your *Added to Cart* issues. Note that some steps are general, and others depend on what ecommerce platform you are using.

**▸ Have you enabled Klaviyo’s Active on Site tracking?**

For *Added to Cart* tracking that uses a JavaScript snippet, Klaviyo.js must be installed so Klaviyo can identify visitors and record their activity. Klaviyo.js also enables *Active on Site* tracking. For Shopify pixel tracking, check the behavioral event settings in the Shopify section below.

Klaviyo adds Klaviyo.js automatically during the integration, though some integrations require that you check a setting to enable it. Learn about your specific ecommerce platform and how to test that Klaviyo.js is working:

1. **Shopify**
Klaviyo.js is added automatically through the integration or through the Klaviyo app embed in Shopify, if you enable it. Learn more about the [app embed and onsite tracking for Shopify](https://help.klaviyo.com/hc/en-us/articles/4425956184731.md). 

2. **WooCommerce**
Klaviyo.js is added automatically when you integrate with WooCommerce, and you can make sure that you’ve completed all steps by reading our [WooCommerce integration guide](https://help.klaviyo.com/hc/en-us/articles/115005255808.md). To test your onsite JavaScript, select the **Integrations** tab, then click **Manage data >** **Set up web tracking**. Then, find the step where you can enter your site URL in the box, and follow the instructions to test your tracking.

3. **BigCommerce**
Make sure you’ve checked the option on your [integration settings page](https://www.klaviyo.com/integration/bigcommerce) to *Automatically add Klaviyo onsite JavaScript*. Then, [follow the steps to test your onsite JavaScript](https://help.klaviyo.com/hc/en-us/articles/115005082547.md#h_01HAQ99C0AKXHH3PH3ZY2V4TS8). 

4. **Magento 2**
Klaviyo.js is added automatically when you integrate with Magento 2, and you can make sure that you’ve completed all steps by reading our [Magento 2 integration guide](https://help.klaviyo.com/hc/en-us/articles/115005254348.md). To test your onsite JavaScript, select the **Integrations** tab, then click **Manage data >** **Set up web tracking**. Then, find the step where you can enter your site URL in the box, and follow the instructions to test your tracking. 

5. **PrestaShop**
Klaviyo.js is added automatically when you integrate with PrestaShop, and you can make sure that you’ve completed all steps by reading our [PrestaShop integration guide](https://help.klaviyo.com/hc/en-us/articles/360054551492.md). To test your onsite JavaScript, select the **Integrations** tab, then click **Manage data >** **Set up web tracking**. Then, find the step where you can enter your site URL in the box, and follow the instructions to test your tracking.

**▸ For Shopify users: have you enabled behavioral event tracking?**

1. In Klaviyo, select **Integrations**, then select **Shopify**.

2. In the **Onsite Tracking** section, find **Additional tracking features** and use the option shown:

   - **Track behavioral events:** Check the box, then click **Update Settings**. Complete any authorization prompts, then return to Klaviyo.

   - **Get started:** Click **Get started** and select **Behavioral events**. Click **Next** if prompted, review the profile sync options, and click **Save**. Complete any authorization prompts, then return to Klaviyo.



The Klaviyo app embed adds Klaviyo.js for *Active on Site* and *Viewed Product* tracking. If you changed your Shopify theme, check that the app embed is enabled for the new theme. Follow the guide to [enabling the Klaviyo app embed in Shopify](https://help.klaviyo.com/hc/en-us/articles/4425956184731.md#h_01J6F7TREZM0NY2336G80MJFM3).

**▸ Have you recently switched ecommerce platforms?**

If you’ve recently switched ecommerce platforms, you’ll need to add both *Viewed Product* and *Added to Cart* tracking to your new site. Consult the information in the [Before you begin section](#h_01G6W48MBT2PX8MCX7D6RVT14Z) above to learn about *Viewed Product* and *Added to Cart* tracking for your new platform.

**▸ Have you recently updated your store’s theme, or made any other updates to your ecommerce platform?**

If you’ve recently updated your store’s theme, you may need to reinstall Klaviyo.js, the *Viewed Product* snippet, and the *Added to Cart* snippet (for BigCommerce) on your new theme depending on the platform. Making other updates to your ecommerce platform may also affect the snippets previously added to your site.

To reinstall the *Viewed Product* snippet for BigCommerce, follow the instructions in the [BigCommerce integration setup guide](https://help.klaviyo.com/hc/en-us/articles/115005082547.md#h_01HAQ99C0AEYNSZ7YKNX9PX6C9), and for the *Added to Cart* snippet follow the [guide to creating an "Added to Cart" event for BigCommerce](https://help.klaviyo.com/hc/en-us/articles/360024310292.md).

If you’re using WooCommerce or Magento, or are using the Klaviyo app embed in Shopify, but you’ve made changes to your site and now the event isn’t tracking, you should [contact Klaviyo support](https://help.klaviyo.com/hc/en-us/articles/115001002272.md) to help diagnose the problem.

**▸ For BigCommerce users: Is your ecommerce store connected to multiple Klaviyo accounts?**

If you have one store connected to multiple Klaviyo accounts, this can cause problems with *Active on Site*, *Viewed Product*, and *Added to Cart* tracking. Duplicate Klaviyo.js can cause onsite tracking to break.

To check if you have duplicate Klaviyo.js:

1. View your storefront page source and search for `klaviyo.js`. A Klaviyo.js script tag may look like this:



```text
<script type="text/javascript" async="" src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=API_KEY"></script>
```

1. If you find more than 1 Klaviyo.js script tag, compare the public API keys in their URLs. The key may appear after `company_id=` or in the URL path before `/klaviyo.js`. Different keys indicate that scripts from different Klaviyo accounts are present.

2. To make sure the duplicate is removed correctly from your site, please [contact Klaviyo support](https://help.klaviyo.com/hc/en-us/articles/115001002272.md).

**▸ For BigCommerce users: Are you using the correct code snippet for your Add to Cart button?**

BigCommerce requires a manually installed code snippet to use *Added to Cart* tracking. There are 2 different snippets that can be installed into your theme depending on if your “Add to Cart” button has an ID or not. Please see our guide on [how to create an "Added to Cart" event for BigCommerce](https://help.klaviyo.com/hc/en-us/articles/360024310292.md) for more information on how to check this.

**▸ For WooCommerce and Magento users: Are you using the most recent version of your integration plugin?**

If you are using WooCommerce or Magento, problems with *Added to Cart* tracking might be related to other issues with your platform’s Klaviyo plugin.

1. If *Added to Cart* events aren’t tracking, check to see if the *Started Checkout* event is tracking by searching for *Started Checkout* within **Analytics > Metrics** in Klaviyo. 

2. If both *Added to Cart* and *Started Checkout* aren’t tracking, there may be an issue with your plugin.

3. Check to see if you are using the most up-to-date version of the plugin for your integration. If needed, update to the latest version within WooCommerce or Magento, or you can download the latest version from the relevant platform’s listing.

   - [Klaviyo WordPress (WooCommerce) plugin](https://wordpress.org/plugins/klaviyo/)

   - [Klaviyo Magento 1 extension](https://www.klaviyo.com/media/downloads/MagentoKlaviyo-Latest.tgz)

   - [Klaviyo Magento 2 extension](https://help.klaviyo.com/hc/en-us/articles/115005254348.md#h_01HNZMK310HQPFJWZ2NB1C6NSC)

**▸ For Shopify users: Do you require cookie consent for visitors in the EU, EEA, UK and Switzerland prior to permitting onsite tracking?**

Based on your Customer Privacy settings in Shopify, Klaviyo may not track onsite events for visitors to your Shopify store in the EU, EEA, UK and Switzerland, unless they have provided consent.

## Contact Klaviyo support

If you are still encountering issues after consulting this list and testing your tracking, please reach out in our [Community](https://community.klaviyo.com/got-a-question-1) or to our [Support Team](https://help.klaviyo.com/hc/en-us/articles/115001002272.md).

## Additional resources

Learn how to troubleshoot other metrics:

- [Troubleshooting viewed product tracking](https://help.klaviyo.com/hc/en-us/articles/4416172774939.md)
  Learn how to troubleshoot issues with your Viewed Product tracking, which is used to track when visitors view products on your site. For some ecommerce platforms, Viewed Product is tracked automatically when you integrate with Klaviyo. For other ecommerce platforms, a snippet must be manually added to your product page template. 
- [Troubleshooting placed order tracking](https://help.klaviyo.com/hc/en-us/articles/7000906101019.md)
  Placed Order tracking is included with ecommerce integrations and does not require any additional setup. Before consulting this guide, make sure you have properly set up, configured, and enabled your ecommerce integration.
- [Troubleshooting started checkout tracking](https://help.klaviyo.com/hc/en-us/articles/6998274713371.md)
  Started Checkout tracking is included with many ecommerce integrations and does not require any additional setup. Before consulting this guide, make sure you have properly set up, configured, and enabled your ecommerce integration.

Other resources:

- [Getting started with Klaviyo onsite tracking](https://help.klaviyo.com/hc/en-us/articles/115005076767.md)
  Learn about the different ways that Klaviyo can support onsite tracking on your ecommerce site. There are 2 key types of onsite tracking:
- [Troubleshooting your Shopify integration](https://help.klaviyo.com/hc/en-us/articles/4403927899291.md)
  Learn how to solve issues with your Shopify integration setup by following the relevant troubleshooting scenario described below. If you are encountering issues not on this list, please reach out on our Community or to our Support Team. 
