mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-28 18:15:37 -05:00
Fix analytics issues
* Pass value `0` for email analytics event (everything was being reported as airdrop even when it was email) * Use `id` for assets (corresponds to the asset file name, e.g. Star.svg) instead of `fieldname` which is localized.
This commit is contained in:
parent
1ba161e3b1
commit
b6a1569438
2 changed files with 10 additions and 2 deletions
|
@ -521,7 +521,7 @@ export default class Library {
|
|||
|
||||
// Prevent reporting user asset names
|
||||
if (clickThumb) {
|
||||
var analyticsName = clickThumb.fieldname;
|
||||
var analyticsName = clickThumb.id;
|
||||
if (!(selectedOne in MediaLib.keys)) {
|
||||
analyticsName = 'user_asset';
|
||||
}
|
||||
|
@ -536,6 +536,14 @@ export default class Library {
|
|||
if (selectedOne) {
|
||||
ScratchJr.stage.currentPage.setBackground(selectedOne, ScratchJr.stage.currentPage.updateBkg);
|
||||
}
|
||||
|
||||
if (clickThumb) {
|
||||
var analyticsName = clickThumb.id;
|
||||
if (!(selectedOne in MediaLib.keys)) {
|
||||
analyticsName = 'user_background';
|
||||
}
|
||||
iOS.analyticsEvent('editor', 'choose_background', analyticsName);
|
||||
}
|
||||
Library.close(e);
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ export default class UI {
|
|||
shareEmail.id = 'infoboxShareButtonEmail';
|
||||
shareEmail.textContent = Localization.localize('SHARING_BY_EMAIL');
|
||||
shareEmail.ontouchstart = function (e) {
|
||||
UI.infoDoShare(e, nameField, shareLoadingGif, 1);
|
||||
UI.infoDoShare(e, nameField, shareLoadingGif, 0);
|
||||
};
|
||||
|
||||
if (isAndroid) {
|
||||
|
|
Loading…
Reference in a new issue