Identifying Scripts and Cookies
After inserting the Osano.js into the <head> of your website, the CMP will begin identifying the full URL of the scripts and cookies attempting to load on your site.
For the sake of compliance, each script and cookie should be classified as one of the following: Essential, Marketing, Analytics, Personalization, Blocklisted. (See " Classification Categories" for more info on these classification types.) Once classified, your users will be able to opt into and out of non-essential scripts and cookies based on their category.
Generally, any script or cookie that is required for your site to function (including navigation, scrolling, animations, content loading) should be classified as "Essential." Essential scripts will always be loaded, regardless of whether the user has consented or not. You should aim to never have any uncategorized scripts.
Classification Rules
In many cases, you will see multiple scripts and/or cookies loading from the same domain that can all be classified with the same category. This is more common for scripts.
Osano.com, for example, uses Facebook advertising and embeds Facebook Javascripts. Osano categorized all of the Facebook scripts as Marketing since that is their primary use. These scripts will only be loaded for users who have consented to "Marketing" cookies and scripts. We also load jQuery on the Osano.com website and a few other libraries from CloudFlare CDN, all of which are essential. Rather than categorizing each script individually, we simply tagged cloudflare.com as being Essential.
The best way to categorize these scripts is by creating a classification rule that applies to the specific domain identified.
Classification rules are means of grouping similar scripts or cookies together based on a shared URL string.
Example
You have 4 scripts that should all be classified as "Essential."
https://www.yourwebsitedomain.com/cdn/scripts.js
https://www.yourwebsitedomain.com/cdn/themes.js
https://www.yourwebsitedomain.com/cdn/images.js
https://www.yourwebsitedomain.com/cdn/documents.js
Instead of classifying each script, I can create a "Rule" for their shared domain of https://www.yourwebsitedomain.com/cdn/. This will capture ALL 4 scripts and auto classify them as "Essential" when saved to "Managed".
Adding a Script or Cookie Classification Rule from Scratch
(1). If you already have scripts or cookies listed in the managed section:
Scripts: In Consent Manager, from the "Script" tab, go to the "Managed" section and click the green "(+)."
Insert text that is specific enough to identify only the grouping you wish to create.
- The Osano.js pattern matching is "greedy," meaning it looks for a match of the defined script name in the script URL on the page. Thus the script https://connect.facebook.com/scripts/analytics.js would be matched by analytics.js or connect.facebook.com or https:// - therefore it is important that if you edit the script matching pattern in the Osano CMP that you be as specific as possible, being too broad in your matching may result in scripts being incorrectly categorized or blocked.
- The Osano.js pattern matching accepts Postgres regular expressions, but it is recommended that regex characters be used sparingly. Accepted characters are subject to change in future iterations of the product.
Once you have written and classified your rule, click save for the rule to take effect. From this point, all scripts that match the criteria will automatically fall under the associated rule.
Cookies: In Consent Manager, from the "Cookies" tab, go to the "Managed" section and click the green "(+)."
Insert text that is specific enough to identify only the grouping you wish to create.
Once you have written and classified your rule, click save for the rule to take effect. From this point, all cookies that match the criteria will automatically fall under the associated rule.
(2.) If there are no scripts or cookies listed in the managed section:
If you don't yet have any "Managed" script or cookie rules, you can add them ad hoc by going to the "Scripts" or "Cookies" tab and clicking "Add Script Rule." The process will be the same as the above.
Creating Classification rules based on Discovered Scripts/Cookies.
You can create script/cookie rules from the "Discovered" section as well.
Script/Cookie rules with suggested classifications can be edited inline and added to classified using the (create classification) icon. Once created, this rule will move into the "managed" section.
Script/Cookie with no suggested rules or classifications will show "unknown" in their classification dropdown. The usage and classification of these scripts and cookies must be identified within your organization. Once identified, you can modify the classifications and use the (create classification) icon. Once created, this rule will move into the "managed" section.