How to setup Klaviyo web tracking in Shopify Dawn theme store?

  • 14 February 2022
  • 3 replies

Badge +2

I tried to lot but I could not setup Klaviyo web Tracking in my Shopify Down theme store. I don’t Understand how to setup Because the theme are updated 2022.  

Will you help me with this..?


Best answer by alex.hong 14 February 2022, 18:50

View original

3 replies

Userlevel 6
Badge +21

Hey @Erkka-OppopShop ,
Yes, for the new OS2.0 themes you do need to add the custom liquid section to all of the templates you are using. It’s a little work upfront, but when you create a new template just make sure you duplicate one that has the custom liquid section in it.

Hope that helps!

Badge +1

Hi Alex,
Thank you for this additional info. Current Klaviyo onboarding video only shows instrcutions for the old Debut theme, which had the product.liquid -file.

I’m adding the liquid snippet to my product template, but I’ve created multiple templates for my products. Should I copy the code snippet to each product template I’m using? Or just the default template?

This may be a dumb question, because the default template isn’t assigned  to any products and the other templates are. Just wanted to get this clear!


Userlevel 7
Badge +58

Hi there @rokibul hassan,

Welcome to the Community! 

I understand you are having some difficulty with some of Klaviyo’s code snippets, since migrating to Shopify 2.0.

Shopify 2.0 was introduced to allow developers more freedom to edit code in JSON instead of Liquid template theme files within Shopify. The main difference you'll face after upgrading to Shopify 2.0 is that most of the features now rely on JSON templates. Shopify has created this guide, which provides step by step instructions for converting a Liquid template into a JSON template, and moving any required Liquid code into sections that you can include in the new JSON template. 

That said, Klaviyo's Viewed Product snippet and Added to Cart snippets can now very easily be added via a Custom Liquid block for Shopify 2.0 Themes. To do this, please follow the steps below:

  1. In Shopify, navigate to your theme and click Customize

  2. At the top of the page, click the Home page dropdown, and select Products > Default product to be brought to your default product page. 

  3. Click Add section in the left sidebar, and then select Custom Liquid.

  4. Paste the Viewed Product snippet and/or the Add to Cart snippet into the Custom Liquid text box.
    *If you are pasting both snippets, you can do this all at once with the Add to Cart snippet directly beneath the Viewed Product snippet. 

  5. Click Save in the upper right. 

If you prefer to follow along with a video, you can watch this process here

After making this update, Viewed Product tracking and/or Add to Cart Tracking should now be applied to all of your product pages. You can test this out as a cookied (identified) profile by doing the following: 

  1. Go to your website

  2. Add ? to the end of your website URL (of course using your email address in place of this example email address) like this:

  3. Proceed to view a product page 

  4. Press the Add to Cart button (if applicable)

  5. Check your profile within Klaviyo to see that the Viewed Product metric and Added to Cart metric were properly recorded!

Hope this helps to clarify!