7/27/2014

How To Put Adsense In The Middle Or Anywhere On Blogger


How To Put Adsense In The Middle Or Anywhere On Blogger

Adsense which is only the highest paying ads program for blogger and webmaster.  There are several policies of Adsense program that you cannot put more than 3 ad units on a particular page.
So, the placement is too necessary for high CPM and more clicks. But  there are a few bloggers who are not able to add Adsense ads code anywhere on the blogger due the lack of knowledge of coding.


How to /

1.  Log in to your blogger account

2.  Go to  Dashboard > Template > Edit Template.



3.  Now, find out    <data:post.body/>   Now Replace the above code with the below code,

<div expr:id='"adsmiddle1" + data:post.id'></div>
<b:if cond='data:blog.pageType == "item"'>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<div style="clear:both; margin:10px 0">

<!-- Add here the code of your ad -->

</div>
</b:if>
</b:if>
<div expr:id='"adsmiddle2" + data:post.id'>
<data:post.body/>
</div>
<script type="text/javascript">
var obj0=document.getElementById("adsmiddle1<data:post.id/>");
var obj1=document.getElementById("adsmiddle2<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>
          

Customization :- Replace the  your adsense code here with the ADSENSE CODE .

4. Now, Save  your template .


5.  Now, when you will make a blog post, then add the below code where you want in HTML  area of blog post  
      

<!-- adsense -->  

                                     
6. Now you have done. See below picture.
                          
How To Put Adsense In The Middle Or Anywhere On Blogger