1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Customising Advert Visibility based on Referrer

Discussion in 'White Hat SEO' started by rendesr, Mar 5, 2012.

  1. rendesr

    rendesr Junior Member

    Joined:
    Jan 15, 2012
    Messages:
    122
    Likes Received:
    95
    Gentlemen,

    I would like to get your opinion on something I have been thinking about recently.

    With the change in the quality guidelines on Google, asking that adverts be kept below the fold, and that the ratio of content to adverts remains well balanced, I believe Google is definitely interested in keeping content rich, ?proper? sites higher in the search results than the MFA style sites, with thin, or somewhat lacking content. It seems clear to me that there is potential to help ones site(s) in the SERPS by adding or removing adverts based on who is actually looking at your site.

    It would be interesting to see if an ?advert free? site were to rank better than its ad-laden brother in the SERPS.

    I?ve thought that there are two fairly simple ways to achieve this; indeed the CTR theme that I am using can systematically disable adverts for visitors from a certain referrer.

    Remove adverts for Search Engine Spiders
    - Automatically disable adverts for all visits with a Spider user agent string.

    Display adverts for Search Engine Traffic
    - Automatically enable adverts for visitors who find your site via a search engine.
    - All other visitors (assuming it?s a micro niche site, there won?t realistically be a huge amount of return visits) get an advert free site.

    Has anyone actively tested something like this, or does visitor profiling in this way raise a conflict with AdSense?s terms and conditions?
     
  2. rendesr

    rendesr Junior Member

    Joined:
    Jan 15, 2012
    Messages:
    122
    Likes Received:
    95
    To add some more detail to this, if anyone is thinking of testing...

    Here is the code that will enable/disable the adverts on the CTR theme, depending on whether or not a visitor has come from a search engine. Its an easy one liner to implement this functionality, so will be a good one to play around with!

    Search Engine Visitors will GET adverts
    All other traffic will NOT GET adverts (i.e. spiders)

    Change the file wp-content/themes/ctr-theme/ctr/ctr-setup.php

    from:
    Code:
    if(is_array($ctr_custom) && array_key_exists('ctr_disable_ads', $ctr_custom)) $disable_ads = true;
    
    if(!$disable_ads) session_start();
    
    to:
    Code:
    if(is_array($ctr_custom) && array_key_exists('ctr_disable_ads', $ctr_custom)) $disable_ads = true;
    
    (preg_match('/^http:\/\/(\w+\.)?(google|bing|yahoo|aol|ask)\./',$_SERVER['HTTP_REFERER']) == 1) ? $disable_ads = false : $disable_ads = true;
    
    if(!$disable_ads) session_start();