scattrbrain
Darshan Patil's personal blog
Google AdSense Section Targetting
After wading through the google documentation I finally found out why the adsense ads on my blog don’t match the content.
The relevant document
What it says is, you can tag your HTML content- to emphasize or
- to ignore regions.
Aha. So what that meant was my sidebar was screwing google’s keyword selector resulting in sub-optimal ads. Armed with that knowledge, I quickly hacked my typo install to have google ignore sidebar content.
The tags
To emphasize:
<!--google_ad_section_start--> <!--google_ad_section_end-->
To ignore:
<!-- google_ad_section_start(weight=ignore) --> <!-- google_ad_section_end -->
The change to typo:
cd typodir/themes/mytheme/layouts/Edit the default.rhtml file so that you put the ignore comments from above around the sidebar rendering. Your default.rhtml should look like
... <!-- google_ad_section_start(weight=ignore) --> <%= render_sidebars %> <!-- google_ad_section_end(weight=ignore) --> ...














