/ /

Scripts vs. Cookies in Osano

Updated 4 months ago

Osano distinguishes between how scripts and cookies are classified, ensuring that required site functionality is preserved while still honoring end-user consent preferences.

Scripts are classified as a whole, while cookies are classified individually. This distinction is important because a single script can create multiple cookies across different categories.


How Script and Cookie Classification Works

Script Classification

  • Scripts are evaluated as complete objects.

  • If you classify a script as Essential, Osano will allow it to run so that its necessary functionality works.

Cookie Classification

  • Cookies are evaluated individually, even when they originate from the same script.

  • Osano blocks the creation of any cookies that do not belong to a category the user has accepted.


Example

A script may create two cookies:

  • One Essential cookie

  • One Analytics cookie

When the user selects Essential only:

  • The Essential cookie is created.

  • The Analytics cookie is blocked.

When the user consents to Analytics:

  • The Analytics cookie is created in addition to the Essential cookie.


Why This Matters

This approach ensures that:

  • Users always receive the required functionality provided by Essential scripts.

  • Osano enforces consent preferences at the cookie level, preventing Analytics or Marketing cookies from being created until the user opts in.

Even if an Essential script runs, only the cookies associated with the categories a user has accepted will be created.


Key Notes

  • Verify Classifications: Always double-check that both scripts and cookies are classified correctly. A script marked Essential will run, but its cookies still need accurate classification.

  • Mixed-Use Scripts: Some scripts (e.g., HubSpot, tag managers) may serve multiple purposes. While the script runs for Essential functions, Osano will block non-consented cookies it attempts to create.

  • Browser Limitations: Cookies set via HTTP headers or in external iframes may not be visible to Osano and cannot be blocked.

  • Test Thoroughly: Validate behavior and scenarios in a incognito browser to confirm classifications are working as intended.

Was this article helpful?
Subscribe to receive updates on this article