Earn Money Blogging

Add Adsense in New Blogger Beta Post

I received 2 emails recently asking how I managed to place Google Adsense after each post using the new Blogger Beta platform.

Well here is what you should do:

Go to Beta Blogger template page, click on 'Edit HTML' tab and tick the checkbox of 'Expand Widget Templates'. Look for the following lines of Beta Blogger template HTML code usually found somewhere after the half-way mark of the entire codings:

<div class='post-body' expr:id='"post-" + data:post.id'>
<b:if cond='data:blog.pageType == "item"'>
<data:post.body/>

Then place your Google Adsense code after: <data:post.body/>

Now after doing so, the problem you'll faced is that Blogger will not accept the codes thus unable to save changes made or the Adsense ad will not appear correctly or at all when checking on your blog. The issue is with the following Adsense codes:

There are 2 solutions to this, which is either to remove those 2 codes completely or manipulate the codes. Removal would be totally against Google Adsense TOS so that leaves manipulation as the only obvious choice.

So here are the solutions:
1] Replace <!-- with &lt;!--
2] Replace //--> with //--&gt;

Now upon viewing the source codes of your blog from the browser (right click on mouse and select 'View Source in Explorer' or 'View Page Source in Firefox'), you will notice that the Adsense codes will appear exactly as it should be thus problem solved.

The blog which I learnt this from is BloggerDigest and the originator who started whole thing which we're all very thankful for is by Louiss from BloggingSecret.

On this note I would highly recommend those of you who like myself manages several other blogs to use the Channels feature in Google Adsense to track click-through performance and hits on each ad placement or blog.



Technorati Tags: , , , ,

Posted byDaryl W.T. Lau at 7:18 AM

31 comments:

Rachel said... February 7, 2007 4:54 PM

Thank you for this useful information, I had assumed it just wasn't possible to do this. I am just trying it out now - I cannot find the code that you said to insert the adsense code after so I have made an educated guess and seems to have worked, fingers crossed....

Daryl W.T. Lau said... February 7, 2007 6:39 PM

My pleasure Rachel.. yeah those codes can be quite confusing. I was totally bewildered the first time too.

Hope it works out on your part.

LOUI$$ said... February 8, 2007 9:44 PM

Thanks for that buddy, keep it up! cheer!

Adam said... February 18, 2007 12:09 AM

Thanks for the info. Have been trying to get the code below the post without any success before I came to your post.

Daryl W.T. Lau said... February 18, 2007 12:14 AM

You're most welcome Adam... glad it worked out for you and hopefully it will make it more effective as well.

Cheers & Thanks for the Visit.

Daryl

Vinod said... March 15, 2007 8:43 PM

Hello,

I have tested the trick in my blog
blog

Simply wonderful.

Vinod

kasimchen said... March 19, 2007 8:10 PM

Great post, quite straight forward.
Can you tell me how to put adsense only after first post (not loop for every post)?
Thanks.

Daryl W.T. Lau said... March 20, 2007 12:00 AM

It is easily done with the new Blogger Beta. Try this:
1] Add Site Element
2] Adsense Ads code (choose the ad size)
3] Drag and drop the unit right above your first post. This way you can put 2 more Adsense ads like in your sidebar.

Cheers!
Daryl

Sasi Kumar said... March 25, 2007 2:18 PM

This post was most helpful, i've used ur technique and implemented adsense into my blog. thanks a ton.

Daryl W.T. Lau said... March 25, 2007 6:49 PM

You're most welcome Sasi... hope it performs well for you.

Cheers!
Daryl

AV said... April 8, 2007 1:06 PM

your trick works! But i have a question Is it not a violation of the adsense policies to modfy the code

Daryl W.T. Lau said... April 8, 2007 2:39 PM

Hi there AV... thanks for visiting! You don't have to worry about that cause IF Google does check on your blog coding, it will look EXACTLY like their code without any amendments made. We are using this to rectify the posting and display issue on the New Blogger platform thats all.

Cheers!

MyFirstMillion said... April 19, 2007 10:33 AM

Is there a way to pull this trick off on a blogspot hosted blog that uses haloscan codes? I've tried to insert my adsense with your revisions, but it's not seeming to work.

Vedis Teh said... April 19, 2007 11:36 AM

Yeahoo,

Thanks Daryl. I have asked around how to put the ads in. Now, I have found it here. Thanks again.

Vedis Teh said... April 19, 2007 11:41 AM

Wait a minute ! Daryl,

Will it affect my PPP ? ;-)

Thanks

Daryl W.T. Lau said... April 19, 2007 5:23 PM

Howdy My1stMill... I did some reading on Holoscan and I'm afraid I can't help you on this since its platform I've never used before. Theoretically, it should work as well if you are using blogspot codings as you mentioned.

Dear Vedis... if you are referring to PayPerPost (PPP) then no worries, it does not at all. The important thing to remember about PPP is that ads must not be seen within the sponsored post. Cheers!

Itchytooth said... April 20, 2007 2:34 PM

Thank you so much. Just what I was looking for and it worked perfectly!

Fashionasia said... April 23, 2007 2:45 AM

hmm...mine did not work properly...
it seems that after i insert the script, the adsense for the post appear but the adsense that i've created at the sidebar using "page elements" feature will disappear.
Any idea why??!

Daryl W.T. Lau said... April 23, 2007 3:42 AM

You're most welcome ItchyTooth!

FashionAsia:
Actually no idea why this is happening to you. Perhaps you can try is to take out all your adsense codes and placing them back in again starting with placing the one for inside the post first.

Cheers!

Carradee said... April 24, 2007 9:15 PM

Thank you! This is exactly what I was looking for!

-'Dee

MadCircle said... April 25, 2007 7:43 AM

I did it!! I did it!! Thank you!! Quick question though, ads only show on two of my latest post. Is this normal?

Welcome! said... April 25, 2007 8:50 AM

you're the man!!

Welcome! said... April 25, 2007 9:08 AM

I got the html code to work, but now my sidebar widget is not working. How can I get google ads to show up in my sidebar AND below. Visit my page as I will leave everything as it is for troubleshooting...thanks for a great site!

Daryl W.T. Lau said... April 25, 2007 10:28 AM

Hi there MadCircle... if you set your blog to display more than 3 posts as default and already have Adsense displayed on your sidebar, then Google will automatically only display 3 text ads.

Welcome... for your sidebar, you do not need to alter the codes. Just paste the code as a new element as it is and it should be fine.

Cheers!
Daryl

Catguin said... May 4, 2007 12:46 AM

hey sir, i would like to ask you something.

i never code blog before, but i do know how to make a website, the problem here is, i do not know how to insert those blog elements inside such as those " <$BlogArchiveURL$> or <$BlogItemCommentCount$> "

without these coding embdded into my html coding,it is not a blog no more. i tried to look for these coding but i culd not find it

do you know where i might find it? could you teach me? thank u

lisa q. said... May 7, 2007 11:03 AM

can you tell me how to do this wrapping the text around the ad so it blends in with the posts better? i'd appreciate your help.

Gibo said... May 17, 2007 7:44 AM

hi. thanks you for posts like this. anyway, i have checked the html code of my blog pinoyseminars.blogspot.com but could not find that part about which exactly matches the code you mentioned.

is it because im using the new blogger? i've been wanting to add adsense as a footer of all posts and have searched the net for the applicable solution. no luck so far. hope you can help me. thanks. :)

Daryl W.T. Lau said... May 17, 2007 7:50 PM

Lisa: You will need to make the image float right or left of your text. Here is an example:
< img style= "margin: 0pt 0pt 10px 10px; float: right; src=" http://www.yoursite.com" >

Gibo: This is for New Blogger so you should be able to see it clearly. If not, then perhaps it due to the customized template you are using. What you can do is try using another template and see if it works for you.

Cheers!

Admin said... July 17, 2007 12:25 AM

I tried doing this but my ads are visible only for the first 2 posts, how can I do this for all the posts in my blog.. Please check how it looks at my blog
http://meecinema.blogspot.com/

waiting for your reply

Prashant said... July 20, 2007 2:14 PM

Hi Daryl,

Thanks for this useful information. I was banging my head for last 4 days on this issue. I am not a HTML friendly. So it was hard for me to figure out how can I post these ads.

Thanks Again.

Celebrity News said... February 23, 2008 3:02 PM

Thank you very much for your useful information. You won't know how much it helped me.

Post a Comment