.

Tuesday, April 10, 2012

How to add Adsense code inside blogger post, below the Title


How do I add Adsense code inside blogger post, below the Title?

I have observed that a lot of bloggers ask this question in blog forums. Placing adsense code below post title is not at all difficult.
All you have to do is create an ad unit on Google Adsense website, get the code and add it to the a location in your blog template which I'm going to show you soon.

In blogger, by default, we can only display ads on top of our posts, under the posts and on the side bars. However, we often see some blogs with Adsense ads place inside the post body.

In the first place, why place an Ad below your post title?
Below the post title is the position with the highest CTR (click-through rate). In other words the ad placed there will have the highest number of clicks and hence earn the most money. That's most probably your reason for blogging. Enough of that. Let's get started.

Get the Ad code from your adsense account, preferable either a 300x250 Medium Rectangle or 336x250 Large Rectangle ad unit.
Parse the ad code in a parser to escape special characters in the code. The ad won’t appear if you use the original unescaped ad code.One of my favorite javascript/adsense parsers can be found at Blog crowds.
Copy the parsed code.
Now follow these steps:
  1. Login your Blogger Account
  2.  Click on Design  >> Edit HTML
  3. Check the  “Expand Widget Templates” box.
  4. (Important!)Download your full Template in case you screw up somewhere.
  5. Then find the following code(Ctrl+F)
   <data:post.body/>
     Paste your parsed adsense code on top of it.
     And you'll have:
    
      Your ad code
   <data:post.body/>

     That's it! It's that easy.

Oh no, one more thing, your ads will display below post titles on all pages(home page and individual post pages). If you wish for it to be applied just on post pages, add the following lines of code:

  <b:if cond='data:blog.pageType == &quot;item&quot;'>
   Place your ad code here
  </b:if>
  <data:post.body/>

It couldn't be easier than this. Good luck as your earnings rise.It works like charm.