Home > The Newbie Zone > Questions and Answers

Mobile Back Button and Other Optimizations (4)


02-18-2016 10:06 AM #1 welsh_guy (Member)
Mobile Back Button and Other Optimizations

Sorry guys... I know this has been answered before in a thread... i've seen it with my own eyes but I can't for the life of me find the answer again despite searching a LOT!!

I've got a mobile Pop campaign and read about using a back button redirect script to redirect people to the offer if back is pressed, thereby increasing CTR dramatically.

So does anyone know the simple script involved?

Also.. given that it's a 'popup' there shouldn't be a back-button enabled anyway right? So does this create a false history for example?

While i'm here... are there any other worthwhile mobile scripts/tips to increase CTR that you can recommend?

Thanks in advance

Tim


02-18-2016 10:21 AM #2 Mia (Member)

Here are some backbutton scripts:

(yes, they all are increasing CTR, you should test and choose one that will work better for you, I use #1)

1. Simplest is here:

<script type="text/javascript">
! function () {
var t;
try {
for (t = 0; 10 > t; ++t) history.pushState({}, "", "#");
onpopstate = function (t) {
t.state && location.replace("http://yourtrackinglinkishere.com/click")
}
} catch (o) {}
}();
</script>
2. Another one:
http://pastebin.com/r4FUykrp

3. And here for chrome:
<script type="text/javascript">
(function(window, location) {
var currentLocation = location.pathname + location.search;
history.replaceState(null, document.title, location.pathname+location.search+"#!/ilovestm");
history.pushState(null, document.title, location.pathname+location.search);

window.addEventListener("popstate", function() {
if(location.hash === "#!/ilovestm") {
history.replaceState(null, document.title, location.pathname+location.search);
setTimeout(function() { location.replace("http://xxx.xxx.com"); }, 0);
}
}, false);
}(window, location));
</script>

topics:
http://stmforum.com/forum/showthread...l=1#post237751
http://stmforum.com/forum/showthread...l=1#post227406


02-18-2016 12:32 PM #3 welsh_guy (Member)

Great thanks so much, that's what I was looking for

Without wanting to sound too stupid (or more stupid!) do these work wit Pops?

My understanding is that pops are new windows so therefore don't have anything to go back to? Or do these give the impression you can go back then redirect you?

Either way i'll give them a try cheers


02-18-2016 10:34 PM #4 welsh_guy (Member)

In case anyone else was wondering I tested them and confirmed that they do create a back button if popped.

Thanks again they work great

Now to work on CR!


Home > The Newbie Zone > Questions and Answers