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

Respect Do Not Track and Global Privacy Control
pull/1688/head
Oliver Eyton-Williams 3 years ago committed by GitHub
commit 210a181491
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -200,6 +200,8 @@ page.track = (fn) ->
track = -> track = ->
return unless app.config.env == 'production' return unless app.config.env == 'production'
return if navigator.doNotTrack == '1'
return if navigator.globalPrivacyControl
consentGiven = Cookies.get('analyticsConsent') consentGiven = Cookies.get('analyticsConsent')
consentAsked = Cookies.get('analyticsConsentAsked') consentAsked = Cookies.get('analyticsConsentAsked')

Loading…
Cancel
Save