Place AdSense Ads in the Middle of Blogger Posts

The revenue from Google Adsense truly depends on the number of clicks on the ad, while the number of clicks depends on the ad placement that we put on our blog. So, place the ad in a strategic location, where to attract the visitor attention and have more chance to visitors click the ad. Usually, the traditional ad placement like in sidebar, header, and footer doesn’t get more clicks than putting the ads in contents. In blogger post, we can put the ad below the title and the footer easily without any script, but in today’s post going to learn how to place AdSense ads in the middle of blogger posts or anywhere in the blog post. If you have a WordPress blog then you can do this job by optimized plugins and you know that blogger doesn’t support the plugins, but in this post, I want to share a script with you which will help you place Google Adsense ads in the middle of the blogger blog post.

 

Adsense ads Middle Blogger Posts

How to place Adsense ads in the middle or inside of blogger blog posts

  1. First of all, login into your Google Adsense and create an ad unit code that you want to add in the middle in your blogger post.
  2. The second step login into blogger account, then goes template >> edit HTML
  3. After the opening, all coding, click on the template editor and search for <data:post.body/> you will find more than one code, try the second one.
  4. Copy the below code and replace  <data:post.body/> with it.
<div expr:id='&quot;post1&quot; + data:post.id'/>
<div class='googlepublisherads' style='margin:20px 0'>
<center>
--place ad here--
</center>
</div>
<div expr:id='&quot;post2&quot; + data:post.id'><data:post.body/></div>
<script type='text/javascript'>
var obj0=document.getElementById(&quot;post1<data:post.id/>&quot;);
var obj1=document.getElementById(&quot;post2<data:post.id/>&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+4);}
</script>

5. Replace –place ad here– with the Google Adsense converted code and save the template.

Now view your blog any post, wow you have successfully added Google Adsense ad in the middle in the blogger post.
Note:

Your advertisement will appear after the first </br> in the blog post, so this is mandatory to have a </br> tag in the blog post. If your post doesn’t have any </br> in a post, then the ad will appear in below title by default. You can put any other PPC ads network such BuySellAds, bidvertiser, yahoo or custom banner instead the Google Adsense.

How to Modify the Position Adsense ad in blogger post?

As I mentioned that the ad will appear after the first </b> however if you want to change the position of ads you can modify thought blue marked number, following some modifications you can do.

  • To put the ads in the second </b> of blog posts, then replace the blue number 2 with 3.
  • To put the Adsense ads in a quarter of a post, please replace the 2 with 4

So, friends this a simple but very important trick which I shared with you. After putting the Adsense ad in the middle of posts, you will note the significant increase in your earnings in a few days. More importantly, you don’t need worry about the Google’s terms violation because you don’t change the ad code structure.

Check Also

lazy load image in blogger

How to Add Lazy Load Images in Blogger

Lazy load in images is a hack to defer the initialization of images in a …

2 comments

  1. Thanks for your tutorial, it’s very helpful. i have doubt about my blogger pots. Recently i have seen under my blog post a huge space, also if i put 1 ads under the post it will show 2 ads . What i do please help me.

  2. Thanks so much, the code work perfectly in my blog.
    I have been looking for this code for a long time now.
    Am so happy now.

Leave a Reply

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