You can use the native Do Not Track setting in browsers in combination with Google Tag Manager to better honor visitorsâ€™ requests not to be tracked.
This method prevents trackers in Google Tag Manager from being loaded for visitors who have turned on Do Not Track. This can ensure that your website is not serving tracking bugs, beacons, or pixels at all to users who have chosen not to be tracked, regardless of whether those 3rd parties are honoring the Do Not Track request.
For one website that I run, Iâ€™ve decided on a trial basis to use this method to not load pixels from Google AdWords, Facebook, Twitter, MailChimp, and LinkedIn for users who have Do Not Track enabled, but I am still serving Google Analytics code to everyone, leaving the honoring of Do Not Track to Google Analytics in that case.
This is definitely not for everyone, and depending on your setup and what tags you choose to apply this to, it can completely break things like conversion tracking and remarketing (but thatâ€™s kind of the idea behind Do Not Track). This is a nice way to be more honest & fair as a marketing technologist toward people who have specifically requested not to be tracked, and youâ€™ll give those people faster page load times to boot.
In Google Tag Manager, enter the Container where youâ€™ll be limiting tracking.
Click â€œVariables,â€ then â€œNew,â€ then â€œVariable Configuration.â€
For â€œGlobal Variable Name,â€ enter:
Name this new GTM variable something other than â€œUntitled Variable,â€ like â€œDo Not Track.â€
Next, youâ€™ll create a Trigger that reads your new Do Not Track GTM variable.
Click â€œTriggers,â€ then â€œNew,â€ then â€œTrigger Configuration.â€
For â€œChoose trigger type,â€ select â€œPage View.â€
Switch â€œThis trigger fires onâ€ to â€œSome Page Views.â€
Under â€œFire this trigger when an Event occurs and all of these conditions are true,â€
- Set the first dropdown to â€œDo Not Trackâ€ (or whatever you named your GTM variable)
- Set the next dropdown to â€œequalsâ€
- Enter the number 1 in the third input field
Click away from the Trigger Configuration card, and see â€œThis trigger fires onâ€ followed by â€œDo Not Track equals 1â€ (again, you may have named your GTM variable differently).
Name this new GTM trigger something other than â€œUntitled Trigger,â€ like â€œDo Not Track Enabled.â€
Finally, youâ€™ll apply this Trigger to existing Tags that you want to not load when a user has Do Not Track turned on.
Choose â€œTags,â€ then click on Tag.
Click on the â€œTriggeringâ€ card to enter editing mode.
If you have no triggering exceptions set up for this Tag, click â€œADD EXCEPTION.â€ If you already have triggering exceptions, click the â€œ+â€ next to â€œExceptions.â€
For â€œChoose a trigger,â€ select â€œDo Not Track Enabledâ€ (or whatever you called your GTM trigger).
Enter Preview and Debug mode if you wish and test this configuration, and when youâ€™re ready to go live with this change, Publish your Container.
Thatâ€™s it, youâ€™re done! Youâ€™ve made your website a better experience for users who are requesting more privacy.