HOW CAN I DO THAT?

Followers

Friday, March 14, 2008

Wrapping Adsense in Blog Post

by Bonnie Calhoun

This is the third in the series of Adsense posts. The other two are HERE, and HERE.

Today I'm going to teach you how to wrap Adsense code into a blog post. The first example isn't exactly rocket science so even the most novice of bloggers will be able to accomplish this with ease.

First the glaring question: Why would I want to give myself the heart palpitations that come with messing with the stupid HTML in my template to put in an equally stupid ad?

LOL...the answer to that: Ads placed within blog posts have been tested and proved to give the maximum in CTR (click thru rate). LOL...this means that you make a lot more money than with other locations on your page.

Let's first look at the use of the Adsense Widget.

From your Dashboard, click Layout. It will open on the Page Elements page. Click the Edit link in the Post Box. There is a clickable link in that open Configure box that you can click to put Ads between any number of posts. Read this Blogger Article about Placing Ads between posts.

From here on, it's going to get a little tougher, so the first thing I would recommend is Backing Up Your Template if you already don't have a copy of it saved in a NotePad file on your own computer. When you open the Layout tab, and click Edit HTML it will give you the Backup link...Please USE IT!!!


Okay...you're all backed up...now on to putting Adsense in your posts. Check the Expand Widget Templates box above the Edit window. Search for the following lines:

<data:post.body/>
or
<p><data:post.body/></p>


You will need to Parse Your Adsense Code like I taught you to do in THIS POST. This is how the post section code will look after you add the Parsed Adsense Code and the line to direct the ad to sit left, or right. In this code I have it set for left. To move it to the other side of the post, change the float position to right.





<div class="post-body entry-content">
<div style="float: left;">
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel = "";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<p><data:post.body/></p>


Click the SAVE TEMPLATE button, and you're done!

Sig

84 Comments:

  1. Hannah said...
    The first two lines of your code you added yourself right? The div class and the float lines?

    Also you mentioned in the parsed tutorial that you must change certain code:

    You are going to change the (<) to (<) and the (>) to (>) and the quote marks ( " ) to (") They will all be HTML entities. The code will then look like this:

    Do you have to do the same with the 2 lines you added to the top of this? Or just leave them alone?
    Bonnie S. Calhoun said...
    Only the Adsense code needs to be in the Parsed fromat, but it won't hurtt anything if you do the rest of it.

    The highlighted section in the post is an example of how the section should look after you have added your code!
    JAC said...
    Thanks for very informative posts on this subject. I will be providing my readers with your blog link.

    John Carnegie
    http://www.cleverjunction.com/cjr/adsense_insurance
    Bonnie S. Calhoun said...
    LOL...web proxy...I don't mean for the code to be real for anyone to use...I'm providing you with an EXAMPLE only!
    Anonymous said...
    Hi Bonnie - first line - second sentence 'Theo'? Maybe a speelin error? haha
    Grumpy
    Bonnie S. Calhoun said...
    LOL...everybody's a critic :-)
    Anonymous said...
    Great topic and very true. Ad blindness is a serious issue for us bloggers and website owners as well. I have my adsense ads right in the middle of my content and still get a very low click-through-rate.

    Just wondering why you have your ads in the sidebar? Are they more effective there?
    Bonnie S. Calhoun said...
    LOL...they're just out of my way there. And I still get a pretty good click through rate because people usually direct their vision down the left side of the page!
    Anonymous said...
    Thank you for yiur teaching.I learn a lot from here.
    Anonymous said...
    Thank you for yiur teaching.I learn a lot from here.
    Anonymous said...
    Thank You for teaching me how to wrap Adsense code into a blog post
    Anonymous said...
    Hi Bonnie. sorry for getting in contact through your comments page.
    I couldn't find your email.
    I have a blog help site that I only started 2 weeks ago called,BlogTips.Com. I am trying to get some links and was wondering if you would consider helping me out with a link from your Great site.
    I will of course link to you in return. The blog world can be a hard nut to crack and one needs all the help they can get.
    Please don't expect to much if you decide to give me a visit as I am only starting out. learning all this html stuff is doing my head in.
    Looking forward to hearing from you.
    my email. gurnygob@msn.com
    Anonymous said...
    hmm this kind of think is really improving for some newcomer in web page developer.and earn a little bit of currency.
    Anonymous said...
    I think adsense is a nice way to earn money.I will try to add this in my template.Thanks for teach the process of coding.
    Anonymous said...
    Thanks for teaching you how to wrap Adsense code into a blog post.I already try it and I am able to do it.Thanks for showing this nice work in this easy way.
    Anonymous said...
    Thanks for the tips in adding adsense inside my post. Just wanted to know if doing this will not be against adsense TOS? Thanks.
    Anonymous said...
    The series (your 3 articles) about adding AdSense into posts are very helpful.
    BIG THANKS!!!
    Anonymous said...
    It seems too easy.It will help many people.
    Anonymous said...
    Thanks for the resources... wow!!!
    Anonymous said...
    Here well arranged and varied posts appear again and again. I look gladly here past. Many greetings from the center of Germany!
    Anonymous said...
    Hi everyone... I am in a crisis after looking for help regarding wrapping adsense only in first post on my home page.

    Can u please tell me how to do it?? my mail is jackusa18@gmail.com

    Please i need your help.. anyone pls help..
    Bonnie S. Calhoun said...
    Satyam tcs...read the post that you left this comment on. It teaches you how to do just that!
    Anonymous said...
    Hey... The blogger is providing us a nice option of wrapping the adds in the posts. But i am little bit sad for the new notification of the change of rules of adsense.
    Anonymous said...
    I look here again and again in different times by and am pleased about the interesting and well written contributions. Cordial thanks and many greetings from the center of Germany.
    Anonymous said...
    I am waiting for your next part.please share it soon.
    Unknown said...
    I don't remember how I ran across your site, only that you have the BEST tips I have had the pleasure of running across. You are a great teacher and a wonderful writer. Yes I have looked at your other site. I plan on reading your blog front to back and look forward to more of your posts.
    Anonymous said...
    thanks for the information i needed something like that
    Michael said...
    Nice....

    Thanks for the walk-through it is very concise...

    I have yet to get this deep into my personal blog but thanks for the info... one of these days soon though
    Anonymous said...
    Hey.. that process is little tough for me. I don't understand the HTML codes. I am now using the blogger adsense option to place adds. I am not satisfied with it. Is there any easier way to do this ?
    Anonymous said...
    I think this is burning issue for all of us. Like webiste and blogger. So i like your post. It was full of information. Thanks
    Anonymous said...
    Nice!!

    I always have trouble making the ads and text look nice together...

    Thanks for the info!!
    Anonymous said...
    That is tougher then it sounds. I am afraid to apply the system right now. I think I need some more time for practice.
    Anonymous said...
    I'm working on a new blog and this will help me a lot. I always find critical doing these stuffs. Thanks so much for such a wonderful post Professor Bonnie!
    Anonymous said...
    Thanks for this code. I've been looking for a code to wrap adsense inside my post and this one is really helpful.
    Anonymous said...
    Large praise for this well written and easily understandable contribution. I take up this blog to my favorites and times will soon again by-look.
    Anonymous said...
    Sorry to drift but I am very new to all this technical stuff. I was trying to remove the AdSense ads from my blog by following the directions given by Google. I was able to remove the ads but unfortunately all of my archives for three years of blogging went away. How can I return them to my blog site? I refer many people to my archive for reference to my art. Thank you
    Anonymous said...
    Since my blog is rather new I won't implement adsense right away (might chase away new visitors) but when I do I'll be sure to use this tip...thanks :)
    Anonymous said...
    Thanks a million for teaching me how to wrap Adsense code into a blog post. i had no idea about it before really.
    Anonymous said...
    The first two lines of your code you added yourself right?But i think Only the Ad sense code needs to be in the Parsed format.Thanks for very informative posts on this subject. I'll improve my blog by using your link....
    sparks_mex said...
    Not sure if this works with all templates but did not with mine. The ad is there but I can't control the color scheme
    Anonymous said...
    Thanks, This is one of very few blogs that was worth the read, a great insight, you should be commended for your time and effort.
    Anonymous said...
    Very nice post thanks for the information. I like your site very well and continue to do so.
    Anonymous said...
    Its very useful.We can decorate things nicely which makes it look nice.
    Thanks because it is a very important posts on this subjects.
    Great topic and very true.
    Anonymous said...
    Thanks, Very interesting read, you should be proud of your blog.

    Your website is very nicely designed, I have already bookmarked it.
    Anonymous said...
    Thanks for posting this review! I love this website and I've subscribed to it.

    I'm looking forward to see your future posts. Cheers !!
    Anonymous said...
    i will link this to my blong
    nice one ;)
    Anonymous said...
    Hi, I found the data:post.body/ section, but shouldn't the Adsense code be around somewhere? I mean, how do I parse it if I don't know where to find it. Also, why do I need to find the data:post.body/ code anyway? I know I'm missing something.

    Thanks
    Aroma Fields said...
    Excellent how-to articles! Thanks for offering these. I'll be following your posts. :-)
    Anonymous said...
    you're an excellent teacher :) i can really learn a lot from your post...
    Stretch said...
    Blogger Help section sucks - can not figure out how to POST A NEW QUESTION. Bonnie I am hoping you can help me out. I want a xnamex.blogspot.com, but it says it is taken. I look for it and it does not exist - WHY? I want to post blogs from my DJ gigs. Please help if you can. I have tried the help section and can not post a question and am getting frustrated at the process.
    Bonnie S. Calhoun said...
    I'm sorry that you had difficulty posting a question. If you are looking for a blog URL that appears to be taken but there is no actual blog for it, that means that the original person who had that blog has deleted it!

    The names stays reserved in perpetuity for the original owner. You may think that is unfair but it preserves an original working blog name from showing up as a spam blog.

    Be creative with the name...add a hypen in it or add a dash or even the plural to get an acceptable substitution for yourself.

    Good luck!
    Anonymous said...
    Great topic and very true. Ad blindness is a serious issue for us bloggers and website owners as well. I have my adsense ads right in the middle of my content and still get a very low click-through-rate.

    Just wondering why you have your ads in the sidebar? Are they more effective there?
    Anonymous said...
    I'll have to try this. It is scarry though messing with the template!
    Anonymous said...
    Hi, I just started a blogsite. I am not a computer savvy person at all. For some reason, my comment bar disappeared. I have gone under settings and everything I can think of, but cannot get it to return. I hate to delete my blogsite and start all over, but it's all i can think to do. I was wondering if you could help me? My email address is jorfam@cebridge.net. Email me if you feel you could help me. My blogsite is a closed site. Thanks,
    Amy
    Anonymous said...
    I´ve actually just got into this blogging stuff, so this is something I need to think about I guess. I have registered for Adsense but I wasn´t really sure how to use it most effectively! Now I do! :-) Lena
    Xfilespoker said...
    Hey Bonnie - Can you OR anyone direct me to a page that explains where to add info to help with my blogs ability to be found via search engines or other means..

    I'm not that computer BRIGHT.. I thought I found a page that explained it - I copied the CODE - but could not find WHERE to put it in the HEADER as they sugested (using BLOGGER) I'm so fustrated.

    Anyway - hoping you can help.

    http://www.standbackworld.blogspot.com
    Bonnie S. Calhoun said...
    Metatags should be placed directly under the title in your header section.

    Here is a post that explains SEO:

    http://howcanidothat.blogspot.com/2007/03/search-engines.html
    Unknown said...
    I don't know where to go to get an answer to this question. Can you help ,me? I'd like to be able to add the little printer icon to each post, so that people can just print that one post. How do I do that? Thanks you, James Ryle
    www.jamesryle.blogspot.com
    Bonnie S. Calhoun said...
    Hi James...Sorry! Printer capabilities is not a Blogger function. They will have to use the little printer icon on their browser and print the page :-)
    Sandy said...
    Bonnie,

    I have a blog problem and was hoping you might be able to help. I have had complaints about reading my blog in a reader. The posts show up fine but the comments icon is not visible. I have tried to no avail to figure out how to remedy this. If you go to my actual post everything is fine. I think the problem might be the template has the comments color set for white and in a reader it won't show up but I am not sure. I have checked customizing colors and can't find anything that allows me to change the color of the comments to make it visible in both places. Thank you for any assistance in this matter. You can follow the link to my blog or I can be contacted at srpbabb@hotmail.com

    Thanks!
    Harmony Travel said...
    Hi Bonnie,

    I'm having some trouble that I hope you can help with.

    I already have an AdSense ad on my blog. I'm trying to add the Google Search bar. I got a bunch of code, but can't find the right place to paste it in in the HTML editor.

    And, if I try and add a gadget on the layout page, it won't let me switch to a different publisher ID.

    Any ideas?

    www.harmonytravelagency.blogspot.com

    Thanks.
    Bonnie S. Calhoun said...
    Hi Harmony.

    You shouldn't be trying to "paste" a Google Search box into the HTML. Just choose the location...header, sidebar, footer etc, add a gadget, and paste the code into that box.

    I don't htink it will let you use more than one Adsense count on a blog...but you could try....go physically to your Adsense account. Create the code that you want, and then come back to your page, add a gadget and insert the code.
    SR. R said...
    Hi I do have a question can't find answer.
    How I can retrieve al my post and paste them on word program. I have 238 post and want to save them on a file. All of them are originals. I tried to copy and then paste..no luck.

    Can you help me out?
    Bonnie S. Calhoun said...
    Try the Scrapbook plugin that comes with FireFox!
    Anonymous said...
    This is what I was looking for.thank you
    Anonymous said...
    Just what i needed!
    Anonymous said...
    Hi,

    I am new to blogging and i am intrested to know more about blogging techniques and i hope that these technique i.e placing ads before and after the post seems to be an good idea!

    thank you!
    Anonymous said...
    Very nice and informative adsense post. Thank you!
    Bonnie S. Calhoun said...
    What does yours look like Alan?
    nich said...
    this post did help me with my new template, thanks for sharing the details :)
    Erneuerbare Energien said...
    Hey, nice article. Enjoyed it
    Foto in Glas said...
    Thanks for this Article from Germany!
    moongoddesslae said...
    I pasted it correctly but I got this error message...

    Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
    XML error message: The element type "div" must be terminated by the matching end-tag "

    bother to help pls.
    Bonnie S. Calhoun said...
    That's a very basic error. You left off an ending </div> code. I must warn you that if you don't understand that error message...YOU SHOULD NOT BE MESSING WITH YOUR HTML!!
    blogstoppage said...
    I could not find data.post:body. is it only for a certain template or for all? thanks.
    HAVENLEI said...
    WOOOOHOOOOO!!!!!THANK YOU SOOOO MUUUUCH!!!!LOVE YAH! I DID IT RIGHT AND IT APPEARED!!!
    Jenny said...
    Thank you for the good assistance, the maximum in CTR is very interesting for blog operators. Property also Adsense code in some blogs, could run however still better.

    All property further…
    zhu zhu pets said...
    so cool uh
    Helen Neely said...
    Thanks for the tip but some of the code do format stops blogger from saving the changes. I would have to try a different way to place my adsense then
    Daniel said...
    Thanks for the amazing tutorial. The explanations were so clear and concise and I was able to follow them easily.
    Thanks for sharing.
    Silber kaufen said...
    i will link this to my blog....good stuff and well done
    Clutch said...
    thanks for the blogpost! really appreciate.. I will send a linkback to you blog as a token.
    Tech Gadget said...
    Hi Bonnie - first line - second sentence 'Theo'? Maybe a speelin error? haha
    Grumpy
    Bonnie S. Calhoun said...
    LOL...Grumpy...I dunno what kinda browser you're using but there is a space between the e and the o :-)

Post a Comment