2016-09-28 04:44:42 +02:00
|
|
|
|
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';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (gaTrackingId) {
|
|
|
|
|
ga('create', gaTrackingId, 'auto');
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-28 05:35:07 +02:00
|
|
|
|
// version dimension
|
|
|
|
|
ga('set', 'dimension1', chrome.runtime.getManifest().version);
|
|
|
|
|
|
2016-09-28 04:44:42 +02:00
|
|
|
|
// Removes failing protocol check. ref: http://stackoverflow.com/a/22152353/1958200
|
|
|
|
|
ga('set', 'checkProtocolTask', function () { });
|
|
|
|
|
|
|
|
|
|
if (typeof isBackground !== 'undefined') {
|
|
|
|
|
ga('send', 'pageview', '/background.html');
|
|
|
|
|
}
|