Hi,
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
http://bitbucket.org/piquadrat/tracpiwik/
You can also download it at PyPi:
http://pypi.python.org/pypi/TracPiwik/
Please note that you need the newly released Piwik 0.4 for this trac plugin.