have an "enable piwik" in backend with url & id for the piwik instance. Maybe it would be worth looking at http://forge.2metz.fr/p/python-piwik/