How to Put Adsense Ads Middle of the Every Pages and Posts

March 12, 2014
It is too important to optimize your adsense ads in your site.  In the earlier post, we found how to put adsense ads just below the post title. Now we are going to learn how to put adsense ads in the middle part of the post and any place within the post. Often adsense user think if the ads are displayed in the just below the post title, it is the best position. Moreover that there is also a place which is equally as better as below the post title. This is the middle position of the posts.

If you want to display your ads just middle of the post, this technique can increase your earning.

Let see how we can add ads middle of the post page.


Suggestion:-We always recommend to back up your template before changing any elements of your templates.

1. In the beginning, login into your adsense account.
2. Then go to my ads>>new ad or you can take the existing one which is suitable for your page.
3. Copy the code and parse it using online HTML parsing tool. Click here to Parse.
4. After parsing, copy the parsed code and paste it to the notepad.

Now Login into your blogger dashboard.
Click on template>>edit html.
Then find this code <data:post.body/>.
There you can see more than one times this code but you should stop at second one.
And Replace the <data:post.body/> by the following codes.

<div expr:id='"adsmid1" + data:post.id'></div><div style="clear:both; margin:15px 0"><!—Adsense ads here--></div><div expr:id='"adsmid2" + data:post.id'><data:post.body/></div><script type="text/javascript">var obj0=document.getElementById("adsmid1<data:post.id/>");var obj1=document.getElementById("adsmid2<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>

Now put the adsense parsed code where you see <!—Adsense ads here-->.
Click on save template.
At last when you create a new post , you have to the following tag into the HTML file where you want to show  your ads <!-- adsense here -->.

Such as: <div>content content  content  content content  content  content content  content  content content  content  content content  content  content content  content  content content  content  content content  content  </div> <!-- adsense here --><div>content content  content  content content  content  content content  content  </div>.

Congratulation you did it. This techniques is preferred by google’s terms and services.

Previous
Next Post »