I want to see ‘’Viewed Product’’ metric but I can not add the code Klaviyo give us because there is no product.liquid in my templates. What should I do? How can I track the Viewed Product metric?
Hi
Welcome to the Community! Thanks for sharing your question with us!
Installing the ‘Viewed Product’ metric can vary depending on your integration so it’s always best practice to double check that you are taking the right steps for your specific site! For instance, Magneto 1,2 and Woocomerce already have the metric installed in your site. If I’m understanding correctly, it seems that you have a Shopify integration and you are correct the ‘Viewed Product’ code snippet will need to be pasted at the bottom of your product.liquid Template in your Shopify Theme, not inside Klaviyo, in order to be tracked.
In order to install the code, open your Shopify account and navigate to the Online Store tab > Theme. Once on the Theme tab, there should be a dropdown menu on the right, select ‘Edit Code’. From here you should see this screen below. Type in ‘product.liquid’ into the search bar to find the file and select it to open the Template editor.
Once opening the file, your screen should show that you are in the product.liquid tab of your theme template. At the bottom of the code, install the ‘Viewed Product’ code, as shown highlighted below, and click ‘Save’.
Finally, don’t forget to return back to your Klaviyo account and post your Shopify URL and hit ‘Next’. To ensure you haven’t missed any steps and are setting up this metric correctly, I’d recommend checking out this Shopify Integration Help Center Article.
However, it is worth noting that if you are using custom product pages, you will need to add this code to a different theme file, or to your individual custom product pages in order for the metric to be installed and tracked.
Thanks for being a part of the Community! Let us know if you are able to get this installed!
Best,
Tayor
Reply
Log in to the Community
Use your Klaviyo credentials
Log in with Klaviyo
Use your Klaviyo credentials
Log in with KlaviyoEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.