From 3e2b0f9ac64f811e64b77220eeb84709686280b0 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 7 Jan 2022 19:56:43 +0100 Subject: [PATCH] Respect Do Not Track and Global Privacy Control --- assets/javascripts/lib/page.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/javascripts/lib/page.coffee b/assets/javascripts/lib/page.coffee index 7a5329f6..5ad89b32 100644 --- a/assets/javascripts/lib/page.coffee +++ b/assets/javascripts/lib/page.coffee @@ -200,6 +200,8 @@ page.track = (fn) -> track = -> return unless app.config.env == 'production' + return if navigator.doNotTrack == '1' + return if navigator.globalPrivacyControl consentGiven = Cookies.get('analyticsConsent') consentAsked = Cookies.get('analyticsConsentAsked')