3/09/2007

How to place adsense ads in blog posts

I has been trying since the morning on finding out how to place a adsense ad in the blog posts as I did in my posts [E.g Firefox shortcuts ] .In all searches I found the various tricks for editing the blog template to have a adsense ad on the top of each page instead of displaying the ads only in permalink pages and not on the home page.Im sharing the code which I found on the net and which I thought might be useful to you also.
STEPS

* Login to blogger and go to your template
* Find the tag <$BlogItemBody$> in your blogger template
* Now copy the whole code from the text area below and replace <$BlogItemBody$> with the code
* Inside the code find <--- your adsense code here ---> and replace it with your adsense code
* After that save the template changes and you will be able to see the adsense link in your permalink pages


<p>
<ItemPage>
<div id="adsensical<$BlogItemNumber$>start"></div>


<div style="margin:5px 0 -5px 10px">
<!--PLACE YOUR AD CODE
HERE-->

</div>

<div
id="adsensical<$BlogItemNumber$>end">
</ItemPage>
<div
id="adsensical<$BlogItemNumber$>body"><$BlogItemBody$></div>

<ItemPage>
</div>

<script language="JavaScript">

//Adsense tricks
//By
Fivepoint someone http://fivepointsome1.blogspot.com
//Subhash veeravalli

var
topbit=document.getElementById("adsensical<$BlogItemNumber$>start");

var
bottombit=document.getElementById("adsensical<$BlogItemNumber$>end");

var
s=document.getElementById("adsensical<$BlogItemNumber$>body").innerHTML;

var regexIndex=s.search(/<!--adsense-->/igm);
if(regexIndex>0)
{topbit.innerHTML=s.substr(0,regexIndex);bottombit.innerHTML=s.substr(regexIndex+14);}

</script>
</ItemPage>
</p>

I hope this thing will increase your CTR and bring you more revenues.But remember that adsense allows just 3 ads per page.Thanks to Adsensical author.

5 comments:

or use adsense deluxe with wordpress, thats the best.

I tried to find <$BlogItemBody$> in the blogger templae, but I could not. I want to implement this for my blogger blog, but can't do it.

Regs,
Vinay

Im sure that will be there..if u r unable to find it..send me the code of your template and ill tell u

I tried to find <$BlogItemBody$> in the blogger templae, but I could not. I want to implement this for my blogger blog, but can't do it.

Regs,
Vinay


I think you should go to edit layout and go to edit html and check/tick the box says expand your widget and try to find it

Post a Comment