Do Not Track (DNT)

  • Updated

Do Not Track (DNT) is a popular browser setting that allows users to control their online privacy. For users, activating DNT in their browser allows them to communicate their personal tracking preferences to participating websites. 


Enabling DNT Support for Osano Cookie Consent

Do Not Track support can be set for a cookie consent configuration by enabling the "Support Do Not Track (DNT)" switch in the configuration settings. 

Cookie Consent - Do Not Track toggle.png

Testing DNT

To test Do Not Track, you will need an applicable browser or extension that supports the DNT signal. Once you have this, ensure DNT is enabled in your browser settings or via your extension.

Navigate to or Refresh your Website. You can check to ensure the signal is being passed by opening your developer tools in your browser, navigating to the console, and entering:


The value should read '1' to show that the DNT signal is being registered by the browser.

To test when DNT is not enabled by the browser, disable DNT by turning off the DNT signal in your desired extension or browser. Clear your Cookies and Cache and refresh the page. Open your developer tools in your browser, navigate to the console, and enter:


The value should now read 'null'.


Testing the DNT and the Cookie Consent Manager

Osano’s Cookie Consent (CMP) intercepts and respects DNT signals and records them within the Consent Object. When using Osano’s CMP, end-users can communicate their do not sell preferences, and Osano will record these preferences as well as update the users Do Not Sell preferences via the IAB CCPA framework

To test, turn on your DNT in your browser or via your extension. Clear your Cookies and Cache and refresh the page. Navigate to the webpage where you have Osano installed. 

If an end-user sends the DNT signal (by using a browser or browser extension that supports DNT), and: 

  • If the user is in the U.S.: 
      • Osano’s Cookie Consent solution listens to the DNT signal that is communicated by the user's browser. 
      • The Consent Record will record an "Opt_Out." (An Opt-Out coincides with the Do Not Sell switch and Marketing category). (Opt_Out = 'Accept', Marketing = 'Deny'). See Consent Object below for details on verifying this value. 
      • The Do-Not-Sell toggle in the Storage Preferences drawer is disabled in the opt-in position, the Marketing category is disabled in the opt-out position, and the usprivacy string is sent via the U.S. IAB framework. See IAB Do Not Sell docs for details on verifying this value. 
  • If the user is NOT in the U.S.:
      • The Consent Record will record an "Opt_Out." (An Opt-Out coincides with the Do Not Sell switch and no other categories). (Opt_Out = 'Accept')
      • Unless the customer is listening for the OPT_OUT via the Osano API and Event Listeners, no other changes occur. 

To view the Osano values based on the DNT signal, use the following call in the console to get the Consent Object:  

This will return something like the following:


The Opt_Out value will change depending on the DNT preference of the individual user. If DNT is enabled, this will always read "accept." If not enabled or turned off, this value will read "deny", but could change in certain locations based on user preference (ex. in the US if Do Not Sell is activated).