Home > Technical & Creative Skills > Programming, Servers & Scripts

On Click Script - PopUnder Offer (4)


02-28-2017 03:21 AM #1 ianternet (Senior Member)
On Click Script - PopUnder Offer

looking for a on click script. for example… if someone clicks play on a youtube video on my LP I want it to popunder the offer or open a tab of the offer. I cant seem to find the proper code I want to do this of if this is even possible.


02-28-2017 04:58 AM #2 erikgyepes (Moderator)

Hey Ian,

Here is something similar (maybe even better):

Code:
<a onclick="launchpopLink()" target="_blank" href="http://track.outgoinglink.com/click/1">Accept!</a>
<script>
var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;

function launchpopLink() {
    url = "http://track.outgoinglink.com/click/2";
    document.location.assign(url);
    if (isSafari) {
        window.open('http://track.outgoinglink.com/click/1', '_blank');
    }
    return false;
}
</script>
What this does is that it opens a popup (sorry no popunder) with your offer + it redirects your original window to another offer or wherever you want (maybe resell?).

Probably not exactly what you wanted, but similar.

Hope it helps a bit.

Erik


02-28-2017 05:21 AM #3 ianternet (Senior Member)

thanks.. interesting. the popup is teh first visible page then the users sees then? mobile friendly as well?


02-28-2017 05:56 AM #4 erikgyepes (Moderator)

This is for mobile, not tested on Desktop.

1. visitor lands on your LP
2. he clicks on CTA (Accept)
3. New window opens with Offer
4. Your LP (from step 1) redirects to another Offer

(this is for multi offer landing page, but it doesn't really matter where you send them)

I recommend test it out, play with it on your phone first maybe.

Funny thing is that the results may be not always the best (ie. the idea that more offers and pages opened = more $$$ is not always true).


Home > Technical & Creative Skills > Programming, Servers & Scripts