Home > General > Affiliate Marketing Forum

Split Test Exit Pop Ad Copy (6)


01-15-2014 03:28 AM #1 shoent (Member)
Split Test Exit Pop Ad Copy

Anybody have a script they wouldn't mind sharing in which i can split test different ad copies for exit pops? Current exit script im using is pasted below. thanks

<script language="javascript">
(function() {
setTimeout(function() {
var __redirect_to = 'http://yoururlhere.com/';//

var _tags = ['button', 'input', 'a'], _els, _i, _i2;
for(_i in _tags) {
_els = document.getElementsByTagName(_tags[_i]);
for(_i2 in _els) {
if((_tags[_i] == 'input' && _els[_i2].type != 'button' && _els[_i2].type != 'submit' && _els[_i2].type != 'image') || _els[_i2].target == '_blank') continue;
_els[_i2].onclick = function() {window.onbeforeunload = function(){};}
}
}

window.onbeforeunload = function() {
setTimeout(function() {
window.onbeforeunload = function() {};
setTimeout(function() {
document.location.href = __redirect_to;
}, 500);
},5);
return 'WAIT BEFORE YOU GO! CLICK THE *CANCEL* BUTTON RIGHT NOW! PAGE. I HAVE SOMETHING VERY SPECIAL FOR YOU COMPLETELY FREE.';
}
}, 500);
})();
</script>


01-15-2014 07:08 PM #2 caurmen (Administrator)

I'm assuming you want to track the results of which exit pop performs better?

If so, you'll need to generate a random variable in your tracker, store it, then use it to replace your exit pop link.

What tracker are you using?


01-15-2014 08:18 PM #3 shoent (Member)

yes that is exactly what i am trying to do , split test like maybe a exit pop that says, Wait Stop vs DO NOT LEAVE kind of deal. i am using cpvlab. How do i do this with cpv lab. i have no clue how to set this up .


01-15-2014 10:39 PM #4 mykeyfocus (Member)

Generate a random number with php. Say 1 or 2.(easy, just google)
Then an if statement so if random number is 1 ur url contains a variable of 1 and if 2 then it contains 2. Eg.
<php if ($rnd == '1'){ ?>
Link1
<php } else { ?>
Link2
<php } ?>

Thats how i work with php. Instead of echoing html just bracket it. Same goes for changing the exit pop message. Im on my mobile now so hope this makes sense. Literally everything u need to know about php is on google. Just use queries like "random number php" or whatever ur trying to accomplish. If u get an error google it, u can guarantee someone else has already been through what ur trying to do before and asked online for help. Googling is an art, alsorts of family/friends/friends family contact me regarding pc problems and usually all it takes is to google what it is and find the answer online. Nevertheless they think ur clever


01-16-2014 01:57 PM #5 shoent (Member)

thanks but i think there must be a way to do this way easier with cpv lab, not sure though. because while im doing this i still need to be passing back variables to cpvlab


01-16-2014 05:25 PM #6 caurmen (Administrator)

Have a read of Andyvon's guide to setting up multivariate testing in CPVLab - you can use the same approach he did to generate and track random variables.


Home > General > Affiliate Marketing Forum