How To Display Google AdSense Advertisements To Only Search Engine Visitors On WordPress
AdSense Advertisements For Search Engine Traffic
During the process of monetizing a WordPress blog or website many webmasters (owners, admins, whomever) take a tactical approach in order to leverage earnings by strategically placing Google AdSense advertisements which are only visible to organic search engine traffic (opposed to all visitors). Many bloggers and webmasters acknowledge that organic visitors from Google are more likely to click and respond to Google AdSense advertisements.
Besides displaying advertisements for only incoming search traffic, there are many valuable procedures which can be accompanied by displaying ads for search engine traffic in order to keep website readers and visitors satisfied. Keep in mind that sometimes too many advertisements can be a bad thing, in this case using our supplied snippet below can keep your direct and referred traffic happy whilst providing advertisements for visitors whom are statistically more likely to click the advertisements. The snippet can also be used to maintain the amounts of advertisements on your website, keeping ads organized, and only displaying AdSense when necessary.
There are many WordPress plugins and essentially different ways to display Google AdSense ads for search engine traffic only, but we find using a simple PHP function supplied by Scratch99 is better for performance, and advertisements can strategically be placed anywhere without the limitation some plugins possess.
How to display advertisements to only organic visitors
Copy and paste the snippet below into your functions.php file
[Normal_Box]
function scratch99_fromasearchengine(){ $ref = $_SERVER['HTTP_REFERER']; $SE = array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.'); foreach ($SE as $source) { if (strpos($ref,$source)!==false) return true; } return false; }
[/Normal_Box]
Copy and paste the snippet below wherever you wish to display your advertisements
Replace INSERT ADSENSE CODE HERE with an individual Google AdSense code
[Normal_Box]
if (function_exists('scratch99_fromasearchengine')) { |
if (scratch99_fromasearchengine()) { |
INSERT ADSENSE CODE HERE |
} |
} |