-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: _unsorted
Problem
== Inline Script Block
Line: 6
----
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
var d = document;
if ("${it.matomoSendUserID}") {
var userID, userIDNode, Nodes = d.getElementsByClassName('hidden-xs hidden-sm');
if (Nodes !== undefined) {
_paq.push(['setUserId', Nodes[0].textContent]);
}
}
(function () {
var u = "${it.protocolString}${it.matomoServer}${it.matomoPath}";
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', ${it.matomoSiteID}]);
var g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.async = true;
g.src = u + 'matomo.js';
s.parentNode.insertBefore(g, s);
})();
</script>
----
Solution
https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks