diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 95aabef..437f1a2 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -4424,7 +4424,11 @@ tarteaucitron.services.matomocloud = { this.setVisitorCookieTimeout(getOriginalVisitorCookieTimeout()); }]); - tarteaucitron.addScript('https://cdn.matomo.cloud/matomo.js', '', '', true, 'defer', true); + 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 () {