In this post I'll share you a brilliant trick to place the ads inside of your post automatically by using javascript. By placing your ads inside the blog post then hopefully the chance of ads is viewed is greater than any place of your site and will increase the chance it clicked.

Here I show you the google adsense heat map that explain the most strategic place to put your ads. Based on the heat map, this javascript will place your ads inside the primary content.. :D



I'm not the creator of this javascript, I just googled it and modify to make it works well. The prototype isn't look well so I edit the script and make it better :D
I'm sorry because I forgot the source since I found it long time ago.

I also add a random features to it, make the the script could change the ads position while inside the blog post. So, when page is reload, you'll notice the ads position is changed.

Well... here is the script I make it for blogger version. You can also adapt it to other platform since the algorithm is simple :D

How to install:
- open edit HTML in your blog, tick expand widget template.
- find data:post.body
- change data:post.body with the main script
<!-- script shared and modified by blog-tutorial-menarik.blogspot.com -->
<div expr:id='&quot;aim1&quot; + data:post.id'/>

<b:if cond='data:blog.pageType == &quot;item&quot;'>
//YOUR AD CODE
</b:if>
<div expr:id='&quot;aim2&quot; + data:post.id'>

<data:post.body/>

</div>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<script type='text/javascript'>
var a=Math.floor(Math.random()*3)+1;
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 t=s.substr(0,s.length/a);
var r=t.lastIndexOf(&quot;&lt;br&gt;&quot;);
if(r&gt;0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r);}
</script>
</b:if>
<!-- Please do not remove the copyright line -->
- Save template
Easy right?

Is this legal? I think it's legal because we don't modify the ad code at all. However, if you not sure, you can ask them :D
For the live demo you can see it at my other blog

Hopefully this trick is useful for you. If you developed a better version of this script, don't hesitate to share it here.
hi folks, visit my other tutorial blog at Kumpulan tutorial menarik
0 comments