Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-20-2007, 04:55 PM
WebProWorld New Member
 

Join Date: Nov 2007
Posts: 1
sam999 RepRank 0
Lightbulb Popup Window once someone leaves the site

Hello all

First time poster but have lurked and learned quite a bit from these forums. Thank you.

Here is what I want to do. I hope this is the correct forum. If not, will one of the bosses here just move it to where it should be located.

I have a few website but they are producing marginally. I want to query my visitors when they leave. I want to know why they left without buying anything. Were they just scoping our pictures or whatever or was there something they wanted but did not see.

I know I can have pop ups when someone leaves the site (or at least closes a window from the site.) I want to know is there a way to randomly pick a visitor? I do not want the pop up/under to happen to every visitor, that will be seen unfavorably.

I want to say every "x" (maybe every 10th or 20th) visitor gets the pop up and I want to ask them to tell us why they did not buy. If I want their answers to be sent to me, is there a way to have it e-mailed back to my e-mail address without using the customers e-mail etc?

I hope my question is clear. I can try to refine if needed.

I want to thank everyone that answers.

Samuel
Reply With Quote
  #2 (permalink)  
Old 11-20-2007, 06:11 PM
wige's Avatar
Moderator
WebProWorld Moderator
 

Join Date: Jun 2006
Location: United States
Posts: 1,843
wige RepRank 4wige RepRank 4wige RepRank 4wige RepRank 4
Default Re: Popup Window once someone leaves the site

(Moved to web programming)

It is fairly easy to pop up the window using on onunload event in the body tag, however, to randomize the display of this popup would require some server-side programming. You would use PHP or SSI to add the javascript code to the pages of the user you want to question. So if you put the javascript code into a text file (lets say, whydyaleave.php) you might include the following in your header:
PHP Code:
<? $r rand(1,10); if ($r == 2) include(whydyaleave.php); ?>
And the following to your body tag:
PHP Code:
<body<?=($r==2)?' onunload="loadJavascript"':''?>">
This would cause each page to have a 1 in 10 chance of displaying the popup if someone left.

Extra credit to anyone who names the obscure and ancient decision logic used in the body tag.
__________________
The best way to learn anything, is to question everything.
Reply With Quote
  #3 (permalink)  
Old 11-20-2007, 07:07 PM
DaveSawers's Avatar
WebProWorld Veteran
 

Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 389
DaveSawers RepRank 1
Default Re: Popup Window once someone leaves the site

I think all you'll achieve by doing this is to annoy most (if not all) of the viewers who get selected.

Much better would be to have a survey page on your site where you can ask viewers what they think, why they bought, didn't buy, etc. You may have to bribe users with prizes to get them to fill in a survey.
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote
  #4 (permalink)  
Old 11-20-2007, 09:20 PM
WebProWorld Veteran
 

Join Date: Nov 2003
Location: Delaware - USA
Posts: 472
nipplecharms1 RepRank 0
Default Re: Popup Window once someone leaves the site

Quote:
Originally Posted by DaveSawers View Post
I think all you'll achieve by doing this is to annoy most (if not all) of the viewers who get selected.

Much better would be to have a survey page on your site where you can ask viewers what they think, why they bought, didn't buy, etc. You may have to bribe users with prizes to get them to fill in a survey.
Thanks so far. I think maybe you are right that it will piss them off. also, we tried the survey. have one on the site. Maybe I need to rework it. We offer if you fill it out, you are in a drawing for a monthly prize.

I will rethink this idea.

Samuel
__________________
Non Piercing Body Jewelry - All the pleasure and none of the pain! - Body Jewelry
Reply With Quote
  #5 (permalink)  
Old 11-21-2007, 08:01 AM
WebProWorld New Member
 

Join Date: Nov 2007
Posts: 6
seitepedia RepRank 0
Default Re: Popup Window once someone leaves the site

take care with ads on Popup Window, most of the companies do not allow it.
__________________
http://www.seitepedia.com - add german sites for free
computer kultur spiele
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Employee leaves and sets up a duplicate site ukgeezer eCommerce Discussion Forum 11 12-07-2006 11:39 AM
Windows updates and Windows Server Update Services links TrafficProducer IT Discussion Forum 0 04-12-2006 12:24 PM
Denial of Service in Windows Server 2003 and Windows XP WPW_Feedbot IT Discussion Forum 0 03-09-2005 06:30 PM
Kayak Travel Site Leaves Beta, Launches Paid Listings WPW_Feedbot Search Engine Optimization Forum 0 02-09-2005 11:30 AM
Windows IT Pro UPDATE-- A look at Windows Server 2003 Servi WPW_Feedbot IT Discussion Forum 0 12-22-2004 03:31 PM


Search Engine Optimization by vBSEO 3.2.0