How To Add Adsense Ads Inside Every Posts Of Blogger



Adsense is the leader of PPC advertising and the only revenue source of some blogs . If you are using Blogger as your platform , then you may want to insert adsense ads inside your blog posts . So in order to do this , first you have to encode your adsense ad codes and then add them to your blog's html .

How To Encode Your Adsense Ad Code :- There are two ways to encode your adsense codes . You can encode them by using some free tools which can be founded on the net , just search for tools on google . And you can also do it by yourself but i advise you to use encoding tools . Anyway , if you want to do it by yourself then replace the following characters of your adsense code :-



Replace < by &lt;

Replace > by &gt;

And Replace " by &quot; 

After replacing all these characters , your adsense code is ready to be inserted inside posts .

How To Insert The Ads Inside All The Posts ( Only For Blogspot ) :- After you encode your codes , the next step is to place them in your blog's posts . First login to your blogger dashboard and go to the edit html tab under design tab [ Dashboard->Design->Edit Html ] . Then expand your template widgets , after that search for the code <data:post.body/> . And if you want your ads to be appeared below the post title then paste your encoded code before <data:post.body/> and if you want to place your adsense ads at the end of the post then paste your encoded adsense code after <data:post.body/> .

And if you want to your ads to be appered only on the post page and not on the homepage then if you have to modify some html . In order to do so just paste the following code before your encoded code :-


<div class='post-body entry-content'>

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

After that place your whole code after or before <data:post.body/> . And if you want to position them to float on left or right , then  paste the following code after b:if cond='data:blog.pageType == &quot;item&quot;'> :-

<div style='padding: 4px; float: left;'>

And at last paste the following codes after your encoded code :- 

</div>
</b:if>


If you want to place your ads on the right of the page then replace left by right in the above code . To position your ads from the sides , just modify the padding of the above code .

Afterall , your code will be look like this :-


 <div class='post-body entry-content'>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div style='padding: 4px; float: left;'>
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-0206894356319149&quot;;
google_ad_host = &quot;pub-1556223355139109&quot;;
/* Inside Post */
google_ad_slot = &quot;0131500273&quot;;
google_ad_width = 250;
google_ad_height = 250;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
</div>
</b:if>

Just paste these codes before or after <data:post.body/> so as to be appeared inside posts . 




Share your views...

0 Respones to "How To Add Adsense Ads Inside Every Posts Of Blogger"

Post a Comment

 

Copyright 2011 | TechGohain | Designed By TechGohain