The Solution consists of two seperate SiteCollection-features:

This is a snapshot of the configuration page which is accessible via SiteSettings:

The GoogleAnalytics-script will be injected via a DelegateControl which must be present in the head of the MasterPage.

The sourcecode and package is available for download from Codeplex Subversion.
Over here you'll be able to find a blog of Wesley Baker which also has a Google Analytics Solution. I reused some of his ideas for my implementation.