Wednesday, April 10, 2013

Widgets

0

How to put Adsense in Middle or anywhere on Blogger post

  • Wednesday, April 10, 2013
  • Unknown
  • Adsense is the real way of money for bloggers as they have good content with good traffic but it should be place at right place to earn high CPC like middle of the post or at the bottom of the post or elsewhere.To put adsense code in middle of the post you need insert it each time you post.Here is a simple script to post it automatically at the middle of the post.
    Adsense in Middle or anywhere on Blogger post

    Put Adsense in Middle or Anywhere in Blogger Post 

    • First get the ad code
    • Then parse those code through Adsense code parser.
    • Then log in to blogger.
    • Edit template then expand widget template.
    • Then now search for the below code.
    <data:post.body/>

    If there are more then one occurrance then replace the last one with the below code.

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


    • Replace the with above parsed adcode.
    • Then now save the template.

    Adding Adsense adcode middle or anywhere in blogger post

    Then now add the below code in any post where you want that ad block to be appear in the blog post at any place of the blog post.

    <!-- adsense -->

    • Then save the post.
    Recommendation:
    We recommend not to post more then one of this method as it will conflict as same adcode exist more than once in same page.

    0 Responses to “ How to put Adsense in Middle or anywhere on Blogger post ”


    *Important - If you want to be informed of any replies to your comment, check the "Subscribe By Email" before submitting. Please Do Not Spam

    Post a Comment