Solved

Why does the ".product-form__cart-submit" class not work on my Added to Cart metric?

  • 17 January 2021
  • 5 replies
  • 129 views

Badge +2

Hi Guys,

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?

 

 

 

 

icon

Best answer by caroline 18 January 2021, 22:22

View original

5 replies

Userlevel 5
Badge +8

Hi there,

 

It looks like the name of your classes are “btn”, “product-form__cart-submit”, and “btn--secondary-accent.” I would remove the extra spaces from your class selector, changing it from ‘. product-form__cart-submit ’ to ‘.product-form__cart-submit’

 

Best,

 

Caroline

Badge +2

Hi Caroline,
 

Thanks very much for getting back to me. I tried this and still no joy

 

 

Does it being a trial store make a difference?

 

Userlevel 7
Badge +57

@einnewaters
The option that @caroline suggested should work. Have you tried adding product to cart after applying the code you’ve screenshotted above?

After applying the code in Shopify, you need to have at least one “Add to Cart” event before the new metric named “Add to Cart” is automatically created in Klaviyo.

Badge +2

Thanks for that Joseph will try again now.
 

Einne

Badge +2

It worked. Thanks a million guys!

Reply