Case Study

You’re losing sales from a bad abandoned cart strategy—here’s how to stop

If you’ve ever set up Shopify abandoned cart emails, you know that it can drive you bananas knowing that they will only be sent to shoppers who add their email and click continue. What about all the shoppers who added your products to their cart, but got distracted before they entered their email?

They just fall through the cracks!

If you use Klaviyo for your email marketing, you’re in luck, because there’s a way to send abandoned cart emails to anyone who adds a product to your cart — and it’s easier than you might think.

I talked with James Corr from OnlyGrowth this week to learn more about how to do it. James became a Shopify expert and founded OnlyGrowth in 2015, and he’s been solving problems for Shopify merchants and helping grow businesses ever since.

A client recently asked James to set up a new abandoned cart workflow that included only those who wouldn’t have otherwise received an abandoned cart email. That workflow now has a 68% open rate and a 20% click through rate. Some pretty great results! Put shortly, he knows what he’s doing.

So the key here is to create a custom “add to cart” event. To do this, you have to add a bit of javascript to your Shopify store’s product.liquid theme file. Don’t worry, you can definitely do this.

*** Note that in order for this to work you have to already have Viewed Product tracking installed.

To do that, visit this Klaviyo help page and search Viewed Product Metric.

After that is installed, you will need to paste the code snippet below under the Viewed Product code in the product.liquid theme file.

<script text="text/javascript">
 var _learnq = _learnq || [];
 document.getElementById("AddToCart").addEventListener('click',function (){
 _learnq.push(['track', 'Add To Cart', item]);

Once both snippets are installed, you will want to check your workflows to be sure that you are not sending too many emails, and annoying all your potential customers. Make sure you don’t send a new email each time a customer adds a product to their cart. One email per cart will suffice.

Also, check and make sure that if you already have a workflow for abandoned carts that folks who add products, and then enter their email don’t get duplicate emails.

You can test this manually by going to a product page for your store, and adding the following to the end of the URL, replacing with your email address (Make sure you use an address that isn’t already subscribed to your list:


Then, reload the page and go to your Klaviyo account to search for that email. You should see a profile has been created and has tracked your product view.