Blogspot: How to add google adsense to your blogger website?

Here, I will be showing you how you can add google adsense to your blogger / blogspot website.

Note: I will be telling about adding adsense in sidebar and in each single post as well.

Adding adsense in sidebar

– Get adsense code from Google (http://adsense.google.com)
– Go to your Blogger Dashboard
– Go to Design -> Page Elements
– Click ‘Add a Gadget’
– Select ‘HTML/Javascript’ gadget
– Add title of your gadget
– Add your adsense code
– Click save and you are done

Adding adsense in single post

– Go to your Blogger Dashboard
– Go to Design -> Edit HTML
– Click ‘Expand Widget Templates’ checkbox
– In the Edit Template box, search for post.body
– You will find something like this:- <data:post.body/>
– Write your adsense code before <data:post.body/>, in the following format:-


<b:if cond='data:blog.pageType == "item"'> 
YOUR PARSED ADSENSE CODE
</b:if>

Important Note: You need to parse adsense code before you add it to blogger template.

To parse your adsense code,

– Go to this website: http://www.blogcrowds.com/resources/parse_html.php
– Write the adsense code in the box
– Click the ‘Parse’ button
– Copy the parsed adsense code and paste it in your blogger template as I have mentioned above.

The parsed adsense code looks like this:-


<script type="text/javascript"><!--
google_ad_client = "pub-8802303964745491";
google_ad_host = "pub-1556223355139109";
/* FA-250x250, created 11/7/10 */
google_ad_slot = "3607210164";
google_ad_width = 250;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Hope this helps. Thanks.