How to add AdSense ads in the middle of Blogger Blog post automatically

Posted on
In WordPress platform we often see advertisement can be display in different places. Generally it can be done by the help of Plugins. And Plugins helps to circulate the ad place and display in different place. This is one of the most effective way to increase Ads revenue. And this strategy works best to increase ad revenue.

In Blogger platform hasn’t any opportunity to use plugins mobilize ad placement trick. But we can use JavaScript to display ads at the middle of the Blog post that can increase our ad revenue. Most of the returning Blog readers become ad blind, because they know where ads has placed in your site and they avoid that place. But by using this widget you can display ads in the middle of the Blog posts and readers will click on ads naturally.Even now you can display any widget in the middle of Blog Post. This widget has several features, those are as follows:
  • Display ads at the middle of the Blog Post.
  • You don’t have to manually put code.
  • This will automatically search the place to display ads.
  • You can display multiple ad units.
  • Any widget like related post widget can be display at the middle of the Blog posts.
  • You can easily  remove the widget.
Sounds great! I hope you are pretty excited to integrate this widget in your Blogger site. So let’s proceed to the tutorial. Please take a backup of your Blogger template before proceed. After that go through the below steps-by-steps walk through.
Step #1: Log in to your Blogger Account and go to Dashboard
Step #2: From vertical options click on Template ->Edit HTML->
Step #3: Instantly locate <data:post.body/>  by Pressing  Ctrl+F (Windows) orCMD+F (Mac)
You will find this code  <data:post.body/>  3/4 times, Please go for second one.

Step #4: Once you find it then replace <data:post.body/> code by below script.

1:  <div expr:id='&quot;adbox&quot;+'/>  
2:  <div style='clear:both;text-align:center;margin:15px 0 15px 0'>  
3:  <!-- Place Your Ad Code here -->  
4:  </div>  
5:  <div expr:id='&quot;adsbox&quot;+'><p><data:post.body/></p></div>  
6:  <script type='text/javascript'>  
7:  var obj0=document.getElementById(&quot;adbox<>&quot;);var obj1=document.getElementById(&quot;adsbox<>&quot;);var s=obj1.innerHTML;var t=s.substr(0,s.length/2);var r=t.lastIndexOf(&quot;&lt;br&gt;&quot;);if(r&gt;0){obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+16);}  
8:  </script>  
Step #5: Please replace line with your affiliate ads, AdSense or widget code. And click“Save template” from the HTML editor.

Note that for placing AdSense ads you must parse the script first. Simple use are Parser to use AdSense code in the widget.

You can check your Blog post now and see ads has started display in the middle of the Blog Post automatically.

A Simple Solution

If your Blog already have many posts then you may see some problem. Some broken script will appear at the bottom of the ad banner. To fix this issue simply make a gap between ad banner and texts in Blog post editor. After that see the preview, if you see broken script is not appearing then simply publish or Update the post.

Leave a Reply

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