Skip to main content
Solved

Viewed product and Add to cart integration not working on react app.

  • May 24, 2022
  • 1 reply
  • 181 views

Forum|alt.badge.img+2

Hi there,
I want to integrates Viewed Product event on my React App.
I saw this snippet in a docs 
 

But I am not using the shopify theme for product page. I made a product page on my react app.
This is how I tried to convert it into the simple react code but it didn’t work
 

 
Can you please help me how can I add those code into my React app.

Best answer by stephen.trumble

Hey @fahad873 

Thank you for reaching out for help with your Viewed Product tracking snippet for your react app.

The article I linked above is our developer documentation on creating a viewed product event. If you haven’t read through this doc completely, I would suggest doing so first. With this being a custom integration, this will be entirely up to you on how you execute this on your react page. If you aren’t comfortable writing code you can reach out to one of our Klaviyo Partners  for help. 

Is there a developer or Partner that can help out? Please share your feedback and advice to help @fahad873!

Thank you again for being part of the Klaviyo Community!

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

1 reply

stephen.trumble
Community Manager
Forum|alt.badge.img+60
  • Community Manager
  • 1518 replies
  • Answer
  • May 24, 2022

Hey @fahad873 

Thank you for reaching out for help with your Viewed Product tracking snippet for your react app.

The article I linked above is our developer documentation on creating a viewed product event. If you haven’t read through this doc completely, I would suggest doing so first. With this being a custom integration, this will be entirely up to you on how you execute this on your react page. If you aren’t comfortable writing code you can reach out to one of our Klaviyo Partners  for help. 

Is there a developer or Partner that can help out? Please share your feedback and advice to help @fahad873!

Thank you again for being part of the Klaviyo Community!