Hello @russell7lee,
Thanks for sharing your question with the Klaviyo Community!
Great job reformatting the Add to Cart snippet! It does appear you had it set up correctly the first by using “btn product-form__cart-submit”
as your class identifier.
Keep in mind that since you may have just installed the Add to Cart code to your site, you may not have recorded any Add to Cart events yet; thus Klaviyo calling out this error when attempting to create the flow. To alleviate this you can either install the code and naturally allow the Add to Cart to be triggered by your site visitors. Alternatively, you can also force trigger the Add to Cart event which can also serve as a test to ensure you installed the code correctly.
I’ve also mentioned this in a similar Community post which I’ve linked below:
For ease, I’ve also highlighted the instructions here as well on how to cookie your own browser and attempt to trigger the Add to Cart code:
You can cookie your own browser with your desired email by following these steps:
- Navigate to your website/homepage in an incognito browser
- Add the following to the end of your store URL, replacing example@gmail.com with your email address:
?utm_email=example@gmail.com
- Example URL:
wwww.ExampleWebsite.com/?utm_email=example@gmail.com
- After you reload the page your browser should be cookied with your desired email address, which would create a profile within Klaviyo
- Search in Klaviyo for your email address
After your test profile has triggered at least one Add to Cart event, you should be able to create the Add to Cart flow from the Klaviyo flow library without the error message.
Thanks for being a part of the Klaviyo Community! Have a great day!
David
Hello @russell7lee,
Thanks for sharing your question with the Klaviyo Community!
Great job reformatting the Add to Cart snippet! It does appear you had it set up correctly the first by using “btn product-form__cart-submit”
as your class identifier.
Keep in mind that since you may have just installed the Add to Cart code to your site, you may not have recorded any Add to Cart events yet; thus Klaviyo calling out this error when attempting to create the flow. To alleviate this you can either install the code and naturally allow the Add to Cart to be triggered by your site visitors. Alternatively, you can also force trigger the Add to Cart event which can also serve as a test to ensure you installed the code correctly.
I’ve also mentioned this in a similar Community post which I’ve linked below:
For ease, I’ve also highlighted the instructions here as well on how to cookie your own browser and attempt to trigger the Add to Cart code:
You can cookie your own browser with your desired email by following these steps:
- Navigate to your website/homepage in an incognito browser
- Add the following to the end of your store URL, replacing example@gmail.com with your email address:
?utm_email=example@gmail.com
- Example URL:
wwww.ExampleWebsite.com/?utm_email=example@gmail.com
- After you reload the page your browser should be cookied with your desired email address, which would create a profile within Klaviyo
- Search in Klaviyo for your email address
After your test profile has triggered at least one Add to Cart event, you should be able to create the Add to Cart flow from the Klaviyo flow library without the error message.
Thanks for being a part of the Klaviyo Community! Have a great day!
David
Thank you so much David! Followed your steps and it worked perfectly. Thanks for explaining as well. Appreciate it so much.
Hey guys, I did everything above and tested by adding something to the cart. and I still can not get this button to let me create. What else can I try? snippet has recorded the product that i added to cart.
Thanx Ruben