How to insert AdSense code in the Middle or Anywhere of Blogger posts

If you want to insert Adsense code in the middle of Blogger posts follow the steps below.
1.Generate Parsed code for your Adsense code because we cannot insert AdSense code directly in the XML.So parse it usingAdParser.
After parsing,your ad code Should look like this.

ads11-1
2.Log in to your dashboard–> layout- -> Edit HTML
3.Click on “Expand Widget Templates”
4.Scroll down to where you see this:

 

<data:post.body/>

5.Now replace above code with below code.

 

<div expr:id='”aim1″ + data:post.id’></div>
<div style=”clear:both; margin:10px 0″>
<!– Your AdSense code here –>
</div><div expr:id='”aim2″ + data:post.id’>
<data:post.body/>
</div><script type=”text/javascript”>
var obj0=document.getElementById(“aim1<data:post.id/>”);
var obj1=document.getElementById(“aim2<data:post.id/>”);
var s=obj1.innerHTML;
var r=s.search(/\x3C!– adsense –\x3E/igm);
if(r>0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+16);}
</script>

Note : You must you must replace  <!– Your AdSense code here –>  with Your Adsense Parsed code.

6.Now save your template.

7.In every blog post ,Put this special code :

 

<!– adsense –>

in the exact point you want to appear AdSense advertising.Now you are done.

Author: Rahil

Rahil is a part time blogger from Kerala, India. Apart from Blogging, His areas of Interest are Computers, Networking , WordPress , Playing And Watching Movies At BlogForInfo he Writes about Blogging, WordPress, Technology, Making Money online.

Leave a Reply

Your email address will not be published. Required fields are marked *