Add an option for Matomo Fix #991

This commit is contained in:
Amauri CHAMPEAUX 2022-10-18 17:57:38 +02:00
parent 6e93f6d766
commit 573b0fb0e1
1 changed files with 5 additions and 1 deletions

View File

@ -4424,7 +4424,11 @@ tarteaucitron.services.matomocloud = {
this.setVisitorCookieTimeout(getOriginalVisitorCookieTimeout());
}]);
if (tarteaucitron.user.matomoCustomJSPath === undefined) {
tarteaucitron.addScript('https://cdn.matomo.cloud/matomo.js', '', '', true, 'defer', true);
} else {
tarteaucitron.addScript(tarteaucitron.user.matomoCustomJSPath, '', '', true, 'defer', true);
}
// waiting for Matomo to be ready to check first party cookies
var interval = setInterval(function () {