|
@@ -10,11 +10,13 @@
|
10
|
10
|
ga('send', 'pageview');
|
11
|
11
|
}
|
12
|
12
|
|
13
|
|
- Analytics.prototype.sendEvent = function (action, data) {
|
14
|
|
- // empty label and add the value, the value should be integer or null
|
|
13
|
+ Analytics.prototype.sendEvent = function (action, data, label) {
|
|
14
|
+ // empty label if missing value for it and add the value,
|
|
15
|
+ // the value should be integer or null
|
15
|
16
|
var value = Math.round(parseFloat(data));
|
16
|
17
|
|
17
|
|
- ga('send', 'event', 'jit.si', action, "", value ? value : null);
|
|
18
|
+ ga('send', 'event', 'jit.si',
|
|
19
|
+ action, label ? label : "", value ? value : null);
|
18
|
20
|
};
|
19
|
21
|
|
20
|
22
|
ctx.Analytics = Analytics;
|