Customizing the piwik tracking code: a dog chasing its own tail task


#1

In view of ongoing EU law about cookies, I have decided to renounce to Pikiw Cookies.
According to the documentation page How do I disable all cookies for a visitor? - Analytics Platform - Matomo I have to add two lines to the piwik tracking script “before the trackPageView() call”.
But how to change the piwik tracking script?
According to the documentation page How do I customise the JavaScript Tracker code on all websites at once? - Analytics Platform - Matomo I have to install the CustomTrackerJs plugin to add lines that “will be appended to the content of piwik.js.”

Now, my one million dollars question is:

HOW CAN I ADD LINES IN THE MIDDLE OF THE SCRIPT IF I HAVE TO USE A PLUGIN THAT ADDS LINES AT THE END OF THE SCRIPT?


#2

Any help?


(menre) #3

Help doesn’t seem to be coming enough from the piwik forum. No one is obliged to help anyone, but what is the essence of having a forum then?


(Matthieu Aubry) #4

Hi there,

HOW CAN I ADD LINES IN THE MIDDLE OF THE SCRIPT

You need to edit the Piwik code that you already put in your Piwik website to add this new one line to disable cookies