mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2025-02-17 17:01:12 -05:00
Revise cookie
This commit is contained in:
parent
e5d1e2ab10
commit
1862c41394
2 changed files with 4 additions and 12 deletions
|
@ -353,14 +353,11 @@ export default class iOS {
|
|||
}
|
||||
|
||||
static analyticsEvent (category, action, label, value) {
|
||||
if (!label) {
|
||||
label = '';
|
||||
}
|
||||
if (!value) {
|
||||
value = 1;
|
||||
}
|
||||
let newCategory = category + AppUsage.currentUsage;
|
||||
tabletInterface.analyticsEvent(newCategory, action, label, value);
|
||||
let usageLabel = label ? AppUsage.currentUsage + label : AppUsage.currentUsage;
|
||||
tabletInterface.analyticsEvent(category, action, usageLabel, value);
|
||||
}
|
||||
|
||||
// Web Wiew delegate call backs
|
||||
|
|
|
@ -8,13 +8,8 @@ export default class AppUsage {
|
|||
}
|
||||
|
||||
static initUsage () {
|
||||
var usageCookie = Cookie.get('usage');
|
||||
if (usageCookie === null || usageCookie === 'noanswer') {
|
||||
currentUsage = '';
|
||||
} else {
|
||||
currentUsage = '_' + usageCookie;
|
||||
}
|
||||
|
||||
const usageCookie = Cookie.get('usage');
|
||||
currentUsage = usageCookie ? usageCookie + '::' : '';
|
||||
}
|
||||
|
||||
static askForUsage () {
|
||||
|
|
Loading…
Reference in a new issue