Add MailMunch exit popups to checkout pages on Shopify to reduce cart abandonment

MailMunch's powerful "exit intent" technology lets you target customers who're about to abandon their cart. You can give out coupon codes, show private offers and a lot more in the popup to prevent users from abandoning the cart. 

This is a 2-step process which is described below:

Step 1) Install MailMunch on Shopify's checkout page

1. In your Shopify admin, go to Online Store -> Preferences.

2. Make sure that you have Google Analytics code enabled before continuing. You can follow Shopify's guide for Setting up Google Analytics by clicking here.

3. Once you have Google Analytics code enabled and saved, you'll see an "Additional Google Analytics Javascript" field within the Google Analytics box just as shown in the following screenshot:



4. Paste the following code to enable MailMunch to work on Shopify's checkout pages. Make sure to replace ______SITE ID______ with your actual site id. You can get your site id by clicking the "Manage Site" link in the top bar.

if (Shopify && Shopify.Checkout && Shopify.Checkout.step && Shopify.Checkout.step != "thank_you") {
  var script = document.createElement('script'); script.type = 'text/javascript';
  script.async = true;
  script.src = '//'; = 'mailmunch-script';
  script.dataset.mailmunchSiteId = "SITE-ID";
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);


5. Save the code and you're good to go.

Step 2) Setting Shopify's Checkout Targeting using the Exit Intent Technology

1. Create a form that you'd like to show when a user is about to abandon your cart.

2. Go to the "Behavior" Step


3. Click on the "Display Rules" pane.


4. Click "New Display Rule" button


5. Choose the following options from the dropdown: "Only Show on", "URLs containing" and then enter "checkouts" in the text field.



6. Hit "Done" and then click the "Save & Continue" button on the top.

7. That's it. Your new form will show up on Shopify's checkout page as soon as your customer is about to abandon the cart.




Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.