Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Exit pop allows you to give the customer that attempts to leave the cart an incentive to complete their purchase.

...

To configure your Exit Pop navigate to:

Panel

Main Menu Marketing Configuration Checkout Exit Pop

 Image Added

Image RemovedImage Added

Image Removed


If the customer attempts to close the browser, a standard browser popup will appear. A custom text message that you create offering the customer a discount (coupon) will appear like the one show below.

...


There are only 4 fields to configure; Graphic, Coupon, Text and On View Cart. 

Image Removed Image Added
Exit Pop configuration

NameDescription
Coupon Graphic

...

Provided that you have already created and uploaded your coupon graphic as mentioned earlier, you can select it via the drop-down menu to the right of the Graphic prompt. 
Coupon

...

Provided you have already created your Exit Pop Coupon, you can select it via the drop-down menu to the right of the Coupon prompt. 
Text

...

Sample text has already been entered in the text box. You can edit as you see fit. Remember that for the customer to return to the cart, they'll need to click the "cancel" button presented. So, your text message must have a statement to that effect. You'll also need to enter the amount of your discount that the coupon will apply. 
On View Cart

...

By default, the Exit Pop feature is programmed to appear only if a customer closes the browser at screens beyond the "view cart" screen. If you want the Exit Pop to appear upon closing of the View Cart screen, then place a check in this box.


Click the "Save" button at the bottom of the screen when you are finished.


Preview Exit Pop: To test and preview your configuration, return to the Exit Pop screen and click the "preview" button to on the right.

...

Answer:
The Exit Pop functions by javascript that looks for a shopping cart session cookie and if it does not find one it sets one. If the cookie exists, when the customer abandons the exit pop pop-up is triggered. The cookie is updated. If the customer returns and the cookie exists on their browser and they abandon the cart the exit pop will not be displayed.

Example code:

Code Block
languagegroovy
themeDJangolanguagegroovy
linenumberstrue
window.onbeforeunload = function (ev) {
// Is the cookie set already?
if (readCookie("seenPopup")) {
noCouponPop = true;
}
// Check to see if we want to show the exit pop
if (!noCouponPop) {
// Set a cookie saying that we've already seen the popup
createCookie("seenPopup", "true", 300);

// Tell the browser to go back up to the top of the page.
// document.location.hash="Top";
// Display our light-boxed coupon page
MOOdalBox.open( // case matters
"/checkout/exitPopCouponLoad.do?merchantId=${exitPop.merchantId}&screenBrandingThemeOid=${exitPop.screenBrandingThemeOid}", // the link URL
"The coupon has already been applied to your cart. Click close to finish your order.", // the caption (link's title) - can be blank
"550 450" // width and height of the box - can be left blank
);
// Remove our window hook
window.onbeforeunload = null;
// Return the text that will be displayed back the browser with the cancel or OK dialog
return couponAlertText;
}
return null;
};

...

and here's the code that's loading it:

Code Block
languagegroovy
themeDJangolanguagegroovy
linenumberstrue
function exitPopOnLoad(ev) {
noCouponPop = false;
}
if (window.attachEvent) {
window.attachEvent('onload', exitPopOnLoad);
} else {
if (window.onload) {
var currentOnLoad = window.onload;
window.onload = function () {
currentOnLoad();
exitPopOnLoad();
};
} else {
window.onload = exitPopOnLoad;
}
}

...