Skip to main content

Hi all,

I’ve followed the instructions on how to create a custom ATC event here: https://help.klaviyo.com/hc/en-us/articles/115001396711-How-to-Create-a-Custom-Added-to-Cart-Event-for-Shopify

I’ve added the script into my product.liquid page and also modified the classname value to reflect that found on my inspect element.

The issue is, however, that I can’t seem to create a flow from an ATC trigger because it gives the error that “this flow requires setting up a special metric” - and when I click on the ‘learn more,’ it just brings me back to the aforementioned help page.

The highlighted part is my ATC button found in the inspect element, and you can see the classname value is ‘btn product-form_cart-submit’.

 

Here is what my product.liquid looks like:

Here is the error, I can’t click “create” because I don’t meet the prerequisites.

 

FYI, I did try using ‘product-form_cart-submit’ - without the ‘btn’ at the front to no avail. 

Any solutions? Sorry if this has been asked before, I couldn’t find any forum post that helped.

 

Thanks guys!

Russell

 

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:

  1. Navigate to your website/homepage in an incognito browser
  2. 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
  3. After you reload the page your browser should be cookied with your desired email address, which would create a profile within Klaviyo
  4. 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:

  1. Navigate to your website/homepage in an incognito browser
  2. 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
  3. After you reload the page your browser should be cookied with your desired email address, which would create a profile within Klaviyo
  4. 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


Reply