How to add "Added to cart" event for Klaviyo on Venture theme?

How to add "Added to cart" event for Klaviyo on Venture theme?

rad_rod
Excursionist
18 1 4

Hello,

I use Klaviyo on my store gofirepits.com, and I have been trying to add the Abandoned Cart email flow, specifically the one with the trigger event “Added to Cart”. Note: I attached photos at the bottom showing my store's theme.liquid with the different code snippets I inserted. 

I have gone through the steps to add the “Added to Cart” event in Shopify as this Klaviyo help article describes. It is my understanding that the code for my website’s Add to Cart button is:

 

<button type="submit" name="add" id="AddToCart-product-template" class="btn btn--full product-form__cart-submit btn--secondary-accent">

              <span id="AddToCartText-product-template">

                

                  Add to Cart

                

              </span>

            </button>

 

Here is a link to a product page on gofirepits.com so that you can verify/check that I’ve correctly identified the Add to Cart button’s code. My website is built using the Venture theme and does not have custom liquid blocks in theme customization (I checked as the article described), so I copied the code snippet as per the instructions (Snippet 2 with appropriate edits) into the theme.liquid file. To see if it worked properly, I went back to the Klaviyo admin and refreshed the page, but the option “This flow requires setting up a special "Added to Cart" metric” still had a red x next to it, and the option “Create Flow” remained unavailable. I double checked to make sure I inserted the code snippet correctly, and also set a timer for one minute to give time for Klaviyo and Shopify to update and sync, then refreshed again, but the issue remained the same. I also tried this for Snippet 1 and Snippet 3, and followed the same steps of refreshing the Klaviyo admin, waiting one minute, and refreshing it again, but got the same results as with Snippet 2.

Please help me with how to solve this issue.

Thank you!


Below: This shows how the code looked when I added Snippet 1 into theme.liquid (lines 146-182).

Snippet 1 Klaviyo GoFirePits.png

 

Below: This shows how the code looked when I added Snippet 2 into theme.liquid (lines 146-152; this snippet should be the correct one).

Snippet 2 Klaviyo GoFirePits.png

 

Below: This shows how the code looked when I added Snippet 3 into theme.liquid (lines 146-156).

Snippet 3 Klaviyo GoFirePits.png

Replies 0 (0)