Not really being able to properly use Google Analytics together with iWeb has been bothering me for a while. I've been checking the source iWeb output, and came up with a rather simple, semi-automatic (lacking some AppleScript skills to make it fully automatic) solution using BBedit. (This should also work with any other text editor that supports multi-file search and replace.)
Using BBEdit's Search function, I made a multi-file search through all of the iWeb project's .html files, searching for...
</body>
...and telling BBedit to replace it with this:
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "##-######-#";
urchinTracker();
</script>
</body>
Replace the ##-######-# with your site's tracking ID. Now just save this as a search pattern, and every time after publishing your site to a folder (~/Sites in my case), just apply it to that folder.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20061220033306772