Exit Marketing

The SOLO shopping cart can easily be set up to perform exit marketing when a customer abandons the shopping/checkout process before completing an order.  This is done through a combination of scripts added to the virtual storefront html along with the Exit Handler Script property of the cart options.  NOTE: This feature is currently not supported by the .NET cart.

 

Technical Overview

The exit handling is handled entirely by client side script by the web browser, and is achieved by catching the beforeunload browser event in client script.  This event will fire for any navigation event, both off site as well as within the normal shopping/checkout process, so the event handler must determine if the navigation event is a proper click through within the site or navigation offsite.  This is accomplished by using a boolean flag variable named properClickThrough which is set to false by default and set to true by any valid onsite navigation event.  The event handler then checks if the value is false when handling the beforeunload event and only executes the exit marketing code if this is the case.

 

Basic Implementation

While SOLO is very flexible in the way things can be set up, in a majority of cases implementation can simply be plugged in as follows:

<script language="JavaScript">

//Flag variable for proper click through

//When false, exit handling code will run as the user is navigating offsite

//Default to false – valid navigation events will set it true

var properClickThrough = false;

 

//If the current page is the thank you page, set properClickThrough to true since the sale has completed

if (document.location.pathname.indexOf("b1_singleform1thankyou.asp") != -1)

{

properClickThrough = true;

}

</script>

 

Integrating the Marketing Specific Code

The marketing specific code will be unique to each implementation, but should follow these rules:

Once this code is ready it can be added to a script block in the virtual storefront html.  Before doing this, be sure to read the next section on testing.

 

Testing

In order to test things in production without exposing them to customers, follow these steps:

Once everything is verified to be working properly, go back and set the default for properClickThrough to false to enable the functionality for all customers.