Skip to main content
Solved

Added to Cart tracking issue after the API changes


Forum|alt.badge.img+3

Hi! 

Since the 13th June, the tracking of Added to Cart is not working properly. I was wondering if thats related with the API update. We dont use profile API in our Shopiy integration.

 

Thanks,

Best answer by alex.hong

Hi @Gabriela,

I would say that as part of the API update that occurred recently, it only impacted the Identify API, not the profile API.

Looking into this though, it actually looks like you may be using the wrong code since you’re using the ID method rather than the Class method. I suspect what may be occurring is that something may have changed where your "Continue" button is using the same ID whereas now your add to cart button is being identified by both the ID and the Class of "gf_add-to-cart..."

It is not uncommon for community members to report that their add to cart, viewed product, etc aren’t working sometimes, especially if they switched themes. In doing so they either forget to re-add the codes or use the same code as they were previously, without realizing some aspects of the theme code has changed.

 

Thanks,

Alex

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

5 replies

Omar
Partner - Platinum
Forum|alt.badge.img+45
  • Champion & Partner
  • 494 replies
  • June 13, 2022

alex.hong
Forum|alt.badge.img+58
  • Klaviyo Alum
  • 1552 replies
  • June 14, 2022

Hi there @Gabriela,

Thanks for sharing. Apologies that you are running into this issue. If I can inquire more, are you seeing that profiles are not getting added properly to your data or is something else the matter with the integration?

 

Looking forward to your response,

Alex


Forum|alt.badge.img+3
  • Author
  • Contributor II
  • 4 replies
  • June 14, 2022

Hi @Alex, 

Since 13th June, the Add to Cart event has been tracked when someone Adds to Cart, AND they also hit the 'Continue' button. If the customer does not click on 'Continue' after adding the product to the cart and keeps browsing/leave on the website, then the event is not tracked.

We haven't had this issue before. Every time someone added something to cart, no matter what they did later, the event was tracked.

Important to note that we have shops in different countries, and we started to see this issue happen gradually, from Australia first (13th June AEST), and then the other day in the USA store (13th June PT).

Please find attached the following scripts we've installed in Australia. 

  • Javascript in the THEME FILE.
  • Javascript in the PRODUCT PAGE.
  • BUTTON HTML code showing the “AddToCart” class.

Looking forward to hearing back from you!

Thanks, 


Forum|alt.badge.img+3
  • Author
  • Contributor II
  • 4 replies
  • June 15, 2022

Hey Community Manager, 

Any update on this? The Abandoned Cart flow is one of the most successful flows and so far has been severely compromised because of this issue. 

Looking forward to hearing back from you. 

Thanks, 


alex.hong
Forum|alt.badge.img+58
  • Klaviyo Alum
  • 1552 replies
  • Answer
  • June 16, 2022

Hi @Gabriela,

I would say that as part of the API update that occurred recently, it only impacted the Identify API, not the profile API.

Looking into this though, it actually looks like you may be using the wrong code since you’re using the ID method rather than the Class method. I suspect what may be occurring is that something may have changed where your "Continue" button is using the same ID whereas now your add to cart button is being identified by both the ID and the Class of "gf_add-to-cart..."

It is not uncommon for community members to report that their add to cart, viewed product, etc aren’t working sometimes, especially if they switched themes. In doing so they either forget to re-add the codes or use the same code as they were previously, without realizing some aspects of the theme code has changed.

 

Thanks,

Alex


Reply