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:
Chris Garrity 2019-10-22 15:55:55 -04:00
parent 1ba161e3b1
commit b6a1569438
2 changed files with 10 additions and 2 deletions

View file

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

View file

@ -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) {