Piwik code in head tag

I would normally put Piwik code into footer of one of my Wordpress sites, but every time there’s a theme update, the code gets deleted, and if I forget about it I get gaps in tracking.
The theme itself offers a place to put GA tracking code, but between tags.
I know there is asynchronous Piwik tracking that goes into head, but I wonder if there is anything wrong with putting regular code offered from website settings into head.


we recommend using WP-Piwik plugin to insert the javascript code in wordpress