Sunday, April 15, 2012

Show Google AdSense Ads To Organic Or Search Engine Visitors In Blogger


Google Adsense has become a secure money earning source for webmasters. Still there prevail some problems with Adsense that is being banned from Adsense due to invalid clicks. We always share our professional website with our friends and well-wishers. This is big wrong. If one of them become your enemy they will definately access your website and make huge invalid clicks that results your Adsense being banned. I had loose one of my Adsense account with 180$. So always focus on getting readers from search engine especially from Google Search. Search engine visitors mean organic visitors. If inorganic clicks are getting higher than organic click then you might have been in the risk of being banned from Google Adsense with huge balance. So take care your money and it's your duty






You can hide your Adsense ads from readers who directly enter your site. I here shared a tricks how to Show Google AdSense Ads To Search Engine Visitors In Blogger



  • Go to Blogger Dashboard → Edit HTML → Tick on Expand Widget Templates


  • Now search the following code using F3


  • </head>

  • Now paste the following code just before or above it

    <script type=’text/javascript’>
    //<![CDATA[
    var ref = document.referrer;
    var se = new Array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.');
    var sevisitor = false;
    for (var i = 0; i <= se.length-1; i++) {
    if (ref.indexOf(se[i])!== -1) {
    var expiry = new Date ();
    expiry.setTime(expiry.getTime() + 3600000);
    document.cookie = "sevisitor=1; expires=" + expiry + "; path=/; domain=blogspot.com";
    sevisitor = true;
    }
    }
    //]]>
    </script>

    Change the domain if you are using paid domain in Blogspot


  • Now put the following codes where you want your ads to be displayed


  • var results = document.cookie.match ( ‘(^|;) ?sevisitor=([^;]*)(;|$)’ );
    if (sevisitor == true || results[2] == 1) {


    <script type=’text/javascript’>
    //<![CDATA[
    var results = document.cookie.match ( '(^|;) ?sevisitor=([^;]*)(;|$)’ );
    if (sevisitor == true || results[2] == 1) {
    var adsenseString = "<div style="float: left;">n";
    adsenseString += "<script type="text/javascript"><!–n";
    adsenseString += "google_ad_client = "pub-xxxxxxxxxxxxxxx";n";
    adsenseString += "google_ad_host = "pub-xxxxxxxxxxxxxxxx";n";
    adsenseString += "google_ad_slot = "xxxxxxxx";n";
    adsenseString += "google_ad_width = 336;n";
    adsenseString += "google_ad_height = 280;n";
    adsenseString += "//–>n";
    adsenseString += "</script>n";
    adsenseString += "<script type="text/javascript"n";
    adsenseString += "src="http://pagead2.googlesyndication.com/pagead/show_ads.js">n";
    adsenseString += "</script>n";
    adsenseString += "</div>n";
    document.write(adsenseString);
    }
    //]]>
    </script>

    Note: You will have to replace the xxxx’s with the appropriate numbers from your Adsense code and you will have to change the height and width of ads

    That is all works. Please comment here if any problem. If you liked this article you are welcomed to share

    0 comments:

    Click Here To add Comment