I have written a lot recently about the importance of mailing lists. Last Friday, in fact, I explained about how I had been working on a lightbox solution for optins using the You Can't Block This script. The only problem is that I have been worried about bugging my normal readers and tarnishing my brand.
Sure enough, I got this thoughtful comment from a loyal reader (Alex The Big Blogger):
I’m not a fan of Popups, I consider them a little bit spammy, although I’ve tested them out on my own blog and I too have seen good results. I’ve made them with Aweber and set a delay to the apparence. On this way the visitor fisrt starts reading the post and then he gets the popup. Getting a popup as the first thing when i come to a site sets me up and makes me walk away.
That is exactly what I am worried about — but I like the idea of a delay.
Then it occurred to me that I could just put some php code around the JavaScript based on the referrer to determine if the lightbox appeared. For my initial experiment, I am only showing the opt-in box to users from StumbleUpon, Google search, Yahoo search and MSN search. That way, I should not be offending my regular readers. (I know I am not the first person to have this idea, by the way).
In addition to that, I have the popup set to display once per browser session. That should allow for minimum annoyance.
I will let you know how it goes. I have added some Google Analytics code to the popup box html, so I should be able to get some decent stats on the performance.
One issue — not all browsers are configured to report the referring website. For our current experiment, those visitors will not see the box. I may change this behavior later.
In case you are interested, here is the trivial php code to manage who sees the popup:
$referer = strtolower($_SERVER[“HTTP_REFERER”]);
if ( strstr($referer,”google”)||strstr($referer,”yahoo”)||
strstr($referer,”.live.”)||strstr($referer, “stumbleupon”))
{
?>
— POPUP SCRIPT HERE —
(Special thanks to Josh Spaulding for help with troubleshooting)
Have a great day!
Mark
Once you decide for an delayed popup, you have to choose the right duration of the delay. On my italian flagship blog the best delay turned out to be 40 seconds. Check out this post on how to find out the best delay for your site and provide us feedback on how long it is.
ciao
alex