Hey @Prachi - My Dream Hamper
Without seeing the code snippet in your theme and the element id by inspecting the button on your website, its difficult to investigate,
Here are some suggestions for you (maybe you have already applied them),
- Make sure you have added the Klaviyo tracking code to your Shopify store correctly. You can check this by viewing the source code of your store's homepage and searching for the Klaviyo tracking script. The script should be located just before the closing </head> tag.
- Verify that the button ID you are using in your code is correct. You can do this by inspecting the button on your store's product page and checking the id attribute of the button element. The id should match the one you are using in your code.
- Try changing the button ID in your code to a more specific selector. Instead of using the entire button ID, you can try using a more specific selector that targets just the button element. This should help ensure that the script is targeting the correct button element.
-
Check if there are any errors in the browser console. When you load your store's product page and click on the "Add to Cart" button, open the browser console (usually accessible by pressing F12) and look for any error messages related to your script. This can help you identify any issues with the code.
You can also read more about this here
I hope this helps,
Thanks,
Arpit Banjara