Troubleshooting viewed product tracking
You will learn
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.
Before you begin
Before consulting this guide, make sure you:
- Enable Viewed Product tracking, if it was not added automatically through your integration.
- Enable Klaviyo’s Active on Site JavaScript, known as Klaviyo.js, in order for Viewed Product tracking to work.
For the following ecommerce integrations, Viewed Product tracking works as follows:
- Shopify
Viewed Product tracking will be automatically added to your store if you’ve toggled on the Klaviyo app embed and checked the Add Viewed Product tracking to my site setting for your integration. - BigCommerce
Learn how to add the snippet manually - Magento 1
Automatically added by Klaviyo - Magento 2
Automatically added by Klaviyo - WooCommerce
Automatically added by Klaviyo
If you are using BigCommerce, and thus added Viewed Product tracking manually, make sure that the snippet you’ve added to your site matches exactly with the snippets shown in the articles linked above. If you didn’t copy and paste the entire snippet, it will not work correctly.
If you’re using an ecommerce platform without a pre-built Klaviyo integration, or a custom platform, learn about how to enable Viewed Product tracking on our Developer site.
Test Viewed Product tracking
To test that your Viewed Product tracking is set up properly, follow these steps:
The email address in this test identifies your browser so you can find the activity on your profile. If your Shopify store requires consent before onsite tracking, accept tracking cookies when you visit your site.
- Navigate to your website
- On your homepage, add the following to the end of the URL, replacing testing.email@gmail.com with your email address:
?utm_email=testing.email@gmail.com
If the URL already contains a question mark, add&utm_email=testing.email@gmail.cominstead, using your email address.

- Reload the page
- Navigate to a product page on your site
- Search in Klaviyo for your email address, then open your profile.

You should see that a Klaviyo profile has been created for you (if one didn't exist already) and that this product view has been tracked on your activity feed.
To see a feed of all Viewed Product events over time:
- Click the Analytics dropdown in Klaviyo and select Metrics
- Search for Viewed Product and click the metric name. Select Activity feed to see individual events. You can also explore the activity map, charts, best people, and cohort reports.

Once you’ve reviewed the troubleshooting scenarios below and made changes, you should test your tracking again to make sure it’s working correctly.
Table of contents
This guide covers the following troubleshooting scenarios:
- Have you enabled Klaviyo's Active on Site tracking?
- Have you recently switched ecommerce platforms?
- Have you recently updated your store's theme, or made any other updates to your ecommerce platform?
- For WooCommerce and Magento users: Are you using the most recent version of your integration plugin?
- For BigCommerce users: Is your ecommerce store connected to multiple Klaviyo accounts?
- For Shopify users: Do you require cookie consent for visitors in the EU, EEA, UK and Switzerland prior to permitting onsite tracking?
Troubleshooting scenarios
Review the following questions in order to diagnose the cause of your Viewed Product 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?
In order for Viewed Product tracking to work correctly, you must first enable Klaviyo’s Active on Site tracking which allows your customers to be cookied. Active on Site tracking is enabled via the addition of a JavaScript snippet (known as “Klaviyo’s onsite JavaScript” or “Klaviyo.js”) to your site.
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:
- Shopify
Klaviyo.js is added automatically through the integration or through the Klaviyo app embed in Shopify, if you enable it. - 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. - BigCommerce
Make sure you’ve checked the option on your integration settings page to Automatically add Klaviyo onsite javascript (Recommended). If you change this setting, click Save. You can check the installation using the steps below or see the BigCommerce onsite tracking guide. - Magento 1
Klaviyo.js is added automatically when you integrate with Magento 1, and you can make sure that you’ve completed all steps by reading our Magento 1 integration guide. - 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.
For WooCommerce, Magento, and BigCommerce, check that Klaviyo.js is installed:
- Select Integrations in Klaviyo’s left-hand navigation, then select Manage data > Set up web tracking.
- Under Confirm onsite tracking is enabled, enter your site URL and click Confirm.
- If prompted, click Run test to open your site. Once the site loads, return to Klaviyo. A successful check shows that onsite tracking is enabled; otherwise, follow the troubleshooting instructions shown.
This check confirms Klaviyo.js is installed. Use the Test Viewed Product tracking steps above to check that product views are being recorded.
Have you recently switched ecommerce platforms?
If you’ve recently switched ecommerce platforms, you’ll need to add Viewed Product tracking to your new site. Consult the information in the Before you begin section above to learn about Viewed Product 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 both Klaviyo.js and the Viewed Product snippet on your new theme. 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 Before you begin section above.
If you changed your Shopify theme, check that the Klaviyo app embed is enabled on the current theme. Follow the Shopify onsite tracking guide to re-enable it, then test Viewed Product tracking again.
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 to help diagnose the problem.
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 Viewed Product tracking might be related to other issues with your platform’s Klaviyo plugin.
- If Viewed Product events aren’t tracking, check to see if the Started Checkout event is tracking by searching for Started Checkout within Analytics > Metrics in Klaviyo.
- If both Viewed Product and Started Checkout aren’t tracking, there may be an issue with your plugin.
- Check to see if you are using the most up-to-date version of the plugin for your integration, if possible. If you are still having issues, please contact Klaviyo support.
For BigCommerce users: Is your ecommerce store connected to multiple Klaviyo accounts?
If you have one store connected to multiple Klaviyo accounts, this can result in duplicate Klaviyo.js on your site, which can cause Viewed Product tracking to break.
To check if you have duplicate Klaviyo.js:
- Open your storefront in a browser and view the page source. Search for klaviyo.js. A script that loads Klaviyo.js looks like this:
<script type="text/javascript" async="" src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=API_KEY"></script>- If you find multiple script tags loading Klaviyo.js, compare their company_id values. Different values identify different Klaviyo accounts. Also check your theme code for manually added copies; automatically installed scripts may not appear in the main theme file.
- To make sure the duplicate is removed correctly from your site, please contact Klaviyo support.
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.
Contacting Klaviyo support
If you are still encountering issues after consulting this list and testing your tracking, please reach out on our Community or to our Support Team.
Additional resources
- Getting started with Klaviyo onsite tracking
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
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.