Industry guru Dave Taylor offers tech support on technical and business topics, including iPhone, iPod, Microsoft Windows, Sony PSP, cellphones, online advertising, CSS, Web design, business, Unix, Linux, SEO, Mac OS X, and shell script programming.     


How do I add Google AdSense to my RSS feed?

Hi Dave. From reading your earlier postings, I see that you too have been approved by Google for their new AdSense for Feeds program. What I don't get, however, is how to actually add their adverts in my RSS feed. I'm running Movable Type: can you help me figure this out?


Dave's Answer:

While Google is the master of nifty new programs, I also find that I have to spend a lot of time trying to figure out exactly what they're doing, partially just because their programmers seem to know more about how to make my Web browser jump through hoops than anyone else on the Web!

To get started, you'll want to log in to your AdSense account, then click on the Ad Settings tab. The first section is labelled "Ad Type" and you should see this:

Ad Type selector including AdSense for Feeds

Click on the new "AdSense for feeds unit" and select the type of Weblog program you're running out of the choices (Blogger or Movable Type/Typepad).

In the "Your AdSense code" box you'll see the code you should add to your feed, but don't do that yet. You want to create a unique channel for your RSS advertising first, so you can track impressions and click thru rate. In the middle of this same page, there's a section that lets you work with channels:

Configuring channels for your AdSense for Feeds ads

Click on "manage channels", then type in the name of the channel you want to create (I used "RSS Feed") and click "create new channel". It'll look like this:

Create a Unique Channel for your RSS Ads

Now, click on the "Continue to Ad Layout >>" link at the bottom of the Channels page and you'll be back to your original page, but now you can select the new channel!

Now in the "Your AdSense code" box is a bunch of obscure looking HTML that you'll want to copy and paste into your RSS template. Let's look at that part next.

If your browser supports tabs, I'd recommend that you create a new tab before you move to your Weblog configuration page, so you can flip back to the Google information with ease.

If your Movable Type configuration is like mine, you'll have a "Templates" link on the left side of the main page, which, once you click on, will reveal all your templates, including both an RSS 0.91 and RSS 1.0 index page.

Click on the first one, "index.xml", and you'll be looking at your template, which is about as scary as a file gets in the blogging world!

Somewhere in that jumble is a code section that looks like this:

<description><$MTEntryExcerpt encode_xml="1"$>
</description>

Position your cursor just before the </description> tag, insert a few blank lines, then back up one and paste in the code from the Google AdSense page. Click on SAVE then click on the bottom REBUILD button and you'll be able to quickly rebuild just the target file.

You'll want to do a similar thing to the "index.rdf" file too. The XML that's shown therein is a wee bit different, but the same basic technique will apply.

Now, to test it, subscribe to your RSS feed from within you favorite RSS Aggregator (I like NewsGator Online, personally). Your ads should show up pretty much instantly!

Now don't forget to read my Best Practices: AdSense for Feeds and AdSense for Feeds: Any Risks? before you go too much further.

Congratulations, you now have adverts in your RSS feed. Good luck with them. Me? I think you should only have adverts in full text feeds, as I talk about at length in the following article about Ads in RSS Feeds? Corrupting the idea of information syndication.


More Useful Blogs and Blogging Articles:
✔   Get my shopping cart plugin to work with WordPress?
We've put in a shopping cart for a client that's not working, and we need some help! The cart is currently using the...
✔   Embed an audio player on a blog or web page?
I have some mp3 audio files I've recorded and would like to have people who visit my site be able to listen to...
✔   Can I write a guest review for AskDaveTaylor.com?
Hi Dave. I'm a big fan of your site and love that you're doing so many reviews now. I've noticed, however, that there...
✔   Change author on WordPress blog post?
I have two accounts set up for my WordPress blog and I'd like to be able to have all my posts from a...
✔   How do I restructure my Wordpress blog without losing SEO?
I have a wordpress blog that was using categories in the url structure like this: /category_name/post_name/ Then I had read somewhere that if...

Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
    Enter your name: and your email addr:  




Categorized: Blogs and Blogging   (Article 4024, Written by )
Tagged:
Previous: How do I subscribe to an RSS feed?
Next: What's the deal with Google Sitemaps?




Reader Comments To Date: 16

Satish Talim said, on June 7, 2005 5:59 AM:

I do not get the 'Adsense for feeds unit' when I do as suggested by you. Is it that I must have 100 subscribers (of what?)?

Dave Taylor said, on June 7, 2005 6:30 AM:

You need to apply for the AdSense for Feeds program separately, and once you're approved (which you'll know because the Google team email you a notification) then you'll see the AdSense for Feeds area on your AdSense account.

Tris Hussey said, on June 7, 2005 5:28 PM:

I'd also suggest that if you use FeedBurner to republish your feed, then you don't have to mess with the code at all!

Michael said, on June 10, 2005 8:38 PM:

How about the placement in the Atom Feed? I'm not seeing


in that code.

Dave Taylor said, on June 10, 2005 10:07 PM:

Ah, sorry, I don't have access to a site that generates Atom, so I can't see the template. Perhaps someone else can help? If so, please remember to replace all angle brackets with something else, like square brackets, so that the blog app doesn't eat 'em alive. :-)

DL Byron said, on August 27, 2005 2:41 AM:

Good tip, but that's going to produc an invalid XML file, which will puke in newsreaders. You can't just pop javascript into an xml file.

Dave Taylor said, on August 27, 2005 3:20 AM:

The code snippet that Google's AdSense program gives you should be something you can drop in, Byron. I didn't have any problems translating JavaScript into any special XML for my RSS feed...

DL Byron said, on August 27, 2005 5:22 AM:

And it validates? Checked at feed validator.org? I've tried and it breaks everytime. Unless I'm doing something wrong.

doug (dougs travels) said, on November 17, 2006 3:40 PM:

OK, so I am a year late. I am seeing a lot about a beta version of AdSense for feeds, but nothing for a full release. What happened?

Done well, AdSense for feeds is a great idea. It's as good an idea for feeds as for a website.

raspybluepearl said, on February 20, 2008 3:29 AM:

I am going threw Free webs and they said that I have to get the code from google ad since and copy and past it to my site but if i mess it up it could screw up my whole site in using edit builder tools from there web site builder program. They already have a big add of there own, up top. It goes compleatly horasontal to my whole page! I thought I only have space to the left and right cause that is the free space left , but I cant put it there cause the web site builder wont let me I have to acutaly mix it in with in my own context of my page. What is the code that I need to do this. I know nothing of any type of html code or css code or any code for that matter. Can you help me with this I want to do a context web site only but if I cant figure how to make some kind of money from the site then I will have to set up a pay for the information account. And with all that is out there all ready I dont whish to do that right now. My web site is Freewebs.com/residentialvirtualemployers thansk for your help raspybluepearl

venkatreddy said, on April 21, 2008 1:30 AM:

Hi Plese add the google add

Vinod said, on October 20, 2008 1:44 AM:

Respected sir,
I am not seeing any adsense / google add in my feed of Accounting Education . I have already make and pass this feed from google adsense setup. Please solve my problem

Morris Tuku said, on February 15, 2009 11:49 AM:

This is a very good idea from google since publishers will be able to earn extra money form adsense. Implementing adsense for feeds is as easy as implementing for normal website.

1d said, on June 25, 2009 3:44 AM:

Respected sir,
I am not seeing any adsense / google add in my feed of Accounting Education . I have already make and pass this feed from google adsense setup. Please solve my problem
Posted by: Vinod
====================================================
I also encountered the above issue... can't see the ads display on my feed, any advise?

Mrugesh said, on October 2, 2009 8:35 PM:

I am from India and I have a blog which is now 45 days old. I want to make an adsense account but I am scared that they won't approve it. Should I go for Adsense ? I have heard that they accepts blogs from India only if they are 4 months old.

Rabindra lamsal said, on November 1, 2011 11:06 PM:

It was really helpful. Thanks.

Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!

I do have a comment, now that you mention it!











I will never send you any unsolicited email. Ever.






Check This Out Too...

 
Look for Answers
Need Help? Ask Dave Taylor!


Follow Me on Pinterest

Find Me on Google+
ADT on G+
© 2002 - 2013 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. My lawyer says "Thanks".
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.