How to redirect a Visitor only when they Exit Your Webpage??

31 replies
  • WEB DESIGN
  • |
Hello,

Anybody know how to redirect a visitor when they exit your homepage?

Let me explain more..

When someone visits my presell landing page and looks around and instead of proceeding onto one of my links to the merchants website they close the window and exit out of my site...

How do I redirect them the moment they close my website to the merchants website?

Also I wouldn't want this to interfere with any other outward links on my website..

Does this make sense to anyone, does anyone know how I can do this?

THANK YOU!
#exit #redirect #visitor #webpage
  • Profile picture of the author waloosh
    Here, try this.
    If you already have an external javascript page (javascript.js), then add this:

    window.onbeforeunload = function () {
    window.location = 'http://www.waloosh.com';
    return false;
    }
    Otherwise, edit your index page and place this in your header, not body.

    <script language=javascript>
    window.onbeforeunload = function () {
    window.location = 'http://www.waloosh.com';
    return false;
    }
    </script>
    If you did it correctly, then it will automatically redirect to the page you link it to, and have a message that asks if you'd like to "Navigate away from the current page" with a Yes or No option.

    Hope this helps!

    If you need further assistance, don't hesitate to ask.
    Signature

    My Web Development and Internet Marketing Community:
    Waloosh.com

    {{ DiscussionBoard.errors[1042008].message }}
    • Profile picture of the author Phil The Marketer
      Looks like this works!!!

      I gave it a try, but haven't tested to see what happens when I click an outward link in my webpage..

      I will test..Thank you!
      {{ DiscussionBoard.errors[1042047].message }}
      • Profile picture of the author Phil The Marketer
        Darn...I just gave it a try and when i click on any link it brings the pop up window up....

        I just wanted it set so it only redirects when someone closes my website out...

        Any suggestions Waloosh?
        {{ DiscussionBoard.errors[1042055].message }}
    • Profile picture of the author dlundy1
      Originally Posted by waloosh View Post

      Here, try this.
      If you already have an external javascript page (javascript.js), then add this:

      Otherwise, edit your index page and place this in your header, not body.

      If you did it correctly, then it will automatically redirect to the page you link it to, and have a message that asks if you'd like to "Navigate away from the current page" with a Yes or No option.

      Hope this helps!

      If you need further assistance, don't hesitate to ask.
      Unfortunately this did not work for me.

      No matter what link I click on, it activates the exit script.

      I ensured that they were INTERNAL links page.html NOT Worldwide leaders in specialist recruitmentpage.html

      this did not work,

      I also tried a php redirect as well as an html redirect....

      But for some reason it keeps doing it.

      When i copy link location in web browser, somehow it keeps getting converted into a FULL link (http://).

      I am using Dreamweaver...

      Any IDEAS?
      Signature

      Don't Give UP! See how I made mt first $69.73 online :)

      {{ DiscussionBoard.errors[8819261].message }}
    • Profile picture of the author StanHyeck
      Originally Posted by waloosh View Post

      Here, try this....
      If you need further assistance, don't hesitate to ask.
      Any ideas on making it work fully with Chrome? The popup happens and asks. However the "redirect" piece doesn't work.

      And to the multiple people saying they don't like this stuff, a few things:
      1) If the page is a video, and some people (like me) get annoyed with video and would rather read the thing, then an exit block can give someone the chance to READ the video script

      2) These exit scripts have been proven time and time again to dramatically increase the rate of sales ... why do you think so many people do them? Perhaps the initial price was too expensive so the exit block/redirect is designed to maybe offer payments or something. I have seen people DOUBLE their sales with these.

      You don't have to use them on your site if you don't want or isn't appropriate (like a blog). However not using at least one on a sales page, that I just don't get.
      {{ DiscussionBoard.errors[9007448].message }}
  • Profile picture of the author waloosh
    Hmm, I just retested this... unfortunately, this will conflict with your site's links. Every time you click on any link, it will popup and ask.

    I'll try to see if I have anything else in my arsenal.

    EDIT: Oh wait, that's because the link I tested was actually external, lol. I tested again with a link to a page within the same directory of my index, and it works perfect!
    Signature

    My Web Development and Internet Marketing Community:
    Waloosh.com

    {{ DiscussionBoard.errors[1042052].message }}
  • Profile picture of the author waloosh
    How do you have your page links coded? Are they full URLs or just "/page.html" or "page.html" ?


    If they're full URLs, this script will think of them as external pages and will give you the redirect and warning. If they're just "page.html" or "/page.html" then they're considered internal pages and wont give you the warning nor redirect anywhere.
    Signature

    My Web Development and Internet Marketing Community:
    Waloosh.com

    {{ DiscussionBoard.errors[1042059].message }}
    • Profile picture of the author Phil The Marketer
      It is a single page salesletter...the outbound links on my page are full http://www..etc...
      {{ DiscussionBoard.errors[1042066].message }}
      • Profile picture of the author Phil The Marketer
        Dude Waloosh you are the man! Thanks for helping me get that up and running, you sure do know your stuff I couldn't of done it without your help man!!! Sweet!
        {{ DiscussionBoard.errors[1042304].message }}
    • Profile picture of the author imajen
      Hi Waloosh,
      I just came across a post you had going with someone about a year ago regarding exit pop ups and I was hoping to solicit a bit of help from you. I am trying to configure Exit Splash on my site but am having issues with the pop up appearing when any link is pressed...when all i want is it to appear if they press the back button or try to exit the site. You mentioned something about the urls...which I didn't really follow. Hopefully you are still around on the forum and able to help me with this....I am at the point of pulling my hair out.
      Thanx
      Jen
      {{ DiscussionBoard.errors[2624126].message }}
      • Profile picture of the author CASimmons
        Originally Posted by imajen View Post

        Hi Waloosh,
        I just came across a post you had going with someone about a year ago regarding exit pop ups and I was hoping to solicit a bit of help from you. I am trying to configure Exit Splash on my site but am having issues with the pop up appearing when any link is pressed...when all i want is it to appear if they press the back button or try to exit the site. You mentioned something about the urls...which I didn't really follow. Hopefully you are still around on the forum and able to help me with this....I am at the point of pulling my hair out.
        Thanx
        Jen
        What he was saying was that any links configured like http:// www.somesite .net (considered external) will cause the popup while links configured like /filename.html or php will be considered internal and will not prompt the popup

        So what you want to do is shortcode all your internal links.
        Signature
        Learn How to Get Unlimited Traffic from the World's Leading Sites

        -------------------------------------------------------------------------------------

        An Entrepreneur's Life: Learn It. Do It. Teach It. - www.CircleOneConnect.com
        {{ DiscussionBoard.errors[2630565].message }}
  • Profile picture of the author waloosh
    Anytime =D was a pleasure working with you.
    Signature

    My Web Development and Internet Marketing Community:
    Waloosh.com

    {{ DiscussionBoard.errors[1042316].message }}
  • Profile picture of the author Sid Kaplan
    Just passing through and saw this as a great example of members helping members. Great work waloosh!
    {{ DiscussionBoard.errors[1052747].message }}
  • Profile picture of the author HomeBizNizz
    Gets me thinking about porn pages...
    {{ DiscussionBoard.errors[1053375].message }}
  • Profile picture of the author Harrier
    Ya Know?.... This is one of my pet peaves.
    When I am done with a site and click to exit... that is exactly what I want to do and
    to be redirected by them really gets me annoyed.
    But it is a sure way to make sure that I do not visit their site again.

    {{ DiscussionBoard.errors[1053937].message }}
    • Profile picture of the author E-supreme
      Hi,


      Try using Dave Guindon's Exitsplash.com

      That will do the trick!
      Signature
      {{ DiscussionBoard.errors[1055976].message }}
    • Profile picture of the author BurgerBoy
      Originally Posted by Harrier View Post

      Ya Know?.... This is one of my pet peaves.
      When I am done with a site and click to exit... that is exactly what I want to do and
      to be redirected by them really gets me annoyed.
      But it is a sure way to make sure that I do not visit their site again.
      I agree with you 100%. I will never go back to a site that has any pop-ups of any kind again.
      Signature
      {{ DiscussionBoard.errors[1173055].message }}
      • Profile picture of the author OmarMartin
        He said this is for a SALES page...

        If the person is clicking the X to leave
        then you should in fact hit them with an
        exit splash or redirect.

        Its common sense... simple math. A certain
        percentage of those that leave will end
        up buying.

        It just makes business sense to do this.

        Those of you that don't do this because
        you don't want to "disturb" people that
        are LEAVING your sales pages.... well..

        YOU are leaving thousands of dollars
        on the table.

        Omar
        Signature

        Omar Martin, CEO
        Higher Level Strategies, LLC
        OmarMartin.com

        {{ DiscussionBoard.errors[2474973].message }}
  • Profile picture of the author ny_mariposa
    I also hate to be redirected. Brings back nightmares of long ago days when I couldn't do anything I actually wanted to do on the net because of such things.

    Less annoying would be a popup that tries to entice me to stay when it detects my mouse coming close to the exit button.

    An automatic redirect like the one you speak of would have me running a virus check on my computer to be safe, and I also would make a note not to go back to your site.

    Sorry for the brutal honesty.

    Just my 2 cents worth of my opinion.
    {{ DiscussionBoard.errors[1056208].message }}
  • Profile picture of the author kendrickyi
    yes I kinda agree that redirecting a user would be quite annoying.
    perhaps a less annoying tactic would be to simply put a window.prompt,
    prompting the user if he/she really wants to exit.
    I see that a lot.
    Signature

    "My Affiliate Marketing Mini Course To Help You Start An Affiliate Marketing Business That Could Generate Passive Affiliate Income For You Every Month, Even If You Are An Internet Newbie!"

    Unlock The Secrets To Wealth Now!

    {{ DiscussionBoard.errors[1061457].message }}
  • Profile picture of the author johnjimat
    well the script is just for single page only. thanks for the script. i have use it for my single website page
    {{ DiscussionBoard.errors[1061904].message }}
  • Two questions:

    1) How would you use this with an Aweber form since it's an external page and it triggers the redirect when people opt-in

    2) How can you modify the pop up text message?

    TIA!
    {{ DiscussionBoard.errors[1172966].message }}
  • Profile picture of the author downloadvyp
    this is a very interesting article.thank you very much
    {{ DiscussionBoard.errors[2630599].message }}
  • Profile picture of the author tbjason
    I tried this forever and had so many frustrating moments. So I just straight up bought a plugin and it works like a champ. Forget all the crap coding that never works right, or some parts work and some don't. I just bought Action PopUp: Attention-Grabbing Unblockable PopUps When Your Visitors Leave the Page... saves you lots of time and headaches my friends.
    {{ DiscussionBoard.errors[2636891].message }}
  • Profile picture of the author pr678com
    Banned
    beautiful degisn, useful content will be better for the visitors.
    {{ DiscussionBoard.errors[2643697].message }}
  • Profile picture of the author jakeseth12
    The script that you have provides is useful for people who are having a small website with only one, is there something for larger website?
    {{ DiscussionBoard.errors[2673674].message }}
  • Profile picture of the author derekmichael02
    Mike Dillard maintains that this DOUBLED his sales. He did $4 Mil last year. See it in action of pro: http://www.magneticsponsoring.com/msletter

    It's pretty awesome how he does it.
    Signature

    [FREE VIDEO]: Secrets Behind A $16K Month

    [FROM Setmefreeinternetmarketing.com]: Money Making First ($1, $10, $100, $1,000, $10,000)
    {{ DiscussionBoard.errors[4809463].message }}
  • Profile picture of the author raxe
    I must agree that this kind of redirect is pretty annoying for users, who probably would never return to this website again. There are better ways of keeping your customers on your site.
    Signature
    Raxe Project - Professional advertising services. We believe quality can be made affordable!
    Website Development & SEO - Graphic Design - Marketing Services - Events Organisation

    Visit our blog for free Search Engine Optimisation Guides
    {{ DiscussionBoard.errors[4813086].message }}
  • Profile picture of the author nightshade877
    Banned
    My first idea was to create a javascript popup(type) message that appears upon your visitor trying to leave. When this accorus, you could pretty easily write the code to open a new tab or window with the website you want to redirect them to. Just go to a coding forum and ask how to create a message similar to those "are you sure you want to leave this page" messages. And once that happens, it should trigger a new window or tab to open with the site of your choice.
    {{ DiscussionBoard.errors[5573265].message }}
  • Profile picture of the author Azarna
    Why on earth would you want to force a visitor somewhere other than where they want to go? Isn't that really rude?
    {{ DiscussionBoard.errors[5573462].message }}

Trending Topics