Merge pull request #6 from LLK/language-analytics

Add analytics event for changing the language
This commit is contained in:
Tim Mickel 2016-02-03 15:38:18 -05:00
commit ef09a72724

View file

@ -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';
};
}