alphagov / govuk-prototype-kit-private-beta

⚠️ This repository has been archived and the changes have been merged into https://github.com/alphagov/govuk-prototype-kit
MIT License
1 stars 2 forks source link

Do not track users who have enabled 'DoNotTrack' #52

Closed NickColley closed 6 years ago

NickColley commented 6 years ago

Adds a guard around Google Tag Manager script to prevent it from initialising, for users who have indicated they do not want to be tracked.

https://trello.com/c/jHVUmpdx/957-do-not-track-users-with-donottrack-enabled

kr8n3r commented 6 years ago

changelog

side note: i get undefined when i check for req.header('DNT') if DNT is disabled. should be 0 i assume

NickColley commented 6 years ago

@igloosi by default a browser will not send a header, so it'll be undefined.

There's an unlikely chance someone would set DNT to 0, I'm not sure how though.