Tuesday, January 16, 2007

Incorporate AdSense ads in your New Blogger blog post.

Stavanger of Blogcrowd Forum sent me an email alerting me to a post he did on how to incorporate AdSense Ads in your New Blogger (formerly beta) blog post. It involves some slight modification of the AdSense script, and I expressed my reservation regarding violation to AdSense TOS. However, Stavanger, wrote to AdSense Help Center, and received some vague replies that seem to indicate that slight modification of the code for the New Blogger is OK. I paste here the email he received:

"Hi,

You are permitted to make minor edits in Blogger Beta. However, please keep in mind that in general publishers are not allowed to alter the AdSense ad code for any reason. Once you've generated the ad code in your AdSense account pages, you may not alter any portion of the code or manually change the layout of the ads.

Thanks for your understanding.
Sincerely,

The Google AdSense Team"

Having received some kind of reassurance, I proceeded to test his hack in this blog: Good Parenting Practices and it worked. You can see AdSense ads (half banner) at the bottom of the first 2 post as I already have 1 skyscraper in the sidebar. Theoretically, there should be ads in the remaining posts, but they are suppressed by AdSense, so there are only the maximum 3 ad units in the main page.

If you want to see an example of a New Blogger blog with AdSense incorporated into the top of the post, look at this blog Recreation and Sport.

If you want to do it, check out his post Insert Google Adsense Into Blogger XML Post Body

This is how it is done. You generate the AdSense script from AdSense site, then replace HTML characters like < with script to display special HTML code etc. You can read more about it at Google AdSense In Blogger Beta XML Update. You can actually parse the script in Notepad using Replace All, but Stavanger has even made it convenient for you by giving a parser at Parse Google AdSense For XML Blogger:.

Update 28 April 2007: This update should have been made earlier, but I only recently review the post when I got a query from a blog reader. And alternative to replacing < with , etc, is to remove the comment tags and from the AdSense script. I have written to AdSense Help, but if my memory is OK, they did not reply. I also posted in a pinned message in the Google AdSense Help group and added to the subject "It is not OK. Will AdSense allow it" but found that the message was deleted and the subject was changed back to the original title.

Update 8 June 2007: I got a query from a reader in the comment and thought I would paste the reply to the comment here for general reading for everyone:

AdSense allows max 3 ad units, and if you have more than 3 posts in the main page plus an ad unit in the sidebar and an ad unit in the footer, you will get 3 ad units displayed in the main page. The rest of the posts will have the ad suppressed, and the ad in the sidebar and the footer wouldn't display either.

However, in the individual post page (only one post) the ad in the post plus the ad in the sidebar and the footer will be displayed.

The last time I implemented something like this, I contacted Adsense Support and they replied that it is OK for THAT blog, but didn't say anything about other blogs, so it is left hanging whether we can just implement it and leave AdSense to suppress additional ads or we have to get their permission each time we implement it. Anyway, you can either protect yourself by limiting the number of posts displayed on your main page, use this is at your own risk or verify with Adsense Support.


Update 22 2007: Actually new about this new feature in New Blogger sometime ago, but was reminded by an email from AdSense so I went ahead and tested it out. You can read about it at AdSense between posts direct from Blogger Layout (click BACK button to get back to this page).

41 comments:

  1. Hi peter, my popular hack for adsense(last year) is what are you posting now, you may revise from my post here!

    your sincerely,

    louiss

    ReplyDelete
  2. Hi loui$$,

    I followed the link. Looks like there are two methods of doing it, one is what you showed in your post which involve removing the comment tags and pasting the script direct into the template, and the other one by Stavanger which involve changing the special HTML characters, but which you can add by using the Layout "Add a Page Element".

    Peter a.k.a. Enviroman
    Enviroman Says

    ReplyDelete
  3. To mousqueton,

    I am sorry I will have to delete your comment because it contains a long unbroken URL which extend into the right sidebar in FireFox, and probably will cause the sidebar to slide to the bottom of the page.

    I have saved the URL, and if I find a solution, I will post the answer.

    Peter a.k.a. Enviroman
    Enviroman Says

    ReplyDelete
  4. Hi Peter. Great tips. I have 2 questions: How do I add Adsense to the comments pop up footer or hearder? And is there any way to remove the Anonymous option in comments so users are forced to use "other" instead? Thanks.

    ReplyDelete
  5. Hi Sandra,

    I know of no way to add AdSense ads to comments. Regarding disallowing anonymous comments, refer to this post Changing Settings. The answer is somewhere in the middle of the post. If you have further problem, feel free to comment again in this or in the above post.

    Peter a.k.a. enviroman
    Enviroman Says

    ReplyDelete
  6. Hii Peter,
    How do i add adsense codes as you did on your page on Top right hand side and also on header below search. Currently, i m using 3 column blogger (http://visitformoney.blogspot.com). How do i put adsense code as you did on your site Peter? Your kind help is appreciated. Thank you in advance.

    ReplyDelete
  7. Dear...Peter
    My name is Woraporn Lakkanacheewan from Bangkok Thailand.I'm your blog 's fan.Your article is absolutely brilliant.
    Full-time blogger.Learn how to live with blogging and share my tip by blogging
    http://www.online-tip.blogspot.com.

    I looking for the blogging network like email interview,link exchange,business partner and
    friend.

    Do you mind to link swap with me? I already link to you.You can check out at my blog
    http://www.online-tip.blogspot.com.If yes please link to me.

    this the example code.However you can create your own.
    online tip.blogging for fun and profit

    Thank you..I'm looking to join with you in the future.

    Respect
    Woraporn Lakkanacheewan

    ReplyDelete
  8. is there a way to add adsense in the middle of my posts?

    ReplyDelete
  9. Hi Topdog,

    I don't think there is a way to add AdSense ads in the middle of a post. For adsense in the middle of the content of a page, I believe you will have to go for a normal site.

    However, if you like ads in the middle of the post, you may want to join Amazon Associates. They don't have as many restrictions as AdSense and you can generate script for text link ads that you can put anywhere, including in the middle of a post, and I think I will do an example and probably do a post on that.

    Peter (Blog*Star 2006 and 2007)
    Dummies Guide to Google Blogger
    "online book" in progress

    ReplyDelete
  10. Hi Peter,

    Please keep us posted when you have an example of ads in the middle of the posts.

    ReplyDelete
  11. Hi Derek,

    haven't found any hack for AdSense in the middle of post content, but don't know if you want to consider Amazon Associates. They have less restrictions on how you place the ads and it is very easy to place Amazon ads within (including in the middle) of the post. See Earn with Amazon Associates.

    Peter (Blog*Star 2006 and 2007)
    Testing Blogger Beta (now New Blogger)

    ReplyDelete
  12. Hi Peter,

    Thanks for your prompt reply. I was thinking of incorporating AdSense only to one particular post (the link exchange post which u commented) but without success. I tried copying the whole AdSense code into my post but nothing appear. Surprising, BidAvertiser appeared. Any ideas?

    ReplyDelete
  13. Peter,

    Thanks for all your tutorials. very helpful!

    Question for you: is there a limit on the number of Adsense units that I can have on blogspot. I added this adsense block after my post and it works well, but my adsense bar in the side bar goes away. Any clue?

    Nidhi

    http://nidhishodhane.blogspot.com/

    ReplyDelete
  14. Hi Nidhi,

    Regarding the maximum no of AdSense products you can have on a page, you can get the information from How do I earn from AdSense. The information is buried within the post and you will have to read through the post, but I think it will be worth your while as it also refer to other AdSense products.

    Regarding Ad Unit in particular which is what your question is related to, the maximum no on a page is 3. Now if you have set the maximum no of posts to display in your main (home or index) page to more than 3, than you will only see 3 ad units in the first 3 posts, and if you have put ad units in you sidebar, footer, etc, these and also ad units in following posts will be suppressed. However, if you go to the individual post page (try that by clicking on a post in the Archive of the current month), you will only have 1 post, and therefore only one ad unit in the post, and you will be able to see the other ad units in the sidebar, footer, etc.

    Peter (Blog*Star 2006 and 2007)
    Generating Revenue from your Website

    ReplyDelete
  15. I found the info. Thanks.

    Nidhi

    ReplyDelete
  16. Hi !

    I'm sorry but this is not working at all for Denim template. I still don't know how to finaly put this f..... adsense before or post-articles !
    Chen could you light us please :)?

    ReplyDelete
  17. Hi outlandish,

    It is all in the post and it should work for all template. I don't know why it is not working for you and don't know what else to add.

    Peter (Blog*Star 2006 and 2007)
    Dummies Guide to Google Blogger
    "online book" in progress

    ReplyDelete
  18. Ok Chen, thanks anyway, I'll keep trying , hope i'll hundle it, may be i'll just switch to another template...
    I just wonder why can we not embed the adsense code within the posts, it's pissing off !

    Chen, thanks again for the valuable informations you are giving here !

    ReplyDelete
  19. Hi Outlandish,

    Just remembered. If you are having problems, there is another way of doing it. Remove the comment tags <!-- and //--> from the AdSense script rather than the parsing method given by Stavanger and see if that makes a difference.

    Peter (Blog*Star 2006 and 2007)
    Generating Revenue from your Website

    ReplyDelete
  20. Hi Chen !

    Ok I'll try this too, but tell me please, if I already have some adsense ads on my pages, let's say 1 or 2 ads, is that ok with putting another ad in the HTML ?

    ReplyDelete
  21. Hi Outlandish,

    AdSense allows max 3 ad units, and if you have more than 3 posts in the main page plus an ad unit in the sidebar and an ad unit in the footer, you will get 3 ad units displayed in the main page. The rest of the posts will have the ad suppressed, and the ad in the sidebar and the footer wouldn't display either.

    However, in the individual post page (only one post) the ad in the post plus the ad in the sidebar and the footer will be displayed.

    The last time I implemented something like this, I contacted Adsense Support and they replied that it is OK for THAT blog, but didn't say anything about other blogs, so it is left hanging whether we can just implement it and leave AdSense to suppress additional ads or we have to get their permission each time we implement it. It is now impossible to reach Adsense Support so using this is at your own risk.

    Peter (Blog*Star 2006 and 2007)
    Generating Revenue from your Website

    ReplyDelete
  22. Hi Peter,

    First of all, I would like to thank you for your great tips and tricks. I have been a frequent reader to your blog since I started blogging about a month ago.

    I have incorporated the adsense ads in my post as you can see in my blog.

    However, if i placed square adsense to the left or to the right of the post, it always give me problem such that it gives me empty spaces at the bottom of the adsense. Instead of wrapping the adsense square, the post and the adsense would stand as if they are standing in 2 columns inside a post. I hope you know what I mean.

    But again, thank you Peter.

    Please visit my blog at www.julianto-cahyadi.blogspot.com
    whenever you are free..
    I appreciate if you have any comments.

    Thank you very much.

    Regards,

    Julianto Cahyadi
    www.julianto-cahyadi.blogspot.com

    ReplyDelete
  23. Hi Julianto,

    I visited your blog, but don't see what is the problem. See the screenshot:
    Julianto's AdSense unit incorporated into post.

    What is wrong with it? I don't see empty space.

    Peter (Blog*Star 2006 and 2007)
    Testing Blogger Beta (now New Blogger)

    ReplyDelete
  24. Hi Julianto,

    Perhaps you are referring to the white space to the right of the adsense unit in the post. If so, I have tested centering the ad unit and succeeded. I will be writting a post about it when I have finished my higher priority tasks and will comment here as soon as it is ready.

    Peter (Blog*Star 2006 and 2007)
    Generating Revenue from your Website

    ReplyDelete
  25. Hi Peter, thank you for your immediate reply. The one that you currently see in my blog is OK. That is not the one i refer as the problem initially.

    Stavanger wrote about the 3 options of placing your adsense inside a post. I always have a problem with the 1 first option, (that is next to the post). The other 2 options work fine for me. Currently I placed my adsense using the 2nd option (before credit).

    If I tried to wrap my adsense (let say small square box) to the left or to the right at the beginning of the post (next to the post) then it always give me problem as mentioned before.

    As such, I didnt put my adsense in that way. Currently (the one that you put in the screenshot) I placed my adsense at the bottom of the post.

    I hope you get what I mean..

    Thanks Peter. I appreciate your help.


    Regards,

    Julianto Cahyadi
    www.julianto-cahyadi.blogspot.com

    ReplyDelete
  26. Hi Julianto,

    Sorry for replying so late, but I have a lot of things to finish. I have tested wrapping text around ad in Fish and Fishing and will be writing a post on how to do it (in the process) in this blog. Will comment here when it is finished.

    Peter (Blog*Star 2006 and 2007)
    Earning Online

    ReplyDelete
  27. Hi Julianto,

    The post is ready, but a bit long. See Incorporate AdSense ads in post and wrap text around ads.

    Peter (Blog*Star 2006 and 2007)
    Generating Revenue from your Website

    ReplyDelete
  28. Great Website. Helps me out alot.

    ReplyDelete
  29. Hi Peter,

    I would like to wrap my adsense code around the bottom-right of text. I know how to do it for top-right of text(by using float tag) but can't figure out how to do it for bottom right.
    Can you provide some help?

    Regards
    Ankur

    ReplyDelete
  30. Hi Ankur,

    I don't know if I can do it as I will need to test. I will save your message in my "to do" folder. But there are a long list there and many not attended to yet.

    Peter Blog*Star
    Alternatives to Google AdSense

    ReplyDelete
  31. Hi Peter,
    Thanks for the follow up. Let me know the solution whenever you find time.

    Regards
    Ankur

    ReplyDelete
  32. HI PETER,
    MYSELF IS A NEWBIE BOTH IN ADSENSE AS WELL AS IN BLOGGER, I JUST WANT TO KNOW HOW MANY ADSENSE AD CAN A BLOGGER PUT ON A SINGLE PAGE???? CAN ANYONE SELECT OF DIFFERENT ADS IN HIS DIFFERENT POSTS AND ALSO LEMME KNOW HOW TO BRING MY OLDEST POST TO COME FIRST IN MY BLOG/??????

    ReplyDelete
  33. thanx www.srilankan-jokes.blogspot.com

    ReplyDelete
  34. thanks for the post!
    http://earlyglow.com

    ReplyDelete
  35. [..] thanks for tips and tricks that can be read from your blog generally its more focusing on the way of implementation [..]
    www.earlyglow.blogspot.com

    ReplyDelete
  36. Hii……if you are searching for how to put adsense code in between your blog posts without changing the code, I have the solution for that. Read this post http://hubpages.com/hub/How-to-put-adsense-code-inside-the-blogposts-in-blogger

    ReplyDelete
  37. what if i have 10 posts and 20 pages, how do i place the adsense ads on all of them?

    ReplyDelete
  38. read the post again, particularly the text in red

    ReplyDelete
  39. Hi Peter!

    I was wondering how I change my ads from text ads to image ads? I have tried many different ways, but I cannot figure it out! Your help is greatly appreciated!

    ReplyDelete
  40. You mean Adsense image and text ads? If so, it is not under our control except we can choose only text....

    Hey when trying to complete the above, perhaps you can try to generate your adsense code and choose only graphic ad. I am not sure there is such a choice, I am only sure you can select only text. Try to generate your adsense code and come back with your feedback.

    ReplyDelete

Find help, info, instructions, tips, tricks

Tip: Use search box below or this box, labels in the first right sidebar, archive, ctrl+F for this page or sitemap to find topics