Featured
loading...

How to Add Adsense Ads In the Center or Anywhere inside Blogger Post

How to add google adsense ads in the middle or inside Blogger Post. I hope my post is helpful for you. Don't forgot to share this post.

Have you ever checked a way to monetize your blog with Google Adsense. Have you checked How to register and set up an account on Google Adsense . Now we will see about inserting Adsense ad code. In this tutorial you will check how to enter the code to display Adsense ads inside your posts on Blogger. Well, you know that Blogger itself offers an option to insert Adsense ad units through the gadget. If you click on the "generate revenue" will open a list with automatic settings options for displaying Adsense ads.
Anywhere inside Blogger Post
I particularly did not like this option because it does not give greater freedom of customization in the way that the ads will appear on the blog. Not to mention the fact that makes the blog somewhat "heavy" advertising.

I chose to insert the Adsense code directly in HTML template.
Today I will teach you how I did it, so you can also use the same method if you want.
As you have observed, I prefer to display ads within the post, and only on the individual page. This leaves my layout "cleaner" (at least I think so).

Well, the first step to be followed is: Generate the code.

First of all, it should be noted that so you can continue with this tutorial you must already have your Adsense account approved and have already chosen and configured the ads you want to display to your blog, and have copied the code provided by Adsense.

That done, now you must parse (convert) the code Adsense generated because if you enter the code without converting it, will error in HTML because Blogger does not accepts the language code directly in HTML template.

FIRST THING PARSE THE ADSENSE CODE:
Access this article Tool to Convert adsense code and paste the generated code into the box, and click " Convert ".

SECOND THING FIND THE TAG:Now using the Ctrl F, look for the tag <data: post.body />.

THIRD THING REPLACE THE TAG <data: post.body /> WITH THIS CODE:
<div expr:id='"adsmiddle1" + data:post.id'></div>
<b:if cond='data:blog.pageType == "item"'>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<div style="clear:both; margin:10px 0">
<!-- Add here the code of your ad -->
</div>
</b:if>
</b:if>
<div expr:id='"adsmiddle2" + data:post.id'>
<data:post.body/>
</div>
<script type="text/javascript">
var obj0=document.getElementById("adsmiddle1<data:post.id/>");
var obj1=document.getElementById("adsmiddle2<data:post.id/>");
var s=obj1.innerHTML;
var r=s.search(/\x3C!-- adsense --\x3E/igm);
if(r>0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+16);}
</script>  
  
FOUTH THING PUT YOUR PARSE CODE HERE  <!-- Add here the code of your ad -->
THEN SAVE YOUR TEMPLATE :

FOUTH THING: When you create a New Blogger Post, Don't forgot to add this tag on the, where you want to Google Adsense Ads appear:
<!-- adsense -->

I SHOW EXAMPLE TROUGH SCREENSHOT:
SCREENSHOT
ScreenShot
FINAL WORDS:
Following the above steps, you will easily place AdSense ads within your articles and probably earn more income. As warned before, it is necessary to conduct tests to assess what is the best position for your case.

Although I have talked all the time about AdSense blocks, the same procedure can be used to contracted fixed ads directly to you. Just perform steps 2 and 3 using the ad code you post fixed on his blog.

And you, use or have used ads within the text of your posts? What were the results? Share with others in a comment!
loading...
loading...
author

Author Name

Author Description!

Get Free Email Updates to your Inbox!

Post a Comment

www.CodeNirvana.in

new

Total Pageviews

Copyright © Tips, Tools, Tutorials and Inspiration - Genie Yard | Designed By Code Nirvana