Sunday, May 27, 2007

Adding AdSense Ads in your New Blogger blog post

Base on the 'heat map' in my previous post, I have added Google Ads into my first two blog post. I've added only one ad unit as I don't want my blog to appear too cluttered and untidy. Another advantage of adding Ads into individual blog post is that the Ads seems more relevant, thus increasing your chances of a CTR.

If you are worried about violating AdSense Terms Of Service (TOS). Stavanger from blogcrowd wrote to AdSense Help Center, and received some vague replies that seem to indicate that slight modification of the code for the New Blogger is OK. Here is the email he received:

"Hi,

You are permitted to make minor edits in Blogger Beta. However, please keep in mind that in general publishers are not allowed to alter the AdSense ad code for any reason. Once you've generated the ad code in your AdSense account pages, you may not alter any portion of the code or manually change the layout of the ads.

Thanks for your understanding.
Sincerely,

The Google AdSense Team"
Read more about it here.

This is how it is done. You generate the AdSense script from AdSense site, then replace HTML characters like < with &lt; etc.

Here are some tips for where in the XML Template you should paste the parsed HTML code. Blogcrowds used a barebone Minima template so it should be similar in all templates. Find the normal text and then add the bolded code are added by me:


1)Next To The Post


<div style="float:left;">

<!--parsed Adsense code-->

</div>


<div class='post-body'>

<p><data:post.body/></p>

<div style='clear: both;'/> <!-- clear for photos floats -->

</div>


2)After Post Before Credits


<div class='post-body'>

<p><data:post.body/></p>

<div style='clear: both;'/> <!-- clear for photos floats -->

</div>


<div><!--parsed Adsense code--></div>


<div class='post-footer'>

<p class='post-footer-line post-footer-line-1'>

<span class='post-author'>

<b:if cond='data:top.showAuthor'>

<data:top.authorLabel/> <data:post.author/>


3)After Credits


<p class='post-footer-line post-footer-line-3'/>


<div><!--parsed Adsense code--></div>

</div>

</div>

</b:includable>

</b:widget>

</b:section>



You can read more about it at Google AdSense In Blogger Beta XML Update.

You can actually parse the script in Notepad using Replace All or a HTML text editor like Dreamweaver. For those without any HTML editor, Stavanger has even made it convenient for you by giving a parser at Parse Google AdSense For XML Blogger.

2 Comments:

  1. Shaid said...
    Ahsan Ali Mumtaz said...
    ok but you dont reach the main point i think i have better idea to make money from adsense in only several days.visit the blog www.bigthinkerrobbers.blogspot.com

Post a Comment