So I made my first Google Module (if this doesn't ring a bell, go here and note all the little boxes with headlines, the weather, etc. You can close em, drag them around, and if you have a google account you can add just the ones you want and have a busy homepage...) My module is really simple: basically it screen scrapes my sitemeter page and displays my hit total for the day and the last hour, and shows a list of my recent referrals. Very boring really; it looks like this:
You can actually add this as a module to your own Google homepage if you're interested by searching in the Module Directory for sitemeter (it hasn't shown up yet, but I submitted it, so I assume it will) or by clicking this Google Module button: Once you've added it, it will refuse to display till you give it your sitemeter sitename (this is your username at sitemeter; mine is sm2metapundit, for example).
I decided I should try to extract the actual content and at this point my 20 lines of regexes started to break down. It occurred to me at that regexes might not be the best tool for the job: maybe using the DOM would be easier.
Update: Hmm. Having used my module for a day I decided it would be a good idea to eliminate XSS attacks if possible. Yes, browser referrers are user input, and what do we say about user input? NEVER trust it... Anyhoo, it's fixed.
Update: Welcome Sitemeter Blog readers. I made a couple more updates per David's suggestion: your Sitemeter Codename displays in the title now (in case you are monitoring several sites at once) and I tweaked the text in the preferences section . I'm also considering letting you add multiple Codenames and displaying just the summary line for each. Anybody interested? I welcome suggestions from people who are using this.
Oh yes, and I thought I should point out that you can only use the module if your site stats are public (Privacy Level "normal" in your sitemeter manager).
Update: Switched hosting of Sitemeter module away from Google Base due to changes in how Google displays html. The Install button above reflects the new change...