mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 09:46:09 +03:00
Default to Anonymous tracking when no OptIn setting is present
This commit is contained in:
parent
a6df687196
commit
4048cb3c37
1 changed files with 5 additions and 3 deletions
|
@ -172,17 +172,19 @@ export class PosthogAnalytics {
|
|||
// determine the current anonymity level based on curernt user settings
|
||||
|
||||
// "Send anonymous usage data which helps us improve Element. This will use a cookie."
|
||||
const analyticsOptIn = SettingsStore.getValue("analyticsOptIn");
|
||||
const analyticsOptIn = SettingsStore.getValue("analyticsOptIn", null, true);
|
||||
|
||||
// (proposed wording) "Send pseudonymous usage data which helps us improve Element. This will use a cookie."
|
||||
//
|
||||
// TODO: Currently, this is only a labs flag, for testing purposes.
|
||||
const pseudonumousOptIn = SettingsStore.getValue("feature_pseudonymousAnalyticsOptIn");
|
||||
const pseudonumousOptIn = SettingsStore.getValue("feature_pseudonymousAnalyticsOptIn", null, true);
|
||||
|
||||
let anonymity;
|
||||
if (pseudonumousOptIn) {
|
||||
anonymity = Anonymity.Pseudonymous;
|
||||
} else if (analyticsOptIn) {
|
||||
} else if (analyticsOptIn || analyticsOptIn === null) {
|
||||
// If no analyticsOptIn has been set (i.e. before the user has logged in, or if they haven't answered the
|
||||
// opt-in question, assume Anonymous)
|
||||
anonymity = Anonymity.Anonymous;
|
||||
} else {
|
||||
anonymity = Anonymity.Disabled;
|
||||
|
|
Loading…
Reference in a new issue