Adds browser name as parameter.

This commit is contained in:
damencho 2016-09-01 14:13:17 -05:00
parent 238e1f1bea
commit adb1b33441
1 changed files with 2 additions and 2 deletions

View File

@ -10,13 +10,13 @@
ga('send', 'pageview'); ga('send', 'pageview');
} }
Analytics.prototype.sendEvent = function (action, data, label) { Analytics.prototype.sendEvent = function (action, data, label, browserName) {
// empty label if missing value for it and add the value, // empty label if missing value for it and add the value,
// the value should be integer or null // the value should be integer or null
var value = Math.round(parseFloat(data)); var value = Math.round(parseFloat(data));
ga('send', 'event', 'jit.si', ga('send', 'event', 'jit.si',
action, label ? label : "", value ? value : null); action + '.' + browserName, label ? label : "", value ? value : null);
}; };
ctx.Analytics = Analytics; ctx.Analytics = Analytics;