Wednesday 24 February 2016

How to add Google Adsense Code inside Blogger Post

Posted by Anshul Katiyar
As we all know that Google Adsense is best advertisement network in world, this because Adsense revenue is much more as compare to other Adesense alternatives like infolinks or  bidvertise. I know that we all thinks Adsense is best, but some of you still have complain that nobody is hitting a single click on your Google Adsense ads, if you are one who is dealing with this type of situation then don't worry we have solution of this, actually this all happens because of wrong placement of Google Adsense ads.

Today I will tell you that how to increase Adsense revenue with the help of placing Adsense ads in middle of post.

How to Put Google Adsense Below Post Title in Blogger?

Note: Before moving forward, I will request you to take a backup of your blog.
  1. Fist you have to Go to Blogger > Click on Template of your blog > Now Take Backup of your Template.
  2. After that when you take backup then click on Edit Template
  3. Now press Ctrl+F > Then Type <data:post.body/> on search box.
  4. Note : It is possible that you find more than one <data:post.body/>, so find second one and then select that one.
  5. Next Step replace the selected <data:post.body/> with 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>
Once you done with copy-past of code, then simply replace <!-- Add here the code of your ad --> wtih you Adsense code.

0 comments:

Post a Comment

Powered by Blogger.