56 Responses to “Show Adsense To Search Visitors Only – On Blogger”
This page contains comments from the Show Adsense To Search Visitors Only – On Blogger article.
This page contains comments from the Show Adsense To Search Visitors Only – On Blogger article.

Stephen Cronin is Manager of Online Service Delivery at a Queensland Government department & has been a freelance WordPress developer/consultant since 2007
*Content on this site is my own and is not related to my employer
Hire me - I'm expensive, but I'm very good!
Want a Custom WordPress plugin? See my Services page.
Visit my home page at Userscripts.org.
Hi Stephen!
Thanks for the ping.
Interesting to see your experiments on this. I too discovered the problems of trying to inject code into Blogger /gadgets, and found the only viable solution to be the iFrame.
Adsense bases its response on the page which invokes it, I.E., the originating page and the ads it serves are relevant to that page. I have never seen irrelevant ads using this code.
My method uses a very simple and short code-set, and is good for un-geek types.
Regards – Rhys
Hi Rhys,
Thanks for stopping by and commenting.
I’d have to say your method is much simpler (especially for those un-geek types) and from looking at your site, the ads are relevant. So it seems to work.
It’s just I would have thought that the Adsense bot would wait until it’s called by a page (ie by the ad unit), then use the referrer information to crawl the page to see what it’s about. The referrer information would contain the URL for the IFrame, not the URL for the page that has the IFrame embedded. I guess the Adsense bot just crawls your site page by page rather than use the referrer.
Anyway, your method’s much simpler, so I’m happy to recommend it to people, as long as they keep an eye on the relevency (which they should be doing anyway).
Best of luck Rhys.
Hi Again Stephen!
I guess the iFrame is perceived by the Adsense server to be like a div or any other [ad] container and therefore would not be part of the actual referrer info utilized by Adsense when determining relevance.
As you pointed out, the real criteria are relevance and functionality!
Regards – Rhys
You are genius! I never though that Adsense ads on blogger platform also can be tweak.
This is the coolest thing i have ever seen in blogger.Thanks you .thanks a lot .I will give you a link if i blog about this .thanks.
Is that really working? I haven`t tried yet but are they truly workable? Still try to follow the instructions in future.
This is pretty smart. I only use AdSense on one site a CSE, which doesn’t do very well
so I guess I must be pretty low on the payout hierarchy. I’d also have your script so it shows the ads when there is no referrer myself, but you probably know more about these things.
That’s pretty nice Stephen, this looks pretty simple for rookies like me. I am not currently using adsense but will be soon. I will keep this in mind. Thanks again Stephen! I am turning into an expert just by following your blog!
A handy way of adding adesence to blogger will definately be using it . a brilliant tweak.
Hi Stephen,
That’s quite a cool mod you’ve discovered, I never knew you could have that control in blogger. Excellent!
Adsense become very complicated today. It’s not like before, now we face low bids and even low ctr cause users get used to text ads similar like they forgot to click on banners years ago.
I agree guys. Adsense is not as easy to make money with as it was in the past. Adding it to blogs is the only way now.
Hello All,
I’d like to share an experiment that I did with adsense. This involves “G” and it’s ability to control PR and the display of pages it indexes based on the users page quality.
The goal here was to determine how much value google gave my pages that contained my adsense ads based on webmaster tools stats and monitoring page stats with:
site:mydomain.com
and
site:mydomain.com/* <- Displays pages NOT sandboxed
Here is a short list of what I found:
-Use only ONE ad per page. (Once I added two or more ads, I noticed a decline in $ per click and an overall decrease in adsense income.)
-Ensure your content is unique content, and a minimum of 250 words that cover ONLY that subject matter that the page or post is about. I purposely created 3 different types to test this out, using the same subject on each page. Unique, scraped (with some revisions) and a poorly written page. Obviously, the unique page outperformed the others, but the real kicker was that the bad pages dropped from search results, and reappeared when I removed the ads!
-Blend (color) your ad into your page and bury them deep within the text. Again, my pages with this configuration stayed in search results.
The bottom line is, google seems to de-value a page that it feels unworthy of its ad, so be careful when laying out your page.
In my next post, I’ll explain the difference between:
site:mydomain.com
and
site:mydomain.com/*
I’ll explain why the results are so drastically different between the two, when you view your site using this syntax.
Anyone else have any “experiment” stories they would like to share? I’d love to hear them!
nice post, i wasn’t aware that this even existed. I’m fairly new and trying to learn all i can but i guess i have a long way to go, thanks for the tip.
The effect and explanation on my adsense sandboxed pages.
The site:mydomain.com verses the site:mydomain.com/* syntax.
If you recall a few years back “G” had a “tag” that they would
display when a site owner typed in the syntax: site:mydomain.com.
The word “supplemental” would appear on page listings
that “G” felt were not worthy of their main index library.
(Today we call that “sandboxed”)
Then suddenly, without notice they (G) dropped the tag.
At that point, Webmasters had no way of knowing what
were their “actual” indexed pages or sandboxed pages.
Then, in comes (hackers) a guy, to create a syntax to
release not only indexed pages, but supplemental as well.
Many variations were invented, but lasted only a few days
or weeks. As soon as one was created, they (G) blocked it.
site:mydomain.com/kfghyz*, site:mydomain.com/?&w#6* and many
other variations were created to display ONLY indexed
pages. Currently and as far as I know, the tag /* at the end
still works today.
Although these pages that display using the site:mydomain.com
syntax DOES show all indexed pages, the site:mydomain.com/* shows
the TRULY indexed pages that “G” feels worthy enough
to be, as I call it, the “1st tier”.
Unfortunately, even if these pages contain the ideal amount
of unique content, the “2nd tier” pages or sandbox/supplemental
pages exist, in IMHO, because:
1.they lack content that **changes***
2.these pages are not **deep linked** from a quality,
authoritative, relevant, decent PR site,
3.they lack **anchor/alt tags**, to include images as well
4.they are beat out by **similar content/niche** pages
from other sites that “G” feels are more worthy
that meet the criteria in items 1-3.
De-index and Sanboxed Pages-they are different.
De-indexed and sandboxed are two COMPLETELY different conditions.
De-indexed means that you (probably by a manual G review) are history,
toast, gone, kaput. If G de-indexes you, you will know!
No home page,no site pages, nothing, nada!
You also have to remember that you are in competition with other sites.
As their pages rise and fall in rank and quality, yours will also. In theory,
you doing just a bit of SEO with your site pages in one instance, could
cause you to rise to the top when others do absolutely nothing.
By virtue of your small effort and G sandboxing your competitors page,
you could jump to the top.
Sandboxed pages on the other hand, can be recovered, your still in good with G.
(Your pages just don’t have a seat on the 50 yard line of the internet game,
your somewhere up in the nosebleed section, but don’t sweat it)
As an example, here are big Gs results:
site:g**gle.com/* = Results 1 – 10 of about 19,000,000 from g**gle.com/*.
site:g**gle.com = Results 1 – 10 of about 37,900,000 from g**gle.com
They even sandbox their own pages!
Don’t just take my word for it, try testing your keywords with this
method with both /* and without.
I’m sure you’ll find your tier one pages ranking better than the tier two pages.
In any case, you can use this as a guide when implementing adsense ads
to watch the rise and fall of your pages in the hidden world of the the G**gle Sandbox.
I hope you find this useful!
Great man! I never though that Adsense ads on blogger platform also can be tweak.
Thank you, olivia
I thought i cannot do this in blogger since it free blog. this is great!
LINK REMOVED: because of failure to use KeywordLuv syntax (name@keywords)
Very useful post. smart pricing an adsense can be a serious problem…particulary if a lot of your traffic comes from social sources. Cheers for the info…may put this to use.
thank you for the information. I have been smart priced with websites already which heavily dropped my earnings. I often now just use 1 or 2 adsense blocks on a page by the way. I remarked that Adsense will then display higher paid ads.
Just a quick note….
I’d like to know if anyone has any other ad (adsense) placement tips they would like to share. My testing efforts were on a two month trial. Perhaps someone has some other experiences, under different circumstances.
Tony
nice tips, and thanks for all your information on this. this is definitely worth mentioning on my blogs. thanks again
LINK REMOVED: because of failure to use KeywordLuv syntax (name@keywords)
This is some complex stuff… at least I dont have to worry about it much now since I dont have very much traffic and adsense is useless.
I didnt know this was possible with adsense and blogger. Ill head over and check it out.
LINK REMOVED: because of failure to use KeywordLuv syntax (name@keywords)
Its nice to see people experimenting and sharing their results with rest of the people !
Good work bro !
Sure Steve, no problem.
This was just one example of what folks can do to optimize their ads, and more importantly, pages in the SERPS that contain adsense ads.
Stephen has some great stuff here about WP and enhancing your site. If it’s one thing that changes often, it’s surely wordpress!
Anything to get more out of adsense is worth it!
I have always wanted to maximize the earning potentials that the blogger platform offers, despite its limited features (as compared to wp). However, I can say that I learned so much from blogging because of blogger.com – I owe a lot to this free blogging platform. And so with your new adsense tips on how to prevent smart pricing, this will surely help more in increasing my adsense earnings from my blogger blogs.
I had no clue google adsense was that advanced, it really might be why I’m earning such a low CTR. I’m going to try what you said and see if it works. I really appreciate this post!
I’ve been doing this on WordPress, but once again wasn’t aware that it was possible to do it on Blogger. Thanks. Really useful.
Thats great. I never knew that we can show ads only to select people. It seems very intresting. Got to try it out
This is a great post.
In my experience, the visitors I get referred through Google Images do not click ads and really reduce my CTR. If I want to disable ads to those visitors, can I just delete images.google from the above code??
Hi Paul,
Sure, that should work in theory – but I haven’t tried it myself. You’ll have to test it.
Just to make sure, this code modification does not violate Adsense TOS? I thought we
can’t change the code at all.
Hi Paul,
Yes, you may want to be careful about this. I was under the same impression, but then I came across a post on parsing Adsense which indicated that Google does give permission:
This change is not the same as the one that Google gave permission for, but it fits into a similar category (or at least the spirit of it).
However, I have not checked with Google, nor do I take any responsibility for anyone using this technique. I actually don’t need to use it, as my Blogger blogs only get search engine traffic. I really only worked out how to do this as a challenge.
Great stuff , I absolutely hate trying to avoid smart pricing, this will be an absolutely awesome addition to my blog
Great thread! It’s only when people share their ideas that I learn more about tweaking my sites.
Can find this stuff anywhere else….thank you all for sharing!
That’s only smart by Google if you think about it. This great so anyone who try to cheat the system won’t get that much back. I’d rather get search results anyways rather than outer search engine traffic for my earnings with adsense.
Thank you Stephen, this worked perfectly on my site. I have a question that will probably help many others. I want to be able to display an image instead of the ads for non-search visitors. In my case, I have a skycraper banner and without the banner the site design is unbalanced. So it would be great to be able to show a design element in that space. It seems like this would be an easy process with the addition of some sort of ELSE command, but I can’t get it to work.
This is what I have. following this:
document.write(adsenseString);
}
I added:
ELSE {
var adsenseString = “\n”;
var adsenseString = “\n”;
adsenseString += “\n”;
}
but it doesn’t work. Any suggestions (yes I had the full image url)
Thank you so much. Nestor.
WOW! I never knew there was smart pricing google penalty. Yes it definitely makes sense for google to do that. So I guess that’s why content network is now delivering a quality traffic that converts, many times better than search network.
Thanks for the codes I can try it.
I didn’t though that Adsense ads on blogger platform can be tweaked. Thanks for the great idea.
I like installing the adsence code right into my templates, and forgetting about it. adsence is just a little pleasant surprise at the end of the month
Thanks for sharing your thoughts man, hope that works better then the plugin I’am using currently (makes trouble all the day). I will try to code it myself even if I’am unexperienced in Coding
.
I prefer Affiliate Ads then Adsense Ads. It’s about time Google look into making the ads look more like a normal link.
I am also not looking for anything that is a scam because that seems to be all that I can find online these times. Please let me know of some websites that any of you have tried and are known to easily work. Thanks in advance and your help would be greatly appreciated.
Thanks. This is nice post. I try it. It works if I search my blog using Internet Explorer. But, when I try with Mozila, the script does not work.
The same thing is also happen with this web. Try to search “scratch99.com” in google using IE, the adsense appear. But, try to search “scratch99.com” in google using Mozila, the adsense does not appear.
Anybody know why? Is that mean the script still in Beta?
I just detected the same thing Ryu is saying about ads not appearing in Firefox. Is there a fix for this?
oh…I never though that the google Adsense on blogger platform also can be tweak…great post..!!!
Adsense chagned very much. And money are mot the same too. I think the solution is to try something else. For example, try to find sponsors with banners at you site.
Will you show me how to prevent visitor from certain countries as well? The main reason i want to do this is to prevent click fraud from countries like indonesia, malaysia, etc
Hi Harry,
I’m sure there are ways to do this, but can’t tell you how and I don’t agree with it – I used to live in China and would occasionally come across people blocking everyone in China, which was very frustrating.
when i am trying to implement this, the ad disappears, but, when i am coming from the google search engine, the ad is not showing up to me. i tried this on blogspot.com free blog. is it not supposed to work there? if yes, what should i write in — “you must change “.scratch99.com” to your own domain” what should be my domain then? just blogspot.com or blogname.blogspot.com?
Hi Kaushik,
It would need to be blogname.blogspot.com. Does that help at all?
google_ad_slot = \” xxxxxxxxxx \ “, \ n”;
is my pub-xxxxxxxxxxxxxxxx
Please what does the line “expiry.setTime(expiry.getTime() + 3600000);” mean? How do I get the cookie to expire after 5 minutes on the site?
Thanks
One more thing please, where do I get the value for “google_ad_host = \”pub-xxxxxxxxxxxxxxxx\”? It doesn’t appear anywhere in the regular google adsense code.
The hack works on wordpress but not on blogger blogs and I wonder why. For it to work on wordpress, I had to remove the part about GOOGLE AD HOST.
Cheers