Who are the targeted visitors to the site? These are users interested in information posted on the site, potential customers of goods and / or services. Separating targeted site visitors from random ones is quite simple. Target visitor, as a rule, comes on request from a search engine.
Therefore, I came up with a great idea. If a user came to the blog from a search engine, then you can easily find out what request he came from, and show him such a hint, for example:
You have come to this page for: lists of horizontal CSS drop-down menus .
Like this article? Subscribe to RSS!
Why do you need it? There are at least 5 reasons.
1. Sometimes, visiting an interesting website / blog just by a search query, the user is distracted by other items he is interested in and sometimes already forgets why he went to this site. Therefore, such an inscription will be for him a small hint.
2. Most often, finding or not finding the necessary information in the blog, the visitor immediately closes the page, but the author does not know if the user really found what he was looking for on request. Therefore, an invitation to comment on the article will help us find out whether this information is sufficient in the article, or the user has not found what he was looking for.
')
3. Instead of an invitation to comment on the article, you can make a small form with the question “Did the article help you find the information you are interested in?” And several options for “Yes”, “Some”, “No”. This data can be associated with article rating. For example, the answer is "Yes" - 5 points, "A little" - 3 points, "No" - 1 point.
4. Even if the visitor did not find what he was looking for, an invitation to subscribe to RSS would not be superfluous.
5. Being on the site of the target visitor is especially important for us. The more we interest him, the greater the chance that he will become our regular visitor, or at least an RSS reader, which is just as important.
According to the statistics of my blog, most of the target users come on requests from Google and partly from Yandex. Therefore, for the blog, I wrote code that collects requests from only these two systems. You can use it on your blog or website.
PHP code:
< ? $se=getenv("HTTP_REFERER");
if (strstr($se,"q=") or strstr($se,"&text=")):
while (ereg(′%([0-9A-F]{2})′,$se)):
$val=ereg_replace(′.*%([0-9A-F]{2}).*′,′\1′,$se);
$newval=chr(hexdec($val));
$se=str_replace(′%′.$val,$newval,$se);
endwhile;
if (strstr($se,"q=")) //Google
$text_pos = strpos($se,"q=")+2;
elseif (strstr($se,"&text=")) // Yandex
$text_pos = strpos($se,"&text=")+6;
$text_pos_amp = strpos($se,"&",$text_pos);
$se = str_replace("+"," ",substr($se,$text_pos,($text_pos_amp-$text_pos)));
?>
: < ?=$se;? > .
? RSS .
< ? endif; ? >
CSS:
.se_request {background:#FEE2E2; padding:7px; color:#FF3300; width:95%; margin-bottom:10px; border:dashed 1px #FF3300;}
The code may not be perfect, so I will be glad to any of your amendments :)
Cross post