1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 15:23:33 +00:00

cache analytics id in utils service

This commit is contained in:
Kyle Spearrin
2016-10-02 00:34:19 -04:00
parent 7129e8b3e6
commit ddd76357cd
2 changed files with 23 additions and 15 deletions

View File

@@ -1,18 +1,4 @@
var gaUtils = chrome.extension.getBackgroundPage().utilsService,
gaTrackingId = null;
if (gaUtils.isChrome()) {
gaTrackingId = 'UA-81915606-6';
}
else if (gaUtils.isFirefox()) {
gaTrackingId = 'UA-81915606-7';
}
else if (gaUtils.isEdge()) {
gaTrackingId = 'UA-81915606-9';
}
else if (gaUtils.isOpera()) {
gaTrackingId = 'UA-81915606-8';
}
var gaTrackingId = chrome.extension.getBackgroundPage().utilsService.analyticsId();
if (gaTrackingId) {
ga('create', gaTrackingId, 'auto');