Wednesday, March 10, 2010

In normal cases all blogger users can put the adsense block at the top of the post or at the bottom Only. But the problem here is that alot of bloggers don’t get high CTR ( clicks ) by this placement,so they should play with the ads placement,the best solution here is to put you google ads blocks in the middle of the post in your blogspot blog.

Blogger don’t offer this option by default settings, so you have to be tricky to do it,here is easy and fast way to do it.
Go to your blogger account, and navigate to Layout >> edit html, and check check Expand Widget Templates
Find the tag :

<data :post.body/>
And replace it with the following code.
<div expr:id='&quot;aim1&quot; + data:post.id'></div>
<div style=&quot;clear:both; margin:10px 0&quot;>
<!-- Your AdSense code here -->
</div>
<div expr:id='&quot;aim2&quot; + data:post.id'>
<data :post.body/>
</div>
<script type=&quot;text/javascript&quot;>
var obj0=document.getElementById(&quot;aim1<data :post.id/>&quot;);
var obj1=document.getElementById(&quot;aim2<data :post.id/>&quot;);
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>
Note that you must replace
<!-- Your AdSense code -->

with block code provided by Google.
Now you are done, just to put your google adsense block in the middle of the post, you have to put this code

in the exact place you want to put AdSense block.
and now you are done.

0 Comments:

Post a Comment