From 1739b7e0cc500a1ff52504d06a2b8c11ece49b83 Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Thu, 20 Feb 2020 20:09:03 -0600 Subject: [PATCH 1/2] Don't ask to enable analytics when Do Not Track is enabled Signed-off-by: Aaron Raimist --- src/components/structures/LoggedInView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/structures/LoggedInView.js b/src/components/structures/LoggedInView.js index 9597f99cd2..023272cef1 100644 --- a/src/components/structures/LoggedInView.js +++ b/src/components/structures/LoggedInView.js @@ -585,7 +585,8 @@ const LoggedInView = createReactClass({ limitType={usageLimitEvent.getContent().limit_type} />; } else if (this.props.showCookieBar && - this.props.config.piwik + this.props.config.piwik && + navigator.doNotTrack != 1 ) { const policyUrl = this.props.config.piwik.policyUrl || null; topBar = ; From 3a7454a52f4d39bea227be8184b16e15b68a4249 Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Fri, 28 Feb 2020 18:37:52 -0600 Subject: [PATCH 2/2] Use !== instead Signed-off-by: Aaron Raimist --- src/components/structures/LoggedInView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/LoggedInView.js b/src/components/structures/LoggedInView.js index 023272cef1..20217548b7 100644 --- a/src/components/structures/LoggedInView.js +++ b/src/components/structures/LoggedInView.js @@ -586,7 +586,7 @@ const LoggedInView = createReactClass({ />; } else if (this.props.showCookieBar && this.props.config.piwik && - navigator.doNotTrack != 1 + navigator.doNotTrack !== "1" ) { const policyUrl = this.props.config.piwik.policyUrl || null; topBar = ;