Since I don't use Google Analytics but Piwik which is self-hosted, I thought I'd share my very basic Piwik tracking plugin. It's loosely based on Jesse Freeman's GA tracking.js

How to use and install is in the gist:

https://gist.github.com/cmaas/3fccc84a3546fcd16cf9