mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-25 08:38:30 -05:00
Add analytics event for changing the language
This commit is contained in:
parent
b7c5a92f51
commit
09773e3186
1 changed files with 3 additions and 1 deletions
|
@ -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';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue