Piwik\Plugins\CustomJsTracker\
Updates the Matomo (formerly Piwik) JavaScript Tracker "piwik.js" in case plugins extend the tracker.
Usage: StaticContainer::get('Piwik\Plugins\CustomJsTracker\TrackerUpdater')->update();
The class defines the following methods:
checkWillSucceed()
ash; Checks whether the Matomo JavaScript tracker file "piwik.js" is writable.update()
ash; Updates / re-generates the Matomo JavaScript tracker "piwik.js".checkWillSucceed()
Checks whether the Matomo JavaScript tracker file "piwik.js" is writable.
Exception
— In case the piwik.js file is not writable.update()
Updates / re-generates the Matomo JavaScript tracker "piwik.js".
It may not be possible to update the "piwik.js" tracker file if the file is not writable. It won't throw an exception in such a case and instead just to nothing. To check if the update would succeed, call checkWillSucceed().