Classification Rules

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, Blacklisted. (See " Classification Categories" for more info on these classification types.)

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. 


Adding a Script Classification Rule from Scratch

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. 


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. 

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.