@tsteur opened this Issue on December 14th 2020 Member

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();
This Issue was closed on December 17th 2020
Powered by GitHub Issue Mirror