Monday, May 12, 2008

How to place adsense code on every post

adsense on postKnowing where to place the adsense ads is the best way on improving your adsense performance. Choosing the best placement for your AdSense ads will attract more attention; attention leads to clicks; and clicks bring you AdSense revenue. In this guide I will share to you the way on how you can integrate your adsense code on every post of your blog.

There are two ways on how you can place adsense ads on every blogger post. First is using the Blogger feature, second is placing the adsense code on the body of your template which is more complicated but this guide will make it easier for you.


Using the Blogger feature

1. Go to Page Elements then click Layout
2. Click "Edit" on your widget "Blog Post" located at the lower right corner of your widget.

3. Put a check on "Show Ads Between Posts" and select the ad format and color that best suit your blog.


Placing the adsense code on the body of your template

1. First you have to change your adsense code. I know this sounds misleading but you are not gonna alter your adsense code and this is not against Adsense Rules so you have nothing to worry about you will just convert some of the characters to character entities.

you have to parse the AdSense code so that it can be included into your Blog template.


Your adsense code should look like this:

2. Go to Layout then Edit HTML
3. Put a check on Expand Widget Template
4. Search for these lines

< class='post-body'>
<p><data:post.body/></p>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>

5. Replace the line "Your AdSense Code Here" with your Adsense Code. Your adsense code will appear after your post title and before your posts

< style='float:left;'>
Your AdSense Code Here
</div>

Here is code if you want to align the AdSense ad to your text, you can specify a margin or padding around the entire AdSense code.

<div style='float:left; margin:5px 10px 15px 20px'>
Your AdSense Code Here
</div>

The first number 5px is for the top margin, 10px is for the right margin, 15px for the bottom margin, and 20px for the left margin. you can change these values to whatever value that suits your blogger template.

1 comments:

essay for me said...

Thank you for it ! really interesting! It have been always interesting to read shuch news.