The Most Active and Friendliest
Affiliate Marketing Community Online!

“Propeller”/  Direct Affiliate

A script that redirects users when they hit the back button?

I'd highly recommend against using a "dumb version" of any type of a back button script. If you're going to do something like that, use something with some "logic" in it like BackJacker. If you put some thought behind it and use your noodle, you can do some amazing things with it even for a non-Wordpress site.
 
I'd highly recommend against using a "dumb version" of any type of a back button script. If you're going to do something like that, use something with some "logic" in it like BackJacker. If you put some thought behind it and use your noodle, you can do some amazing things with it even for a non-Wordpress site.

Hi,

I'm not code savvy and barely understood a thing :) can you pls explain in a simple way? :)
 
Hi,

I'm not code savvy and barely understood a thing :) can you pls explain in a simple way? :)

In order for the script to work you have to have another site in the same directory for it to redirect to.


Page 1 -> user hits back button -> Back button script redirects to Page 2

Alternatively if you just want them to be unable to exit (back button will get them on the same page they came to) just set the script to redirect to "index.html" or whatever your page is called
 
Hi,

I'm not code savvy and barely understood a thing :) can you pls explain in a simple way? :)

By having a dumb script running on your site, it's going to annoy a lot of your users. There is no way to turn it off based on certain criteria like referrer, time on page, on page clicks, etc. After a few complaints to your traffic or ad network and if they visit your site for a manual review, kiss any accounts and earnings owed goodbye. You could use your tracker as a poor man's cloaker. Send whitelisted (IPS/Carrier, Device, OS, etc.) leads to the script page and everyone else who doesn't fit the criteria you set to the "clean" page. As always, test.
 
By having a dumb script running on your site, it's going to annoy a lot of your users. There is no way to turn it off based on certain criteria like referrer, time on page, on page clicks, etc. After a few complaints to your traffic or ad network and if they visit your site for a manual review, kiss any accounts and earnings owed goodbye. You could use your tracker as a poor man's cloaker. Send whitelisted (IPS/Carrier, Device, OS, etc.) leads to the script page and everyone else who doesn't fit the criteria you set to the "clean" page. As always, test.

Back button redirect scripts works wonders on improving CTR.
 
In order for the script to work you have to have another site in the same directory for it to redirect to.


Page 1 -> user hits back button -> Back button script redirects to Page 2

Alternatively if you just want them to be unable to exit (back button will get them on the same page they came to) just set the script to redirect to "index.html" or whatever your page is called

Thanks for your time.

I'm actually redirecting to my aff offer.

Can you please provide a detailed help :)

Thanks
 
Thanks for your time.

I'm actually redirecting to my aff offer.

Can you please provide a detailed help :)

Thanks

Well, as you can only redirect to a file you would need to create a file that automatically redirects to that offer, you can't link directly to a link outside of your website.
 
Where you input the link where you want the back button to redirect to you simply put the path to the file, example if your file is in the same directory and is called "backbutton.index" you simply put "backbutton.index" as your link.
 
UPDATE!!!

I got it to work with this script
<script>
history.replaceState(null, document.title, location.pathname+"#!/redirect.php");
history.pushState(null, document.title, location.pathname);
window.addEventListener("popstate", function() {
if(location.hash === "#!/redirect.php") {
setTimeout(function(){
location.replace("path-to-back-button-redirect");
},0);
}
}, false);
</script>


unfortunately, its not working on google chrome mobile and the largest chunk of my traffic comes from it!

Can anyone please modify the script?

Cheers.
 
MI
Back