monetizer expertmobi
Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

Need Script for Landing page redirect - HELP

Discussion in 'General Affiliate Marketing Forum' started by Micheal, Mar 5, 2015.

  1. Micheal

    Micheal Affiliate affiliate

    44
    6
    8
    Hello guys,

    I've a few dating landers. Currently if the visitors click the "Join NOW" button they are directed to the offer.
    What I'm trying to do is, if the visitor clicks the Join Now Button, the offer will open in a new window, and the lander will redirect to a different page in the background, while he is viewing the offer page.

    Can anyone help plz?
     
  2. monetizer
  3. benteo

    benteo Affiliate affiliate

    54
    7
    8
    Hi Micheal,

    Check out the following example, particularly the bolded line. Should be something you are looking for...

    <a class="button_primary agree" style="cursor:pointer;" target="_blank" onClick="javascript:window.onbeforeunload = null; window.location='http://www.XXX.com'; window.open('http://www.YYY.com', '_blank');">Join NOW</a>

    Regards,
    Ben
     
    Micheal likes this.
  4. Micheal

    Micheal Affiliate affiliate

    44
    6
    8
    Benteo,

    Thanks for the codes. I really have very little experience with the language.

    So the Join NOW refering link will be:
    " target="_blank" onClick="javascript:window.onbeforeunload = null; window.location='http://www.XXX.com'; window.open('http://www.YYY.com', '_blank');"

    ???

    Where XXX is for the existing window and YYY is for the new open tab?

    I am not sure how to implement it. ACn you explain a bit, plz?!?
     
  5. benteo

    benteo Affiliate affiliate

    54
    7
    8
    In the sample, XXX is your existing site; YYY is the new window.

    Try googling for more information on window.open.
     
    K likes this.
  6. crysper

    crysper Moderator moderator Service Manager affiliate

    Benteo is right, this code should work, but I made a slight change. You need 2 http addresses. http://www.YYYcom is the address for the normal 'Join now' location, usually this is the tracking link that goes to the offer page. This will open in a new tab/window. The XXX Sex - Free Porn Movies - Porno Videos on XXX.com is the address that "will redirect to a different page in the background".

    Now, I assume you know which is you Call To Action(CTA) and you know how to change the link address. What you have to do is find the <a> tag which is your CTA, and replace it with this. If you still can't figure it out, paste the CTA code here.

    Code:
    <a style="cursor:pointer;" onClick="javascript:window.onbeforeunload = null; window.location='http://www.XXX.com'; window.open('http://www.YYY.com', '_blank');">Join NOW</a>
    
     
    Micheal likes this.
  7. Micheal

    Micheal Affiliate affiliate

    44
    6
    8
    Many thanks crysper. I will test it and let you know.
     

Featured Resources (View All)

MI