History

Merge pull request #1686 from freeCodeCamp/do-not-track

Respect Do Not Track and Global Privacy Control

Oliver Eyton-Williams committed 4 years ago

Commit 210a1812 parents 35458b7 3e2b0f91 file · +2 −0Browse files

Unified · Split

assets/javascripts/lib/page.coffee+2−0
@@ -200,6 +200,8 @@ page.track = (fn) -> · 199 unmodified lines
200200
201201 track = ->
202202 return unless app.config.env == 'production'
203+ return if navigator.doNotTrack == '1'
204+ return if navigator.globalPrivacyControl
203205
204206 consentGiven = Cookies.get('analyticsConsent')
205207 consentAsked = Cookies.get('analyticsConsentAsked')