1. Documentation
  2. Consent Management
  3. Troubleshooting Consent Manager

Testing Osano Consent Manager

This article summarizes how to test the functionality of your Osano Consent Manager to ensure blocking behavior.

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('IAB success', uspData);
    } else {
    console.log('IAB failure', uspData);
    }
    });
  • See the IAB documentation to decode various responses received from the above call. 
    String Component Expected Values Definition
    Specification Version

    Number

    (1 char in string)

    The version of this string specification used to encode the string
    Notice/Opportunity to Opt Out

    ENUM

    (N = No, Y = Yes, - = Not Applicable)

    Have both of the following been provided: (i) notice pursuant to 1798.100(b) of the CCPA and (ii) the opportunity to opt out of the "sale" of personal information pursuant to 1798.120 and 1798.135 of the CCPA
    Opt-Out Sale

    ENUM

    (N = No, Y = Yes, - = Not Applicable. For use ONLY when CCPA does not apply.)

    Has user opted-out of the sale of his or her personal information pursuant to 1798.120 and 1798.135 of the CCPA? If CCPA applies, only Y (yes) or N (no) can be used.
    LSPA Covered Transaction

    ENUM

    (N = No, Y = Yes, - = Not Applicable)

    Publisher is a signatory to the IAB Limited Service Provider Agreement(LSPA) and the publisher declares that the transaction is covered as a “Covered Opt Out Transaction” or a “Non Opt Out Transaction” as those terms are defined in the Agreement.

    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('ping', 2, (pingReturn) => {
    console.log(pingReturn);
    });
    • If accessing from outside the EU, this will return a response similar to the following (NOTE: gdprApplies: false):  
      {gdprApplies: fales, cmpLoaded: false, apiVersion: "2.0"}
    • If accessing from outside the EU, this will return a response similar to the following (NOTE: gdprApplies: true): 
      {gdprApplies: true, cmpLoaded: true, apiVersion: "2.0"}