-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
BugFor errors / faults / flaws / inconsistencies etc.For errors / faults / flaws / inconsistencies etc.
Milestone
Description
See https://github.com/matomo-org/matomo/blob/4.0.5/plugins/PrivacyManager/Controller.php#L189 where it uses hard coded the path to /matomo.js
. However, the path may be changed through DI like this:
'Piwik\Plugins\CustomJsTracker\TrackerUpdater' => DI\decorate(function ($previous) {
$to = PIWIK_DOCUMENT_ROOT . '/';
$to .= \Piwik\SettingsPiwik::rewriteMiscUserPathWithInstanceId('misc/user/');
$to .= 'matomo.js';
$previous->setToFile($to);
return $previous;
}),
To get the correct path it might be better to use something like
StaticContainer::get('Piwik\Plugins\CustomJsTracker\TrackerUpdater')->getToFile()->getPath();
Metadata
Metadata
Assignees
Labels
BugFor errors / faults / flaws / inconsistencies etc.For errors / faults / flaws / inconsistencies etc.