mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
opt out based on analyticsOptOut localSetting
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
28d929f901
commit
3e7ef112f0
1 changed files with 2 additions and 2 deletions
|
@ -280,8 +280,8 @@ async function loadApp() {
|
||||||
} else if (validBrowser) {
|
} else if (validBrowser) {
|
||||||
UpdateChecker.start();
|
UpdateChecker.start();
|
||||||
|
|
||||||
const doNotTrack = navigator.doNotTrack === 'yes' || navigator.doNotTrack === '1' || navigator.doNotTrack === 1;
|
const analyticsEnabled = !UserSettingsStore.getLocalSetting('analyticsOptOut', false);
|
||||||
if (!doNotTrack && configJson.piwik && configJson.piwik.url && configJson.piwik.siteId) {
|
if (analyticsEnabled && configJson.piwik && configJson.piwik.url && configJson.piwik.siteId) {
|
||||||
(function() {
|
(function() {
|
||||||
const g = document.createElement('script');
|
const g = document.createElement('script');
|
||||||
const s = document.getElementsByTagName('script')[0];
|
const s = document.getElementsByTagName('script')[0];
|
||||||
|
|
Loading…
Reference in a new issue