-
-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b87776d
commit f648f11
Showing
2 changed files
with
36 additions
and
32 deletions.
There are no files selected for viewing
52 changes: 27 additions & 25 deletions
52
...s/com/smartcodeltd/jenkinsci/plugins/buildmonitor/BuildMonitorView/collect-usage-stats.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; | ||
window.addEventListener("DOMContentLoaded", () => { | ||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; | ||
|
||
const { | ||
buildMonitorVersion, | ||
jenkinsVersion, | ||
installationSize, | ||
itemsSize, | ||
installationAudience, | ||
anonymousCorrelationId | ||
} = document.querySelector('.build-monitor-ga-data-holder').dataset; | ||
const { | ||
buildMonitorVersion, | ||
jenkinsVersion, | ||
installationSize, | ||
itemsSize, | ||
installationAudience, | ||
anonymousCorrelationId | ||
} = document.querySelector('.build-monitor-ga-data-holder').dataset; | ||
|
||
ga('create', 'UA-61694827-4', 'auto', { | ||
'userId': anonymousCorrelationId, | ||
'sampleRate': 1 | ||
}); | ||
ga('create', 'UA-61694827-4', 'auto', { | ||
'userId': anonymousCorrelationId, | ||
'sampleRate': 1 | ||
}); | ||
|
||
ga('set', { | ||
'forceSSL': true, | ||
'appName': 'Build Monitor', | ||
'appId': 'build-monitor-plugin', | ||
ga('set', { | ||
'forceSSL': true, | ||
'appName': 'Build Monitor', | ||
'appId': 'build-monitor-plugin', | ||
|
||
'appVersion': buildMonitorVersion, | ||
'appInstallerId': jenkinsVersion, | ||
'appVersion': buildMonitorVersion, | ||
'appInstallerId': jenkinsVersion, | ||
|
||
'dimension1': installationSize, | ||
'dimension2': itemsSize, | ||
'dimension3': installationAudience, | ||
'dimension4': anonymousCorrelationId | ||
}); | ||
'dimension1': installationSize, | ||
'dimension2': itemsSize, | ||
'dimension3': installationAudience, | ||
'dimension4': anonymousCorrelationId | ||
}); | ||
|
||
ga('send', 'screenview', {screenName: 'Dashboard'}); | ||
ga('send', 'screenview', {screenName: 'Dashboard'}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters