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?


Best answer by David To
View originalHey 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?
Best answer by David To
View originalFrom 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?
Yes, the snippet is not appearing in Klaviyo and I have tried adding an item to cart but still to no avail...
Try adding the name of the class to your script without the . before the class name,
Hello
Building on top of what
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
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.