Tuesday, September 11, 2007

How to add google adsense in post body

This widget/code is for blogger/blogspot users, who want to add a 200x 200 google adsense unit in their post, either on left side or right side.

After login, go to dashboard, then go to layout, then go to edit html, then click on expand widget template, then within html code search for

Blog guideAfter this code add

Blog traffic
After this code , please paste google adsense code given below, or your generated google adsense code with the options suggested. The code needs to be parsed i.e. check image which follows code.You can parse your code here http://www.blogcrowds.com/resources/parse_html.php


<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxx";
google_ad_width = 200;
google_ad_height = 200;
google_ad_format = "200x200_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "6699CC";
google_color_bg = "000055";
google_color_link = "FFFFFF";
google_color_text = "AECCEB";
google_color_url = "AECCEB";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


Check this image for parsed code as it can not be typed here.


Blog traffic
Instructions:


1. pub-xxxxxxxxxxx is google publisher code, which you need replace with your publisher code i.e. replace xxxxxxxxxx with your google publisher code.

2. The line 'float:left' is for placing ad on left hand side of post, if you make it right, ad will appear on right side of post. Right side is recommended.

3. Parse code as shown in image, it is necessary. Click on image to enlarge

4. After adding parsed code you need to add div code as shown in picture.

5. Please save your original template before making any changes.

9 comments:

Living in Exile said...

Great tutorial, easy to read. Thanks :)

Kaki Joran said...

hi,
when I click the image it shows an error page..

cheers,
Kaki Joran
http://www.kakijoran.com

umesh said...

Thanks kaki joran.
It was wrong hyperlink.
I have corrected it.
thanks

Mr. Tapori said...

Some how I am not getting the 200X200 ads, I am getting big ass ads don't know why!

umesh said...

Mr.Tapori,
Pls generate your google adsense code
after login to your adsense account and select 200x200 ad unit their , in the generated code ,you will find 200x200 word.Then parse the code.
Then insert it between two div codes.If anything is missing it will give unpredicted results.

Amazon Quick Cash said...

Wow, another VERY helpful post. I am loving your blog more and more. I can't think of another word other than helpful. Thanks again. I have been wondering how to do this. Now, I know.

RGuruWrites said...

Hi I got the ads but it comes with evey post and aince one 3 banners are allowed in a page, the rest are showing as bad request. Pl check http://photos-india.blogspot.com/ and help me as to get rid of that. I appreciate this a great deal. Thanks.

Channi said...

nice tutorial! very good...

http://friedfly.blogspot.com

Analekto said...

Nice tutorial.
Should anyone be interested, I have documented a method to add two adsense units anywhere in the new blogger post body. You can read it here.