Solved

Add To Cart metric not working

  • 3 September 2021
  • 5 replies
  • 676 views

Badge +2

Hi,

I’ve been trying to get the Add To Cart metric to work, but unsure what’s wrong. 

When I inspect:


The code I typed it


It doesn’t show up as an event in my metric and it doesn’t record the Add To Cart in the Data Feed when I test it.

Would really appreciate the help!

icon

Best answer by julie.accardo 4 September 2021, 17:41

View original

5 replies

Userlevel 5
Badge +34

Hi @ShashankSesksaira,

Thanks for reaching out to the Klaviyo Community! 

At first glance, nothing stands out to me on setup. The Added to Cart event only triggers for cookied users. Users are typically cookied if they subscribe through a Klaviyo signup form or click through a Klaviyo email to your website. Are you cookied in your account when you go to test this? If not or you’re unsure, you can follow these instructions to cookie yourself. Once you see that there was a viewed product event associated with your email address you’ll know you’re cookied and you can go through the motions of testing out the added to cart event to see if you can trigger that. 

I hope this helps!

Julie

Badge +5

Hi Everyone,

 

I am trying to setup my Abandoned Cart Recovery Flow. 
Can someone navigate me how to adjust my .product.liquid page’s code? 

I have done that so far. 

Here is my inspected button code on the website.
https://sofroniev.eu/
 


Here is my product.liquid code’s page. 
 


Thanks. 
Alex
 

Userlevel 7
Badge +58

Hi there @Akselpd,

Thanks for writing into this thread with your question! I’d be happy to help with the issue you are running into.

However, I am trying to understand what you may need assistance with. It seems like you added the code snippets to the product.liquid section. Were you looking to create an abandoned cart flow?

The abandoned cart flow uses the added to cart metric from your site to be used as a trigger. In our doc, Guide to Creating an "Added to Cart" Event for Shopify it fleshes out how to add this code onto your liquid file so that you can properly setup the flow.

 

Hope this helped,

Alex

Badge +5

Hi there, @alex.hong,

It is great to hear from you! 

That is exactly the article I have been checking out and it got me here. I am still stuck. That is the beginning.

I have applied those changes if you can see on the pictures I have provided above. Thanks! 

The ‘Add to cart’ button is <class> and I can’t really modify it to work. 

Does anyone know how should it be phrased? 

Yours,
Alex

Userlevel 7
Badge +61

Hi @Akselpd,

I left you a note in your post on the following thread:

 

Reply