Exit popup/redirect for wordpress

5 replies
Anyone have code to redirect user when they close my webpage or leave my site?

I use wordpress.
Thanks!~
#exit #popup or redirect #wordpress
  • Profile picture of the author David V
    Lot's of premium one's out there, the free one's are slimmer pickings.
    This one used to work decent: WordPress › Pinoy Pop Up on Exit « WordPress Plugins but the code might need some updating for WP v3.5
    I haven't used this in some time, so I can't validate it will work in v3.5 as is.
    Test it out.
    {{ DiscussionBoard.errors[7604231].message }}
    • Profile picture of the author capsoon
      you can see example javascript code as below

      HTML Code:
      <script type="text/javascript">
        var exitmessage = 'Please dont go!';
          DisplayExit = function () {
      		return exitmessage;
          };
          window.onbeforeunload = DisplayExit;
      </script>
      {{ DiscussionBoard.errors[7604596].message }}
      • Profile picture of the author itpankaj
        For every page 'Please don't go!' message is coming. Can we restrict so that this message will come only when you leave the site.

        <script type="text/javascript">
        var exitmessage = 'Please dont go!';
        DisplayExit = function () {
        return exitmessage;
        };
        window.onbeforeunload = DisplayExit;
        </script>
        {{ DiscussionBoard.errors[8445401].message }}
    • Profile picture of the author targetrix
      Banned
      [DELETED]
      {{ DiscussionBoard.errors[7923028].message }}
      • Profile picture of the author David V
        Originally Posted by targetrix View Post

        That's very useful for me too. But there's this one "google question" - would these pop-ups not affect "user experience" and thus SEO rankings could downsize? Pl. share your thoughts...Thanks

        Haresh, Targetrix
        They might affect user experience, would depend on your users.
        I would say never place them on every page, use them strategically, and use cookies so it doesn't show on every page load. That's just my opinion. I usually click off any site that does that on every page and every page reload.
        As far as google, I can't say for sure. Really would have to test thoroughly to know, or find someone who has.

        Everyone seems to hate them, yet everyone uses them, and they do work at capturing attention.
        {{ DiscussionBoard.errors[8445465].message }}
  • Profile picture of the author deekay
    Here is another free one for you wpexitwindow.com
    But few things you should consider while applying any strategy for exit traffic...
    1. If you have adsense or affiliate site then these script will interfere with your monetization goal....
    2. These scripts works well with squeeze pages or lead generation pages...
    {{ DiscussionBoard.errors[7914958].message }}

Trending Topics