Solved

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

  • 24 May 2022
  • 1 reply
  • 140 views

Badge +1

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.

icon

Best answer by stephen.trumble 24 May 2022, 22:27

View original

1 reply

Userlevel 7
Badge +60

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!

Reply