How to Place Adsense Code Inside the Blog Post




One of the most effective way of generating clicks from your ad is to place it inside your blog post. This post will show how you can place your ads inside your blog post on a blogger template.

Go to your blogger template>Layout>Edit HTML. But before modifying the template, always download your original template as a back up.



On the template search for the following line of code:

<data:post.body/>

This code is the placeholder for your blog post.

You should place your code before the second <div> element so that your adsense code will appear just before the blog post entry and after the blog post title. Copy the code below:

<div id-"adsensecode">
<!--replaced this with your Adsense code-->
</div>
<data:post.body/>


After placing your code as indicated above, published your blog and see the result. The modification above will place the Google Adsense just above the post on all your blog entry. So if your default homepage displays about 7 blogs post as your Blogger template setting, You will be having a problem since you are only allowed 3 adsense unit per page as required on Google TOS. The solution for this is to display your ad conditionally , say it will only display the ad code when the post is viewed on its permalink. if you don't know how to do that , go here for instruction.

You can further modify the placement of the ads, say you want your text to wrap beside the ads. You can just add another div section and modify it with CSS as shown below.

<div id-"adsensecode" style="float:left;">
<!--replaced this with your adsense code-->
</div>
<data:post.body/>


After you published your blog, you will then see that the text will now wrap besides your google adsense, as shown on the picture below.



Well there you have it, you will now see your ads on your blog post , The only thing to do now is to observe if this kind of ad placement is effective.

Till next post. Ciao!


Comments

Analekto said…
Nice post, that was my first attempt ;) I have written a method to add two adsense units anywhere within the blog post body here is anyone is interested

Popular posts from this blog

How to Display Ads Conditionally on Blogger

The ImTOO iPod Computer Transfer

Choosing a Blu Ray Ripper