Hi,
first … thanks for the great work on this plugin.
I discovered a bug that causes custom variables not to work (if the 5th pair of custom variables is not filled out). I don’t know how to send a pull request, so I post it here.
See Line 260 of wp-piwik.php
https://plugins.trac.www.ads-software.com/browser/wp-piwik/trunk/wp-piwik.php#L260
if (!empty($strMetaKey)) $strTrackingCode = str_replace("_paq.push(['trackPageView']);", $strCustomVars."_paq.push(['trackPageView']);", $strTrackingCode);
To make it work, swap the variable in the if-clause (currently $strMetaKey
) with $strTrackingCode
.
Current workaround would be to set the last (5th) pair of custom variables.
Another really important feature would be the implementation of some filters to give developers more control on the output. I think this would not be too hard – just a few lines of code – and the benefit for theme-developers is great. Let me know when you need help or a suggestion.
Currently it’s not possible to programmatically change parameters (e.g. set post terms as custom variable, change the Document Title, etc).
Thanks for reading!