Wednesday, April 10, 2013
0
Wednesday, April 10, 2013
Unknown
How to put Adsense in Middle or anywhere on Blogger post
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.
If there are more then one occurrance then replace the last one with the below code.
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.
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.
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.
Related Articles :
Do you like this article? Spread the words!
If you enjoyed this post, please consider leaving a comment or subscribing to the E-mail feed to have future articles delivered to your feed reader.
Subscribe to:
Post Comments
(
Atom
)
0 Responses to “ How to put Adsense in Middle or anywhere on Blogger post ”
Post a Comment