I’ve had one up for a while too, based on the ncyoung refererLib package. Code’s here:
https://www.ben-johnson.org/blog/refererLib.new.phps
It also includes a function that’ll keep track of who comes to your page via Google and displays the query strings they use to get there.
The code on there is a little outdated – I’m migrating over to the current CVS version this weekend, and I’ll be uploading a new copy with the following fixes:
* Now uses WP’s database connections, so you don’t need to plug in your username, password, etc.
* Code cleaned up
Since we’ve got Smarty templates in CVS now, I’ll get it turned into a plugin at some point soon.