What is the recommended method to integrate the PiwikPro code into a WordPress website?
- Manually add the code to my header file?
- Using the PiwikPro WordPress plugin?
Regarding the plugin; it has very few users (less than 1000?!) and has not been updated for 4 months. Is this plugin still actively maintained and recommended?
Thanks a lot
The best way to integrate our product with WordPress is to use our official plugin. It’s actively maintained, but very stable, so there was no reason to release updates for a while. It replaced a previous version, so the usage stats are not completely accurate.
Thank you for your fast reply. I will just use the plugin then
When I use the WordPress plugin the code is installed after the closing /head tag.
It is before the closing /header tag but not in the /head like GA code is.
<noscript><iframe src="https://option-webdesign.containers.piwik.pro/0ac0d197-f254-48d9-9ffa-67ba0e222f8d/noscript.html" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><div id='wrap_all'>
This extra code is for what?
Anyone can help me with this? Need to setup 10 sites for my clients
Thanks a lot,
Sorry for the late reply @optipiwik,
Piwik PRO code has slightly different rules than GA’s snippet - it’s best to leave it as it is.
Basically, the WordPress plugin loads the Piwik PRO Tag Manager and not just Analytics. Because of that, it has an asynchronous tagging container which should be loaded from
<body> and a synchronous one that loads from
<head>. This way you can use both synchronous and asynchronous tags in our Tag Manager.
Let me know if this is a good explanation
Thanks for your help
In the meantime I have uninstalled the PiwikPro plugin from my WordPress sites… just because I don’t like to install plugins (already too many on my sites) if it is not necessary.
So I did install the code manully and placed it in the header.php file from my sites, just before the closing /head tag.
Maybe you can check on one of my sites to see if the code is installed correctly like this:
Thanks a lot!
It looks fine and should work. Keep in mind, that our recommendation is to place it right after the
<body> tag. Nevertheless, head also works.