I discovered Piwik a few weeks ago and decided to migrate my sites from GA to Piwik. I also have a couple of Trac installations to monitor, so I took the TracGoogleAnalytics plugin and adapted it to Piwik. It’s on Bitbucket
You can also download it at PyPi:
Please note that you need the newly released Piwik 0.4 for this trac plugin.