mirror of
https://github.com/vector-im/element-web.git
synced 2025-10-17 10:21:44 +02:00
Update comment and clear up localstorage on disabling
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
8d445d54ec
commit
0c4ee0091e
@ -195,8 +195,7 @@ class Analytics {
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable Analytics calls, will not fully unload Piwik until a refresh,
|
||||
* but this is second best, Piwik should not pull anything implicitly.
|
||||
* Disable Analytics, stop the heartbeat and clear identifiers from localStorage
|
||||
*/
|
||||
disable() {
|
||||
if (this.disabled) return;
|
||||
@ -204,6 +203,10 @@ class Analytics {
|
||||
window.clearInterval(this._heartbeatIntervalID);
|
||||
this.baseUrl = null;
|
||||
this.visitVariables = {};
|
||||
localStorage.removeItem(UID_KEY);
|
||||
localStorage.removeItem(CREATION_TS_KEY);
|
||||
localStorage.removeItem(VISIT_COUNT_KEY);
|
||||
localStorage.removeItem(LAST_VISIT_TS_KEY);
|
||||
}
|
||||
|
||||
async _track(data) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user