Forum Moderators: coopster

Message Too Old, No Replies

PopUp Page Problem

and the resolution

         

grandpa

11:18 pm on Jan 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've created some cute little PHP popup pages; you click an image on the page and the popup appears. It contains (allegedly) a little more information, a larger image and you can even add the item to the cart. I added a link at the top and bottom of the popup to close it.

My Problem:
These pages are showing up in the serps, usually at the top, since they are optimized for the product/keyword. If you get to one of these popups from the serps, you can close the page, or even add the item to the cart. But you can't navigate back to my site!

So, how to resolve this problem.

I could have added a link back to my site. Instead, I took this route:

<?php
$refer_page = NULL;
$refer_page = $_SERVER['HTTP_REFERER'];
$refer_page= substr($refer_page,0,35);
if ($refer_page== "http://mydomain/") { $_LOCALrefer = 'ON'; }
?>
<body>

Then, where I have the Javascript close, I added this code:
<?php
if ($_LOCALrefer == 'ON' OR $refer_page == "") {
echo "<td class=lcls><a href=\"javascript:window.close();\">Close</a></td></tr>";
}
else {
echo "<td class=lcls><a href=\"http://mydomain\"><b>Visit My Domain</b></a></td></tr>";
}
?>

I added similar logic around the form on this page, so you can't order the item if you navigated to the page from the serps.

I have a question about the effectiveness of using $refer_page == "" as a test for no referral page. I'm also curious if anyone else has run into a similar situation, and what you did to resolve it. And, of course, there are lingering doubts about going over the top on this one...

mincklerstraat

8:25 am on Jan 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I had some popups that I figured might make it into the SERPS (site not live yet), actually I didn't make them popups but windows in a new target - js resizes them to a popup-like size - reason was actually to attract more search engines.. I quickly got into that mental ball of wax thinking about all the possibilities regarding referers and who has what windows open. I started out putting the links into the same target (not opening a new window), and using a javascript to re-size the window back into a larger 'main-site' style size if the referer came from the popup window. However, this had an irritating effect. I think now all just go into a new target.

This isn't nearly as complex as what you're doing, though, and we don't have to worry about ordering things, no shopping basket. You might want to think about the possibility of some kind of session-based tracking since your user popup behavior is so much more critical, and referers are known for being pretty unreliable. If no session is already present when somebody is on the popup page, it means they haven't hit the main site yet, and you can have your page display accordingly.

grandpa

1:12 pm on Jan 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Your popup description describes my pages much better than mine..
didn't make them popups but windows in a new target - js resizes them to a popup-like size
precisely

The reason I posted this was to see what I could stir up about using the referer. It was the first thought I had and I ran with it.
[DOH]Truth is, those pages already contain session info.[/DOH]

What I'm trying to avoid is having a link back to the site if you got there from the site. That's just asking for problems, IMO. But then I realized a need for a link back to the site and got in a hurry... I'll revisit this from the session point of view, thanks. I like the idea of the js resize to full page too, but there is no need and I'd rather not. The page opens full size from the serps.