How to Insert Inarticle Ads in Blogger Post

How to Insert Inarticle Ads in Blogger Post

We can Simply Implement Inarticle Adsense Ad code to show ads in every Post.

Google introduced new type of Native Ads, these are in-feeds ads and In-Article Ads.

How we can implement In-Article Ads in Blogger.

Google Introduced new kind of Native ads for its publishers to increase revenue and a good user experience. Native kind of ads helps you to increase your revenue by 60%. Read this complete article this will help you a lot. To Implement Inarticle ads in blogger you have to make some changes in your blogger template.

Step by Step guide.


    <b:if cond='data:blog.pageType == "item"'>
<div id='techaak-target'>
 <data:post.body/>
</div>
<div id='techaak-content'>
<div style='margin:15px 0;text-align:center;clear:both;'>
      <!--Place Your Prased Adsense Adcode here-->
</div>
 </div>
<div id='techaak-target'>
 <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("techaak-content");
var target = document.getElementById("techaak-target");
var linebreak = target.getElementsByTagName("br");
if (linebreak.length > 0){
insertAfter(adscont,linebreak[2]);
}
</script>

</div>
</b:if>
        <b:if cond='data:blog.pageType == "static_page"'><data:post.body/></b:if>
        
  • Copy Above Code and Paste in Notepad or any text editor application.
  • Open Your Adsense Account
  • Generate Inarticle Ads or any ads(Text and Image)
  • Now Prase Ad code —Click here to Prase Your code
  • Replace line <!–Place Your Prased Adsense Adcode here–> with your Prased adsense Code.
  • Now Open blogger.com and select “Theme”
  • Take a backup of your theme
  • Now click on “Edit HTML”
  • Now you’ll see XML of your blog.
  • And Now search <data:post.body/>
  • Replace <data:post.body/> with above code(created in Notepad) .

Note: There may be 2 or 3 or more result for <data:post.body/>, you’ve to make hit and trial method by checking all <data:post.body/>. In most of the templates, it works on 3rd result of <data:post.body/>.

Changes to made are: Paste your InArticle Ad code in place of “**YOUR PRASED AD CODES**“, your ad code will appear after 2nd Paragraph. You can add any kind of ads in place of InArticle Advt.

For Multiple ads in a Post

And If you want to place more than one Adsense Ads in your blogger post, Replace code given below instead of previous code.

<b:if cond='data:blog.pageType == "item"'>
<div id='techaak-target'>
 <data:post.body/>
</div>
<div id='techaak-content1'>
<div style='margin:15px 0;text-align:center;clear:both;'>
      <!--Place Your 1st Prased Adsense Adcode here-->
</div>  
 </div>
 <div id='techaak-content2'>
<div style='margin:15px 0;text-align:center;clear:both;'>
      <!--Place Your 2nd Prased Adsense Adcode here-->
</div>  
 </div>
<div id='techaak-target'>
 <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("techaak-content1");
var target = document.getElementById("techaak-target");
var linebreak = target.getElementsByTagName("br");
if (linebreak.length > 0){
insertAfter(adscont,linebreak[2]);
}
</script>
     <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("techaak-content2");
var target = document.getElementById("techaak-target");
var linebreak = target.getElementsByTagName("p");
if (linebreak.length > 0){
insertAfter(adscont,linebreak[2]);
}
</script>

</div>
</b:if>
<b:if cond='data:blog.pageType == "static_page"'><data:post.body/></b:if>
        

Copy above code and Paste your Parsed ad code. Click here to Prase Your code.


6 COMMENTS

  1. Hello Dealsyou, you can create

    below

    and copy paste new script below last script, and make this changes in new script line = var adscont = document.getElementById(“techaak-content2”);
    in place of techaak-content2, place techaak-content3
  2. Hello Dealsyou, you can create <div id="techaak-content3"> below
    <div id="techaak-content2">
    and copy paste new script below last script, and make this changes in new script line = var adscont = document.getElementById("techaak-content2");
    in place of techaak-content2, place techaak-content3

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.