edit analytics events

This commit is contained in:
Ayo 2019-12-08 20:26:23 +08:00
parent d83d148062
commit 6e4f597158

View file

@ -268,6 +268,15 @@ export const Minesweeper = function() {
timerService.initialize(timerDisplay); timerService.initialize(timerDisplay);
updateFlagsCountDisplay(); updateFlagsCountDisplay();
addMines(setting.mines); addMines(setting.mines);
// send google analytics event
if (gtag) {
gtag('event', 'mw-event', {
'event_category' : 'mw-game',
'event_label' : 'loaded-game'
});
}
} }
function setBusy() { function setBusy() {
@ -519,7 +528,7 @@ export const Minesweeper = function() {
if (gtag) { if (gtag) {
gtag('event', 'mw-event', { gtag('event', 'mw-event', {
'event_category' : 'mw-game', 'event_category' : 'mw-game',
'event_label' : 'end-game-a' 'event_label' : 'ended-game'
}); });
} }
} }
@ -684,7 +693,7 @@ export const Minesweeper = function() {
if (gtag) { if (gtag) {
gtag('event', 'mw-event', { gtag('event', 'mw-event', {
'event_category' : 'mw-game', 'event_category' : 'mw-game',
'event_label' : 'start-game-a' 'event_label' : 'activated-game'
}); });
} }
} }