Dynamic Adsense Placement - After First Paragraph of Post





Bloggers use different techniques of ads placement to get more clicks on their adsense ads and any other. Like, placement of ads inside blog post, bottom of the post, sidebar placement, header placement etc. But I think many may not have applied adsense placement under the first paragraph of the post. This technique is new and I hope this will definitely help to make more money from ads publishers like adsense, infolinks , chitika etc.

Create Infolinks Account and Earn Money

Here is straight process of placing adsense ads just after the first paragraph of a post. This is only applied in blogger blog. Indeed, this technique is for blogger but if you also want to place in other platform like wordpress and joomla. There you may find plugins or you have to put using some codes like below:

Adsense After First Paragraph

How to put ads just below the every blogger post?


Step 01: Login blogger dashboard>>template. And click on edit html . 
Step 02: Just search for <data:post.body/>. Use CTRL + F button to search.
Step 03: In default template of blogger, you can get multiple occurrence of above code, so you have to choose second one.
Step 04: Now replace that code by the below code
<div id='target'><data:post.body/></div>
Step 05: Then place the below code right after the above (step:4 div).
 <script type='text/javascript'>
function insertAfter(addition,target) {
var parent = target.parentNode;
if (parent.lastChild == target) {
parent.appendChild(addition);
} else {
parent.insertBefore(addition,target.nextSibling);
}
}
var adscont = document.getElementById(&quot;content&quot;);
var target = document.getElementById(&quot;target&quot;);
var linebreak = target.getElementsByTagName(&quot;br&quot;);
if (linebreak.length &gt; 0){
insertAfter(adscont,linebreak[0]);
}
</script>
Step 06:  Now you have to add this code just above the target div(step 04 div)
<b:if cond=’data:blog.pageType == &quot;item&quot;’>
<div id='content'>
Adsense code placing center
</div>
</b:if> 
Step 07: This time to put adsense code. So login to you adsense account and copy an adsense code. Then parse this code using adsense parserAfter that, replace Adsense code placing center by parse adsense code.

Step 08: Save the template.

That's all. If you got any errors on this widget, please comment below the comment box. I will get you on there. Thank you. Enjoy blogging. 

Share this

Related Posts

Previous
Next Post »