Testing Osano Consent Manager

To test the Osano consent manager's blocking behavior, ensure that the osano.js exists on the site and that it is published in "permissive" or "strict" mode. Permissive and strict modes will behave differently in terms of what is blocked and allowed. Please refer to the Compliance Modes documentation to ensure the differences are understood. 

NOTE: Osano will block or allow scripts and cookies based on how you have classified them within the Osano application. Please be sure you have published any classifications you have added or modified before testing. 


Testing Blocking Behavior of Osano CMP

Start with a clean browser. We recommend opening a brand new incognito or private window. If given the option, ensure the "Block third-party cookies" option is turned off to simulate a normal browsing session. Ensure that you have no other incognito or private windows open. 

If you are not using an incognito or private window, be sure to clear all storage and trackers before testing: Clear your history, cache, cookies, local storage...everything. Then restart the browser (i.e., fully close and re-open a new browser window). 

Once your browser is ready, open your developer tools:

  • In Chrome, Right-Click > Inspect
  • In Firefox, Right-Click > Inspect Element
  • In Edge, Right-Click > Inspect 
  • in Safari, Develop Menu > Show Web Inspector


Testing Scripts

  • From the developer tools, click on the "Network" tab. 
  • In the "Network" tab, isolate JS (Javascript). 

  • Navigate to the website where you have your osano.js installed. 
  • You should see (1) the Osano cookie popup load on the page and (2), at minimum, all scripts classified as "Essential" loading on the page. 
    • You will also see additional scripts loading depending on your Compliance Mode and your Location. Refer to "Consent Dialog Regions" to check default behavior on a country-by-country basis. 
  • For testing purposes, accept/deny all categories on the initial popup. 
  • Open your storage preferences and turn off all categories but "Essential," then save.
  • Clear your network tab and refresh the page. 

  • You should see ONLY scripts classified as "Essential" loading on the page. (You may see additional, non-essential scripts loading if you are operating in "Permissive" mode.)

  • Open your storage preferences and turn on "Marketing," then save. 
  • You will be able to see the scripts classified as "Marketing" load immediately in most cases.

You can then repeat these steps with all other categories. 


Testing Cookies

Refresh cookies in the console.

  • From the developer tools, click on the "Applications" tab (Depending on the browsers, this might be called "Storage").

  • Navigate to the website where you have your osano.js installed.
  • Expand the "Cookies" list.
  • Refresh cookies in the console. 
  • You should see (1) the Osano cookie popup load on the page and (2), at minimum, all cookies classified as "Essential" loading on the page. 
    • You will also see additional cookies loading depending on your Compliance Mode and your Location. Refer to "Consent Dialog Regions" to check default behavior on a country-by-country basis. 
  • For testing purposes, accept/deny all cookie categories on the initial popup. 
  • Open your storage preferences and turn off all categories but "Essential," then save. 
  • Clear your cookies and refresh the page. 

  • You should see ONLY scripts classified as "Essential" loading on the page. (You may see additional, non-essential scripts loading if you are operating in "Permissive" mode. 

  • Open your storage preferences and turn on "Marketing," then save. 
  • Reload the page (or refresh cookies)
  • You will now be able to see the cookies classified as both "Essential" and "Marketing."  

  • You can then repeat these steps with all other categories. 

Special Testing Scenarios:

IAB (CCPA Framework - Do Not Sell)

  • To test IAB CCPA, open your developer tools and go to "Console." 
  • Navigate to the website where you have your osano.js installed.
  • Copy/paste the code below into your browser console:
__uspapi(‘getUSPData’, 1, (uspData, success) => {if(success) {
 console.log(‘success’, uspData);} else {
 console.log(‘IAB failure’, uspData);}});
  • The following responses can be seen in your console when testing the above:
  • When no consent is given:
{uspString: “1Y-Y”}<br>
  • When Do Not Sell is ACTIVE (switch turned ON)
{uspString: “1YYY”}
  • When Do Not Sell is INACTIVE (switch turned OFF)
{uspString: “1YNY”}

IAB TCF 2.0 (EU Framework)

  • To test IAB TCF 2.0, ensure you have the TCF 2.0 option turned on in Osano. 
  • Open your developer tools and go to "Console." 
  • Navigate to the website where you have your osano.js installed.
  • Copy/paste the code below into your browser console:
__tcfapi('getTCData', 2, (tcData, success) => { if(success) { console.log(tcData) }}); <br>
  • If accessing from outside the EU, this will return a response similar to the following (NOTE: gdprApplies: false): 
{tcString: "CPDOJl8PDOJl8EXABBENA3CwAP_AAAAAAAAAAAAAAAACAAAA.YAAAAAAAAAAA", tcfPolicyVersion: 2, cmpVersion: 1, cmpId: 279, gdprApplies: false, &hellip;}cmpId: 279cmpLoaded: truecmpStatus: "loaded"cmpVersion: 1displayStatus: "visible"eventStatus: "tcloaded"gdprApplies: falseisServiceSpecific: truepublisherCC: "US"purpose: {consents: {&hellip;}, legitimateInterests: {&hellip;}}purposeOneTreatment: falsetcString: "CPDOJl8PDOJl8EXABBENA3CwAP_AAAAAACiQAAAAAAAAAAACAAAA.YAAAAAAAAAAA"tcfPolicyVersion: 2useNonStandardStacks: false__proto__: Object
  • If accessing from outside the EU, this will return a response similar to the following (NOTE: gdprApplies: true): 
{tcString: "CPDOKJpPDOKJpEXABBENA3AAAAAAAAAACAAAA.YAAAAAAAAAAA", tcfPolicyVersion: 2, cmpVersion: 1, cmpId: 279, gdprApplies: true, &hellip;}cmpId: 279cmpLoaded: truecmpStatus: "loaded"cmpVersion: 1displayStatus: "visible"eventStatus: "tcloaded"gdprApplies: trueisServiceSpecific: truepublisherCC: "DE"purpose: {consents: {&hellip;}, legitimateInterests: {&hellip;}}purposeOneTreatment: falsetcString: "CPDOKJpPDOKJpEXABBENA3CwAAAAAAAAAAYgAiAAAAAAAAAAAACAAAA.YAAAAAAAAAAA"tcfPolicyVersion: 2useNonStandardStacks: false__proto__: Object<br>
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.