This guide provides detailed instructions for testing the Osano Consent Manager’s blocking behavior, ensuring all scripts and cookies are appropriately managed according to the consent provided by users. It covers essential steps for both script and cookie testing and includes special scenarios like IAB CCPA and IAB TCF 2.0 frameworks.
Prerequisites
Before testing, ensure that:
- osano.js is correctly integrated on your site.
- The Consent Manager is published in either "Permissive" or "Strict" mode. The behavior will differ based on the selected mode. Refer to Compliance Modes documentation for a detailed comparison.
- All scripts and cookies have been accurately classified within the Osano application, and these classifications have been published.
Note: Osano blocks or allows scripts and cookies based on the classifications you define. Unpublished changes will not reflect in your tests, so ensure all modifications are published before proceeding.
Testing Blocking Behavior of Osano CMP
Step 1: Prepare Your Testing Environment
Browser Preparation:
-
Use Incognito/Private Mode: Start with a new incognito or private browsing session to avoid interference from existing cookies and cache. Ensure that the "Block third-party cookies" option is turned off for a standard browsing simulation.
-
No Open Incognito Windows: Ensure no other incognito or private windows are open, as multiple sessions can cause unexpected behavior.
-
If Not Using Incognito Mode: Manually clear all browser storage:
- Clear history, cache, cookies, local storage, and other site data for "all time".
- Fully restart the browser to ensure a clean slate.
Developer Tools Access:
- In Chrome: Right-Click > Inspect
- In Firefox: Right-Click > Inspect Element
- In Edge: Right-Click > Inspect
- In Safari: Develop Menu > Show Web Inspector
Step 2: Testing Script Blocking
-
Open Developer Tools and Network Tab:
- Navigate to the Network tab within your browser's developer tools.
- Filter the network traffic to isolate JavaScript files by selecting JS.
-
Navigate to Your Website:
- Visit the site where osano.js is implemented.
- Observe the behavior:
- The Osano cookie popup should appear.
- At a minimum, scripts classified as "Essential" should load automatically.
- Depending on your Compliance Mode and Location, additional scripts may load. Refer to the Consent Dialog Regions documentation for country-specific behaviors.
-
Test Blocking Behavior by Category:
-
Initial Consent Action:
- Accept or deny all categories in the initial popup.
- Open storage preferences and disable all categories except "Essential." Save your preferences.
-
Initial Consent Action:
-
-
Refresh Network Tab and Reload Page:
- Clear the network tab and refresh the page.
- Confirm that only "Essential" scripts are loading. (Note: In "Permissive" mode, additional non-essential scripts may still load.)
-
Refresh Network Tab and Reload Page:
-
-
Test Additional Categories:
- Enable the "Marketing" category and save your preferences.
- Scripts classified as "Marketing" should load immediately.
- Repeat these steps for all other categories to verify that only the selected category’s scripts are loading.
-
Test Additional Categories:
Step 3: Testing Cookie Blocking
-
Open Developer Tools and Application Tab:
- Navigate to the Application tab (or Storage tab in some browsers) within your developer tools.
- Expand the Cookies list to view cookies set by your site.
-
Navigate to Your Website:
- Visit the site where osano.js is implemented.
- Observe the behavior:
- The Osano cookie popup should appear.
- At a minimum, cookies classified as "Essential" should load automatically.
- As with scripts, additional cookies may load based on your Compliance Mode and Location. Refer to the Consent Dialog Regions documentation for details.
-
Test Blocking Behavior by Category:
-
Initial Consent Action:
- Accept or deny all cookie categories in the initial popup.
- Open storage preferences and disable all categories except "Essential." Save your preferences.
-
Initial Consent Action:
-
-
Clear Cookies and Reload Page:
- Clear all cookies in the developer tools console and refresh the page.
- Confirm that only "Essential" cookies are loading. (Note: In "Permissive" mode, additional non-essential cookies may still load.)
-
Clear Cookies and Reload Page:
-
-
Test Additional Categories:
- Enable the "Marketing" category and save your preferences.
- Reload the page and verify that cookies classified as both "Essential" and "Marketing" are now present.
- Repeat these steps for all other categories to ensure correct behavior.
-
Test Additional Categories:
Special Testing Scenarios
- Google Consent Mode: View the Google Consent Mode Docs for GCM troubleshooting details.
- TCF 2.x: View the TCF 2.x docs for troubleshooting details.
- IAB Do Not Sell: View the IAB docs for troubleshooting details.