Social

Automatically add banner or adsense in blogger post

Today I am talking about adding adsense ads code manually to blogger the way you want. Let me clarify you that Adsense is an affiliate advertising network which pays in cost per click manner. Means you get to click on ads you get money instantly. Here we will cover topic to put ads manually and automatic.
So here are the main areas where you can add ads in your blogger site to get high CTR.

  1. Between your posts.
  2. Head and sidebars.
  3. Footers
Also, you should follow the google Adsense guidelines to put ads.
OK, lets see How to add ads codes. To place your ads in the sidebars. Its pretty simple, just goes to your blogger panel. Then go to the layout option on the left side. Now click on add gadgets select HTML from popup window paste your Adsense code and save it. You are done. It’s just simple and you can add your ads like this anywhere.

Now talking about the template your readers will read the content of your blog, not the sidebar not the headers so placing the ads in the post will help you make more money.

Add Adsense in blogger post 

You can automatically add ads or manually in all the post we will discuss both the aspect. Firstly for manually adding codes in the post just write your post. choose the place to add ads. Switch to HTML view of the post Now just paste the ads codes directly and publish. Ok. Now for automatic ads Here  are some simple steps to follow to make ads appear in the post.

Firstly decide where to put your ads inside the post. I mean Below the post title or In the middle somewhere or both Now see below steps & proceed placing ads.

Firstly remember to backup your template as we are going to add ads to the template. For this go to template and then to restore backup template.

adsense in blogger post
Add adsense code in the blogger

You can’t directly add ads to the template so you have to convert the code of yours to xml or you have to parse your code you can find many HTML to XML parser here. Just paste your code and convert it and copy the new parsed code and get it ready.

To auto add ads Below the post title

Go to edit template in your blogger dashboard click anywhere in the codes you see to get the cursor. Now press CTRL + F and search post-body entry-content copy it from here and paste it in the box and press enter.
You will find it more then one time. Just aim for the second one. you will find this code as 
<div class=’post-body entry-content’>
or
<div class=’post-body entry-content’ ………………>
So just after the >  symbol paste the below code

<b:if cond=’data:blog.pageType == &quot;item&quot;’>
<div align=”center“> Your encoded Ad code here</div>
</b:if>

Now change the encoded ad code with your code and center with the left or right of keep it center. You’re done.
NOTE: If you don’t find the code post-body entry-content try finding <data:post.body/> and replace it with the above code. And remember to replace the second occurrence only.

To auto ads in the middle of the post 


This one is pretty simple Just go to edit template and find <body> . Just below it paste the following code.

 <b:if cond=’data:blog.pageType == &quot;item&quot;’>
<div style=’display: none; float:center;’>
<div id=’MindX-Ads’>
<br/><center>
<script type=’text/javascript’>
google_ad_client = “pub-xxxxxxxxxxxxxxxx“;
google_ad_host = “pub-xxxxxxxxxxxxxxxx“;
google_ad_slot = “xxxxxxxxxx“;
google_ad_width = 336;
google_ad_height = 280;
</script>
<script src=’http://pagead2.googlesyndication.com/pagead/show_ads.js’ type=’text/javascript’/>
<br/></center>
</div>
</div>
<script>
$(document).ready(function(){
  jQuery(&#39;#MindX-Ads&#39;).appendTo(jQuery(&#39;a[name=&quot;more&quot;]&#39;));
    });
</script>
</b:if>

Now see your ads code and replace the XXXX details with your details. I mean in the first two replace the XXXX from your Adsense code. 
You will find ad client code starting with pub-3434343 your numbers. Put it in the first two i.e. client and host. And in your code, you will find ad slot number put it in the third one. Also, the size of your ad is given in your code put it in 4th and 5th in place of 336 and 280. You are done. 
Now where ever in your post you have to place ads just put Page Break and your ads will be displayed there. Page break is located in the compose toolbar and looks like below fig.

Page break
Thank you for reading this post. Ask your questions in the comment section.

Leave a Reply