I’m trying to track a goal, therefore i use the following code:
echo '<script>_paq.push("trackGoal",2);</script>';
My console says _paq not defined, but when I add the tracking code to my header the console says:
matomo.js:22 The method setTrackerUrl is registered more than once in “_paq” variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: https://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers
ak @ matomo.js:22
matomo.js:22 The method setSiteId is registered more than once in “_paq” variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: https://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers
ak @ matomo.js:22
matomo.js:22 The method enableLinkTracking is registered more than once in “_paq” variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: https://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers
Does anybody know what i might be doing wrong?