Solved

Why can't I find my Add to Cart code in my Shopify theme files after I added it?

  • 30 October 2021
  • 2 replies
  • 132 views

Badge +2

Hello. I am following these steps: https://help.klaviyo.com/hc/en-us/articles/115001396711-Guide-to-Creating-an-Added-to-Cart-Event-for-Shopify

 

However after I have added the script to product.liquid, I am not able to locate the script on the product page. Am I editing the wrong template?

 

 

icon

Best answer by spooninc 31 October 2021, 06:56

View original

2 replies

Userlevel 7
Badge +59

Hi @spooninc

 

Welcome to the Community! Happy to see you’re utilizing the ‘Add to Cart’ feature as it is an extremely useful feature for flows like Browse Abandonment!  

 

Yes, if you’re using a custom Shopify theme, you to install this on all product pages. Additionally, in order for ‘Added to Cart’ metric to function correctly, the ‘Viewed Product’ tracking needs to be installed above the ‘Added to Cart’ code to successfully fire. It will also need to be installed on all your product theme pages as well. Finally, you will not see this metric recorded in your Analytics tab until a ‘cookied’ user, someone who has either clicked through an email link to your site or is already a profile in Klaviyo, triggers this metric. 

 

I would also check out these Community posts on ‘Added to Cart’ to understand more how this feature functions.

 

Thanks for sharing your question (and solution) with the Community! It will benefit all future users who might have this problem as well! 

-Taylor 

Badge +2

Hello, I figured it out. We were using several different templates for the product page.

Reply