Solved

Added to cart snippet not working

  • 4 February 2021
  • 4 replies
  • 94 views

Badge

Hey there,

I’m having an issue installing the added to cart metric.
 

The alternative snippet with class notation solution has not worked for me either.
 

Any ideas why this is happening?

 

this is the code from shopify
this is the code from my website

 

icon

Best answer by david.to 20 April 2021, 20:56

View original

4 replies

Userlevel 7
Badge +5

@joshkalms 

From your screenshots I’d say that everything looks good in the snippet.

I assume that by “Not working” you mean that the metric “Add to Cart” has not appeared in Klaviyo.

Have you tried adding an item to cart and see if the metric “Add to Cart” will appear in Klaviyo?

Badge

@retention 

Yes, the snippet is not appearing in Klaviyo and I have tried adding an item to cart but still to no avail...

Userlevel 1

Try adding the name of the class to your script without the . before the class name,

 

 

Userlevel 6
Badge +4

Hello @joshkalms

Building on top of what @retention had already mentioned, when testing by adding the product to your cart with that code installed, can you confirm the following:

The reason we recommend double-checking these is because the Add to Cart code works in conjecture with the Viewed Product code so if either of these codes were not installed or not installed correctly, it would effect how the Add to Cart code functions; or the lack of functionality. Similarly, both the Viewed Product and Add to Cart code can only be triggered so long as your browser is cookied which would be how Klaviyo identifies the contact who triggered these events. 

 

-David

Reply