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’>
    var ref = document.referrer;
    var se = new Array('/search?', '', '', 'search.', '', '', '/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=/;";
    sevisitor = true;

    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’>
    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="">n";
    adsenseString += "</script>n";
    adsenseString += "</div>n";

    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


    Click Here To add Comment