Add analytics event for changing the language

This commit is contained in:
Tim Mickel 2016-02-03 15:34:41 -05:00
parent b7c5a92f51
commit 09773e3186

View file

@ -196,7 +196,9 @@ export default class Lobby {
languageButton.ontouchstart = function (e) { languageButton.ontouchstart = function (e) {
ScratchAudio.sndFX('tap.wav'); 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'; window.location = '?place=gear';
}; };
} }