Wednesday, 14 November 2012

How to place adsense ad units inside a blogger post

In current blogging context most people are looking to make money by getting more hits on ads. So they think ad placement is the most important. Yes that is true. As I mentioned in my previous post, most of the hits are generated from the ads inside the posts, so most of the people are looking to insert their ads inside the post.

Now let’s get in to the topic proper,

1.      First you should go to your adsense account and grab the code for your adsense code


Sign in to adsense >> My ads >> New ad unit >> Change ad appearance>> Save and Get code


2.      Then you have to convert your code


Otherwise your ad will not be compatible with Blogger. But you don’t need to change it manually. Use the following link to change your ad for blogger. Paste your code inside the blank and click on “PARSE”


3.      Copy the converted code.

4.      Now go to your blog >> Dashboard >>Design >> Edit HTML. Then Put a tick on “Expand Widget Templates”

5.      Then press “Control + F” on your keyboard and search following code

<div class=’post-body’>


6.      Then paste following code below the above code

<b:ifcond=’data:blog.pageType == “item”‘>
YourAdsense code here
</b:if>


7.      Copy and paste your converted AdSense code as I shown above.

8.     Then save your template and view your blog andthen click on a post. You will see the Google ad unit appears above your post inside the post.

If you want to align the AdSense unit to left of the post, paste following code instead of above code


<b:if cond=’data:blog.pageType== “item”‘>

<div style=’float:left;’>

Your converted Adsense code here

</div>

       </b:if>

That’s it. If you want to align it to right change the red colour word in above code to “right”

If you are using magazine type template, find <div class=’post-header-line-1′/>and slowly scroll down the you will see following code,

<div class=’post-body’>

or
<div class=’post-body entry-content’>

Then paste your code below it. 

That’s all, now save the template and view the blog. This will improve the capacity of your blog in make money with Google adsense.

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.