Skip to main content
Solved

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

  • January 17, 2021
  • 5 replies
  • 138 views

Forum|alt.badge.img+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?

 

 

 

 

Best answer by caroline

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

View original
Did this topic or the replies in the thread help you find an answer to your question?

5 replies

caroline
Forum|alt.badge.img+8
  • Klaviyo Alum
  • 215 replies
  • Answer
  • January 18, 2021

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


Forum|alt.badge.img+2
  • Author
  • Contributor II
  • 3 replies
  • January 18, 2021

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?

 


retention
Partner - Platinum
Forum|alt.badge.img+62
  • 2025 Champion
  • 942 replies
  • January 19, 2021

@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.


Forum|alt.badge.img+2
  • Author
  • Contributor II
  • 3 replies
  • January 19, 2021

Thanks for that Joseph will try again now.
 

Einne


Forum|alt.badge.img+2
  • Author
  • Contributor II
  • 3 replies
  • January 19, 2021

It worked. Thanks a million guys!