Sunday, October 18, 2009

How to get Adsense ads more relevant to your site content

Adsense is a great tool to generate revenue on your pages, and very easy to use. A couple of click and editing into your site or blog (widget installation maybe), and you're good to go.

But you may have noticed that something the ads displayed on your site by Adsense, are not that relevant, it not totally out of it. The reason why this happens, is because, Adsense just like Google (the search engine side of the business ;) ) uses bots to crawl on your site and analyze its content. Up to here nothing that you wouldn't expect. The catch is, everything that is on your site may not always be relevant content, and those bots have no way to identify what is and what's not.

Naturally, the trick would be to be able to "guide" those bots in the right direction and clearly indicate the content they have to consider. This can be done with the help of two specific tags that you need to include into the code of your site. If you have a blog, that's around the body of your article, any part, box, div, etc.. that wraps what you want to be indexed. Those two tags are and .

The explanation that follow are a bit specific to blogger since that's what I'm using, but the general procedure is similar whatever the blog or site.

So in blogger you have to edit your template. If you don't know how to edit your template your can check this article. Now that you're editing your template you want to start searching the following:


And replace it with:

<!-- google_ad_section_start-->
<!-- google_ad_section_end --> 

Here you notice that we point for Adsense the content we want to be used for your ads. Now you want want to do the opposite instead, that is point to the sections you don't want to be considered. In order to do that you have to wrap the content to ignore the same way we wrapped the post's body above:

<!-- google_ad_section_start(weight=ignore)-->
Your content to ignore goes here
<!-- google_ad_section_end -->

And That's it. It is as simple as that. One important note is, the change in your ads won't be immediate, and it may take up to two weeks for the change to actually reflect in the content of your ads.

I hope this will be useful to you, don't hesitate to drop me a line if you that post helped you.