💡Friendly reminder: if you include analytics or other tracking scripts on your site, please respect the “Do Not Track” client setting. You can check for it like this:

function allowsTracking() {
const dnt =
window.doNotTrack ||
navigator.doNotTrack ||
navigator.msDoNotTrack
if (dnt === 1 || dnt === '1' || dnt === 'yes') {
return false
}
if ('msTrackingProtectionEnabled' in window.external) {
return !window.external.msTrackingProtectionEnabled()
}
return true
}

if (allowsTracking()) {
// Analytics Tracking Code Here
}
  • 0
  • 0

No mentions yet.