Klaviyo tracks a Checkout Started event from Shopify when a shopper enters their email address and shipping information ("Customer information") on the first page of the Shopify checkout process and clicks continue ("Continue to delivery method"). This metric is included in the Klaviyo/Shopify integration and does not require any additional work to set up.
Once you get your custom "Added to Cart" metric syncing, head to the Klaviyo Flow Library to find a pre-built Abandoned Cart Reminder flow that's built using metric.
Paste this code directly underneath the Klaviyo Viewed Product snippet in your product.liquid theme:
"AddToCart" in the
getElementById statement may need to be changed depending on the ID of the Add to Cart button of your product page. This snippet will watch for the "add to cart" button element submitting, and track an event when someone clicks this element.
This event functions similarly to the Viewed Product event, in that each item someone adds to their cart will trigger a new event.
If you build a flow triggered by the Added to Cart event, make sure to add a condition to the flow that will prevent shoppers from being bombarded with emails each time they add an item to their cart.
Additionally, if you also send a traditional Abandoned Cart Reminder flow that is triggered by the Checkout Started event, you'll want to add another filter to the flow to make sure that people who trigger this second flow do not get your Added to Cart flow.