Forum Moderators: open

Message Too Old, No Replies

Display an exit pop-up ad -- but not on every visit

         

Kausion_420

9:14 pm on Apr 17, 2004 (gmt 0)

10+ Year Member



How do I make a pop-up add display when someone leaves my website, and how would I make this pop-up add only display once in awhile so that it wont get annoying for reapeat visitors?.

tedster

9:39 pm on Apr 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can handle the repeat visitors with a cookie to make sure they have not seen the pop-up on their last visit (or last 2 visits, or however you want to make that work).

Creating an exit pop-up requires that you deal with a few issues. You need to know that your visitor is actually leaving your site, and not just going to another page on your site.

There are many approaches to this, which involve either javascript or server-side scripting (PHP and the like), but there's no way to handle these needs using just HTML. In fact, even cookies are not an HTML issue.

So, as a first step, I'd suggest you do a Google search on WebmasterWorld [google.com] for "exit pop-up site:webmasterworld.com" and you'll find lots of ideas from past posts here. Then, bring any questions you have to our Javascript Forum [webmasterworld.com] or to any of the server-side forums for the technology you intend to use. Good luck with it.

To get you started, here's one thread about creating exit pop-ups in a relatively simple way. But it doesn't address not showing it on every visit, just when people are leaving your site.

How to create a pop up at exit of site & not page? [webmasterworld.com]