"Force tracking without cookies" and upgrading Matomo

Our site is using the “Force tracking without cookies”, which says:

Enabling this option will automatically update matomo.js, so it contains some additional code to ensure all trackers won’t use cookies. Additionally Matomo will ignore all tracking cookies on server side.

Cookies will be disabled even when using the consent methods in Matomo tracker and calling for example the cookie consent methods won’t enable cookies.

When installing a new version of Matomo, the previous versions of matomo.js and piwik.js get overwritten by the files that ship in the downloaded tarball. I ran /var/www/matomo/console core:update, but there were no migrations.

My concern is that the help text says that enabling that feature changes the JS files, but Matomo might not know to change it again after this upgrade. Are any further steps necessary?

Thanks! : )

Hi,

That’s a great question.

The CustomJSTracker plugin that is responsible for all of these matomo.js modifications is run after every update and plugin install/uninstall:

But you are right that there could be situations where this update won’t work (e.g. you accidentally revoke Matomo the write permissions to matomo.js), so the savest way is still to update the tracking code.
See here for more discussion on this: