I have a client with a privacy policy that says we will respect the DNT header coming from a browser. Does Sitecore automatically not track DNT visits or do I specifically have to disable tracking for that visitor?

What is the best approach assuming the latter?

  • 2
    According to www.sitecore.net privacy policy ( sitecore.net/legal/privacy-policy ): we do not look for or respond to "do not track" signals. So I don't expect Sitecore has any built in mechanisms for that. I don't know what is the best option to make sure DNT forces not to track, but you could try to set visitor classification to ROBOT - guess Sitecore should not track the visitor in that case but I never tested it myself Tracker.Current.Session.SetClassification(925, 925, true);
    – Marek Musielak
    Sep 27, 2017 at 9:43

1 Answer 1


As a comment suggests, the Sitecore does not react to the DNT signals, that is why you have to track it by yourself and stop the Analytics Tracker if there is a DNT header present.

You can check a DNT simply by checking the header value: Request.Headers["DNT"]

Please, refer to the below answer on how to stop tracking (personally, I suggest that you cancel the tracking in a pipeline processor): https://sitecore.stackexchange.com/a/1456/982

Your code will look something like this:

var doNotTrack = Request.Headers["DNT"];
if( doNotTrack == "1" ) {
    Sitecore.Analytics.Tracker.Enabled = false;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.