GA events fix

pull/3/head
Szekeres Bálint 7 years ago
parent 3c8639e35e
commit d9453899ef

@ -81,9 +81,9 @@
for (var key in hashData) { for (var key in hashData) {
if ($scope.data[key] !== undefined && typeof $scope.data[key] === typeof hashData[key]) { if ($scope.data[key] !== undefined && typeof $scope.data[key] === typeof hashData[key]) {
$scope.data[key] = hashData[key]; $scope.data[key] = hashData[key];
gtag('event', 'data_from_hash', { gtag('event', key, {
event_label: key, event_category: 'data_from_hash',
event_value: hashData[key], event_label: hashData[key],
}); });
} }
} }
@ -114,8 +114,8 @@
}; };
$scope.clipboardSuccess = function(key) { $scope.clipboardSuccess = function(key) {
gtag('event', 'clipboard', { gtag('event', key, {
event_label: key, event_category: 'clipboard',
}); });
}; };
@ -130,9 +130,9 @@
for (var key in $scope.data) { for (var key in $scope.data) {
if (!angular.equals(newValue[key], oldValue[key])) { if (!angular.equals(newValue[key], oldValue[key])) {
gtag('event', 'data_changed', { gtag('event', key, {
event_label: key, event_category: 'data_changed',
event_value: $scope.data[key], event_label: $scope.data[key],
}); });
} }
} }

Loading…
Cancel
Save