[ How To ] Insert Adsense Ads Inside Post In Blogger Blogs Automatically - Techs And Geeks | Tech Hacks | Tech News


templatesyard"/>

[ How To ] Insert Adsense Ads Inside Post In Blogger Blogs Automatically

Share This
how-to-show-ad-inside-blog-post

Today we are going to learn How To Automatically Insert Adsense Ads Inside Post In Blogger Blogs. Adsense is the most popular and trusted way to earn money through blogging. You can put ads almost anywhere in your blog but the most profitable area is the post, because that is the area where most of your readers and visitors are interested in. virtually half of one mile of the search, referral, social and direct traffic comes there. 

Also Read: Nokia 6 2018 Vs Nokia 6 Review

So placing an ad inside post will probably generate more income than any other place. But unfortunately you can't place ads inside post, blogger doesn't have this feature in the settings, so we came up with a tweak which will allow you to put your desired ad code or adsense code below 1st., 2nd and later paragraphs. without wasting any time lets start the tutorial.

Automatically Insert Adsense Ads Inside Post In Blogger Blogs

This is and advance method and requires some coding knowledge, You have to be familiar the working process of blogger's HTML editor to follow this method. if you follow this method you can add css to your blog very easily.

Before Editing we recommend you to make a backup of your template, so that anything goes wrong you still have your blog design safe.

The First thing you need to do is to login into your Blogger account and go to > Templates > Edit HTML and search for the ending <data:post.body/>.

Note: you may find it several times, but we need to stop at the second one. Or, if you can't see any changes, test the third one.

After you get the code just replace it with below code.


<b:if cond='data:blog.pageType == &quot;item&quot;'>

<div id='adsense-content' style="display:block;text-align: center">ADSENSE CODE HERE</div></b:if>

<div id='adsense-target'><data:post.body/></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;adsense-content&quot;);

var target = document.getElementById(&quot;adsense-target&quot;);

var linebreak = target.getElementsByTagName(&quot;br&quot;);

if (linebreak.length &gt; 0){

insertAfter(adscont,linebreak[0]);

}

</script>



To Change:

ADSENSE CODE HERE Replace this text with your adsense code, but before replacing you have to convert the code with special tool, convert your adsense code by Using this tool- Adsense Ads Converter.

Also Read: 15 Best Hacking Movies List That You Should Watch Right Now

adscont,linebreak[0] To insert the ad after the second paragraph, change "0" from the line in red with "2". Now save your template by clicking the Save button. 

Conclusion: Congrats !! You have made it. Now you Know How to Automatically Insert Adsense Ads Inside Post In Blogger Blogs. Visit your blog and check the awesome customization live in action, hope you liked this tutorial, if you enjoyed then please share it with your friends,


If You Have Any Doubts Kindly Ask Us On Comments Section...


No comments:

Post a Comment

Post Bottom Ad