Skip to main content
Solved

"Added to Cart" isn't showing in analytics


Forum|alt.badge.img+2

 

Hey there! 

 

So like many others, I also have the problem that "Added to Cart" is not showing up in my Analytics. 

 

Our Shopify site’s add to cart button code is here:

The code that I have inserted into product.liquid is here:

 

The code that. I have also inserted into product.liquid is here:

 

As you can see, there is no “added to cart” metric.  The “viewed product” metric is there, but not working. 

 

What do I have to do? 

Best answer by David To

Hello @MelvynWittwer,

Thanks for sharing your question with the Klaviyo Community!

Since it actually looks like your button is also using a Class notation, I would recommend, instead of using the ID installation method, to be using the alternate installation method as detailed in the Alternate Code Snippet for "Add to Cart" Button with Class Notation subsection of the How to Create a Custom "Added to Cart" Event for Shopify article. In fact, it appears that the Class used for your button within your Shopify theme is the exact example highlighted in this alternate installation method in the help article. 

I would also suggest taking a look at some similar Community posts on this same topic which can be found below:

Thanks for being a member of the Klaviyo Community! Have a great day!

David

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

3 replies

Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 2 replies
  • July 13, 2021

Here is another screenshot of my metrics page: 

 

 


David To
Klaviyo Employee
Forum|alt.badge.img+60
  • Klaviyo Employee
  • 2456 replies
  • Answer
  • July 13, 2021

Hello @MelvynWittwer,

Thanks for sharing your question with the Klaviyo Community!

Since it actually looks like your button is also using a Class notation, I would recommend, instead of using the ID installation method, to be using the alternate installation method as detailed in the Alternate Code Snippet for "Add to Cart" Button with Class Notation subsection of the How to Create a Custom "Added to Cart" Event for Shopify article. In fact, it appears that the Class used for your button within your Shopify theme is the exact example highlighted in this alternate installation method in the help article. 

I would also suggest taking a look at some similar Community posts on this same topic which can be found below:

Thanks for being a member of the Klaviyo Community! Have a great day!

David


Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 2 replies
  • July 20, 2021

Is working! Thanks for solving my problem!!!