Skip to main content

Hi everyone,

Hope you're having a great week.

Yesterday I started optimizing one of my client's email marketing.

However, when trying to add the “Added to Cart” snippet on Shopify, I can't get it to show in the analytics tab.

I followed the tutorial to a tee, my client's theme doesn't have an ID, but rather a class button.

This is the snippet I put on the “product.liquid” section:

And I don't know if this is relevant, put there's another snippet before this one as well (unrelated to Klaviyo)

If you could help me figure out what is happening I'd be forever grateful. Thank you and kind regards,

Brandon.

Hi @Agencia SENA,

It looks like the classes associated with that button on your client’s site are add-to-cart, btn--full, btn, and btn--tertiary. As a result, I would recommend changing the selector in the snippet to “document.querySelector(‘.add-to-cart’)” rather than “document.querySelector(‘.add_to_cart’)”

Best,

Caroline


Reply