Page Templates:Exit Pop-ups

From Whirlwind eCommerce Wiki
Jump to: navigation, search

To many sites, exit pop-ups are a necessary evil. While they are a major source of irritation to web site visitors, they ultimately result in the recovery of many potential lost sales.

It is recommended that a coupon code be created which will be the focus of the exit pop up, inciting the visitor to stay in the site and make the purchase.

Implementation

Exit pop up implementation is a two stage process:

Stage 1: Calling the Exit Pop Up Function

The exit pop up function is a javascript function that's part of the core eV javascript class. The function basically 'initializes' exit pop up capability on the page it is called on. When the page is exited, the function will set the exit pop-up process in motion.

Call the pop up function by placing the following code IN YOUR VISITED PAGE TEMPLATE(s) (it is recommended to place in all templates, so the the pop up will occur no matter what page the visitor leaves from):

echo "
<!-- call the core eV javascript -->
<script language=\"javascript\" src=\"/common/fnEtc.js\"></script>
<script language=\"javascript\">
<!--
// initialize the exit pop up function
// one attribute is passed, this is the page that will pop up.
eV.exitPopUp('/files/exitpop.html');
// -->
</script>
";

Stage 2: Required Code in the Pop Up Page

Certain javascript code is required in the resulting pop up. As this pop up itself runs the test to see if the pop up qualifies, code must be present in the pop up window to run this test. If the pop up qualifies, the code will enlarge, move and populate the pop up accordingly. If the pop up does not qualify, the code will close the pop up. Place the following code IN THE POP UP PAGE:

<!-- call the core eV javascript -->
<script language="javascript" src="/common/fnEtc.js"></script>
<script language="javascript">
 
// set the size of this pop up window
eV.exitPopUpData = {
	'width' : 300,
	'height': 375
};
 
// As the pop up will pop even when user it navigating within the site
// this test will see if they are still in the site, closing the pop up if they are.
// if they are no in the site anymore, the pop up will then resize, move itself and display the content of the pages passed in the eV.exitPopUp(); function
eV.exitPopUpTest();
 
</script>