Add Adsense Ads in Middle of Your Blog Post


Best Movies Sites: TOP 10 MOVIE WEBSITES


Adsense Ads in Middle Blog Post
Many of the bloggers don't know where to place Adsense ads properly. This problem focuses especially new bloggers. Adding your Adsense ads in your middle of the blog post will help you to increase your earnings. Its a simple way to put Adsense ads in the middle of a Blogger blog post, only with JavaScript and a group of some DIVs. Follow the simple steps.



question mark icon png How to add Adsense ads in middle of your blog post
Before doing this You have to phrase the code. Just go to Adsense Code Converter Tool and phrase/convert your Adsense code. And Come back to blogger account and log in/sign in. Now follow the below ▼ steps carefully.

  • Go to Blogger Dashboard > Template
  • Backup your Template before making any changes to your blog
  • Click on Edit HTML
  • Tick Expand Widget Templates
  • Press Ctrl + F and search the code shown below ▼

<data:post.body/>

Now replace the above ▲ code with this below ▼ code (You will find <data:post.body/> twice in your template. you have to replace it with the second one).

<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>

Before saving your template you may read below things.

 Please note the following
You must replace <!-- Your Adsense code --> with your Converted/phrased Adsense code and save your template. Put this special code to your every post. <!-- adsense --> this is the place you want to add your Adsense code.

Google will automatically inject in your posts up to 3 AdSense blocks. So the first 3 posts (in a top-down order) in your home page or archive pages will have ads.