Skip to content

Commit 3c152b7

Browse files
committed
fix issue with UserID statistics.
1 parent a4c89eb commit 3c152b7

File tree

1 file changed

+2
-4
lines changed
  • src/main/resources/io/jenkins/plugins/matomoanalytics/MatomoPageDecorator

1 file changed

+2
-4
lines changed

src/main/resources/io/jenkins/plugins/matomoanalytics/MatomoPageDecorator/footer.jelly

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
_paq.push(['trackPageView']);
1010
_paq.push(['enableLinkTracking']);
1111
var d = document;
12-
if ("${it.sendUserID}") {
12+
if (${it.sendUserID}) {
1313
var userID, userIDNode, Nodes = d.getElementsByClassName('hidden-xs hidden-sm');
1414
if (Nodes !== undefined) {
15-
userIDNode = Nodes[0];
16-
userID = userIDNode.textContent;
17-
_paq.push(['setUserId', userID]);
15+
_paq.push(['setUserId', Nodes[0].textContent]);
1816
}
1917
}
2018
(function () {

0 commit comments

Comments
 (0)