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
200 200
201track = ->201track = ->
202 return unless app.config.env == 'production'202 return unless app.config.env == 'production'
203 return if navigator.doNotTrack == '1'
204 return if navigator.globalPrivacyControl
203 205
204 consentGiven = Cookies.get('analyticsConsent')206 consentGiven = Cookies.get('analyticsConsent')
205 consentAsked = Cookies.get('analyticsConsentAsked')207 consentAsked = Cookies.get('analyticsConsentAsked')