Dec 10, 2009

How to put Adsense Ads Inside Your Blog Posts

A lot of people think how to put the google ads in the content of their blogs, the placement of ads to attract the visitor when they read some articles that are posted. In this article, I will show some adsense trick on how to put your adsense ads inside your posted article.

Not only that but in any possible areas of your post these adsense ads can be place, it's either below the article's title, after the first paragraph, in the middle of the paragraph or in the bottom of your article. In short you can control it's position in different areas of your blog post.

There is a bit of extra effort of work in this tutorial but if you follow the process step by step you should have no problems with it and make sure to back up first your templates before you made any changes.

OK so let's start on how to do it. The steps are very simple a piece of javascript and a little div tags combination.

1. Go to your AdSense account and Choose what type of ad you want inside your blog posts. Then grab the code of the adsense ads you choose.

2. You need to parse the adsense code that you copy from your adsense account, to do that you need an adsense parser . Put your adsense code in the text box provided then hit the parser button to generate the parse adsense code.

I assume that you finished parsed your adsense code, now we're ready for the next step. We will add the adsense parsed code to your template.

3. Log-in to your blogger account, click Layout >> click Edit HTML >> check the Expand Widget Templates.

4. Find this piece of code in your template, for easy search just hit Ctrl+F on your keyboard if your using Firefox browser then paste this code <data:post.body/> then click next.

5. Once you've found it, just replace  <data:post.body/> with this one
<div expr:id='&quot;aim1&quot; +'/>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div style='clear:both; margin:10px 0'>
<!-- Put your Adsense code here -->

<div expr:id='&quot;aim2&quot; +'>

<script type='text/javascript'>
var obj0=document.getElementById(&quot;aim1<>&quot;);
var obj1=document.getElementById(&quot;aim2<>&quot;);
var s=obj1.innerHTML;
var!-- adsense --x3E/igm);
if(r&gt;0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+16);}
6. You must have to change color green line code (<!-- Put your Adsense code here -->) with your parsed adsense code. Or you can paste your parsed adsense code after it if you wish not to remove it, anyway it's just a comment the browser doesn't do anything about it.

7. Before you save your template be sure to click the Preview button for you to find out if there's any error with the code you made, and if there's no error appear then click the Save Templates button to save the changes.

8. Before you see the final result, you must put this code <!-- adsense --> in every blog post you made. Specially if you have any previous article posted in your blog edit it and put this <!-- adsense --> in any area of your article, this piece of code serves as the placement of your adsense ads.

And there it goes your finally done, clap your hands and congratulate yourself for a job well done!

As a proof of this tutorial you can go to the other articles published in this blog and there you can see the placement of my adsense ads.

If you like this article feel free to Subscribe to Mixmo Anime to receive regular anime updates and free anime downloads! Or subscribe by email and all this direct to your inbox.


Post a Comment