Forum Moderators: coopster
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...
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.
didn't make them popups but windows in a new target - js resizes them to a popup-like sizeprecisely
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.