A Google Gadget is a small XML file that generates a widget on a Google Personalized Homepage. Google has excellent documentation describing how to make a Gadget, but it’s so verbose that it hides just how simple it is to make your own Gadget, especially if you already have a widget or feed on your website that you’d like to Gadgetize (TM). It’s really, really easy! And it can generate a ton of traffic for your site.


Step 1. Figure out what you want to gadgetize

First things first, you need to figure out what you want to turn into a Gadget. You could use a simple RSS feed, but it’s cooler if you have some sort of visualization using javascript or flash. The best gadgets update frequently so that they stay fresh as users visit their homepage throughout the day.

Creating the gadget HTML/javascript is probably the hardest part and, unfortunately, I can’t be of much assistance since your content will probably differ a great deal from mine. But keep in mind that it’s the same old HTML and javascript you’re used to working with on your website, so you don’t need to learn anything new.

I’ll be using a Wine Review Widget that I created for a project I’ve been working for. It’s visual, well contained (it loads within an iframe) and updates frequently with newly added content.

Step 2. Create the Gadget XML File

A Google Gadget is built from a simple XML descriptor file that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="hello world example" />
<Content type="html"><![CDATA[
Hello, world!
]]></Content>
</Module>

All you need to do to make a working gadget is replace “Hello, world!” with the HTML necessary to display your content. Google provides a handy scratchpad that allows you to preview your gadget before publishing it. You can put pretty much any HTML tag inside the XML wrapper, including script tags containing javascript and iframes. Thus, you can do some pretty nifty visual effects.

Google also recommends that you add some descriptive information to your Gadget XML file before submitting it, including a title, description, thumbnail image and author contact information, among other things. This information is provided through attributes on the ModulePrefs tag. The only required attributes are title, description, author, and author_email - which are all pretty self explanatory. Check out this section of the Gadgets documentation for descriptions of all of the suggested attributes.

Step 3. Submit your Gadget

Once you’re satisfied with the functionality of your Gadget you can submit it to Google for inclusion in their Gadget Directory. The submission process is simple - just enter the URL of your Gadget’s XML file in an input box and hit Send (all of the contact and description information is in your Gadget’s XML file).

The moderation process for new gadgets is apparently manual, so it takes Google some time before they approve new submissions. But you don’t have to wait to use your new Gadget. Simply go to the Gadget Directory and click “Add by URL” next to the search button at the top of the page. Enter the URL for your Gadgets XML file, hit submit, and confirm that you want to add the gadget your page.

You can also market your new gadget by sending users to a link in the form of http://www.google.com/ig/add?moduleurl=<your gadget URL>. You can try it out with the Gadget I created.

That’s it! If you make anything cool be sure and leave a comment with a link so I can check it out. I think you’ll find that creating a Google Gadget is an excellent way to market your website for free with very little effort. Keep in mind that there’s a lot more you can do with Google Gadgets than I’ve discussed here. Check out Google’s developers guide to learn more.