From 09773e31861ebf11ce2625d2efa24e5828977ba1 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Wed, 3 Feb 2016 15:34:41 -0500 Subject: [PATCH] Add analytics event for changing the language --- src/lobby/Lobby.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lobby/Lobby.js b/src/lobby/Lobby.js index d28a54a..9d05d7e 100644 --- a/src/lobby/Lobby.js +++ b/src/lobby/Lobby.js @@ -196,7 +196,9 @@ export default class Lobby { languageButton.ontouchstart = function (e) { ScratchAudio.sndFX('tap.wav'); - Cookie.set('localization', window.Settings.supportedLocales[e.target.textContent]); + let newLocale = window.Settings.supportedLocales[e.target.textContent]; + Cookie.set('localization', newLocale); + iOS.analyticsEvent('lobby', 'language_changed', newLocale); window.location = '?place=gear'; }; }