For Blogger users :- How to show adsense only to organic visitors

You probably have heard this trick/plugin for wordpress or you probably have used it before. Today I am sharing a very useful trick for blogger users. As you know that Organic Traffic(Visitors come by searching in search engine) boost adsense income, but till yet we had this option( to show adsense only to organic visitors) in wordpress only.

But now blogger users can do this too, Yeah, blogger users too have chances to increase their revenue coming from adsense. Only Two steps to do this, I will explain it one-by-one.

Step 1:- Add some javascript code in your template

You have to insert the below code in your blogger template. First open your blogger account, Go to Design > Edit Html > Check the box(Expand Widget Templates). First download your existing template as if something goes wrong. Now Press Ctrl + F( for searching) and type </head> and hit enter. Just above the </head>, paste the following code :-

Also Read :- Template Designer -New Feature In Blogger.Com

<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;

See the Screenshot:-

Where to put javascript

Change the Red color text with your domain name And Click on save Template.

Step 2:- Optimize your Adsense Code

So now, you have to make some changes in adsense code.

<script type=’text/javascript’>
var results = document.cookie.match ( ‘(^|;) ?sevisitor=([^;]*)(;|$)’ );
if (sevisitor == true || results[2] == 1) {
var adsenseString = “<div style=\”float: center;\”>\n”;
adsenseString += “<script type=\”text/javascript\”><!–\n”;
adsenseString += “google_ad_client = \”pub-XXXXXXXXXXXXXXXX\”;\n”;
adsenseString += “google_ad_host = \”pub-XXXXXXXXXXXXXXXX\”;\n”;
adsenseString += “google_ad_host_channel = \”XXXXXXXXXXXXXX\”;\n”;
adsenseString += “google_ad_slot = \”XXXXXXXXXX\”;\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”;

Copy the above code and change Red crosses according to your adsense code. To do it easily, first copy the above code in notepad and also copy your orginal adsnense code in the same notepad to make the changes.And also don’t forget to change your ad_width and ad_height.

Also Read :- Insert An Emoticon/Image In The Title Of The Post

After your code is ready, Paste the whole code in place of your adsense code(Original one) in your template. And, Now …… What?…… Just press Save Template ๐Ÿ™‚

As I am using blogger, this works for me. Here is the screenshot of both(Direct visit and searching from google).

Comparison b/w when direct visit and when Organic Visit

Try this!!!! If you have any query please feel free to ask !!!!
Work for you?

Also Read :- Hover Effect In The Header

Related Posts:

3 Comments Post a Comment
  1. hello says:

    what is the use of doing in this way?
    actually adsense ads can be shown to anyone, na
    then y only for organic visitors?
    anyone kind to answer me, plz mail

    • avitricks says:

      because there is less chance that regular reader will click on your ads…
      so to improve the CTR we can do this….I have also noticed that those who come from google and click ads… we get paid more…
      You can try it ๐Ÿ™‚

  2. hello says:

    thanq for info

Leave a Comment

Stay Connected

This service is free. Get up-to-date information directly to your email. Your email address is safe with us.

social RSS Feed Twitter Facebook Google


Avi Singh, the editor-in-chief of Avitricks Group, persuing B.Tech in Information Technology from India. He has been on Internet for many years now....