Creating the Consent Banner [osano.js]

  • Updated

Creating a consent management implementation is simple and takes just a few minutes. 

Getting Started

To get started, navigate to the "Cookie Consent" tab in the Osano admin console and create a new configuration. In the configuration settings, add the following: 

    • Name - Internal identifier for this configuration. 
    • Root Domain - If you own, but your website is hosted on, you will want to enter only Osano automatically works with subdomains of your website with no additional configuration.
    • Policy Link URL - The URL link to the aforementioned policy.

Create Configuration and Publish

Create your osano.js by clicking the Create Configuration. Once created, you will receive a <script> tag with your unique code that can be installed onto your website. 



Additional Settings

Once the script has been created, you can change any of the default advanced settings associated with your setup. 

Advanced Settings

General Settings

    • Policy Link Text - The text displayed on the cookie popup that links the customer to one of the following policies: Cookie Notice, Cookie Policy, Data Storage Policy, Privacy Notice, Privacy Policy.


    • Support Global Privacy Control - When enabled, end users using a GPC compatible browser or browser extension will have any GPC signals respected. When off, GPC signals will be ignored. [For more information, see Global Privacy Control (GPC).]
    • IAB GPP & EU TCF 2.0 Frameworks - When enabled, this switch changes all cookie popups in the EU to IAB-defined and compliant popups. [For more information, see Osano and the IAB Framework.]
    • IAB US Privacy String Notice Confirmation - By enabling this toggle, Customer is confirming that they have provided consumer notice and Do Not Sell or Share links under applicable regulations and laws. Enabling this toggle will result in a Y being sent in the second character position of the IAB US Privacy string. 
    • Google Consent Mode - When enabled, this switch will allow the Osano CMP to interact with Google Consent Mode (beta). [For more information, see Google Consent Mode.]


    • Legacy Browser Support - When turned ON, Osano will generate an osano.js that supports legacy browsers and modern browsers. When OFF, Osano will generate an osano.js that only supports modern browsers. [For more information, see Legacy Browser Support.]
    • Split Payload - When turned ON, the osano.js is segmented into a reduced initial payload with additional requests made as needed. This may help your site render more efficiently.

Advanced Settings

      • Curated Block List - When enabled, Osano will automatically block specific scripts and cookies in regions where their usage has been declared illegal by legislation. When off, Osano will respect existing classification settings. [For more information, see Block List.]
      • First Layer Categories - By default, Osano utilizes a popup containing all opt-in categories for users accessing from the EU and other select locales. When disabled, this option counteracts this setting and turns the popup into a "Manage Preferences" popup. [For more information, see First Layer Categories | Manage Preferences.]
      • Add Manage Preferences Button - When enabled, a Manage Preferences button will be present on banner templates: 1 and 3. When disabled, banner templates 1 and 3 will have no Manage Preferences button. [For more information, see the Consent Banner Gallery.]
      • US State Level Legislation Opt-Out Banner Format (Premier Only) - By default, Osano utilizes an Opt-In dialog for users accessing from California, Colorado, Connecticut, and Virginia. When enabled, this option counteracts this setting and turns the opt-in dialog into an opt-out. This option is compliant with US state level legislation. [For more information, see US State Level Legislation Opt-Out Banner Format.]
      • Cross-Domain (Premier Only) - When enabled, the cross-domain switch, you have the option to add multiple domains into your configuration settings, which enable initial consents to be shared across unrelated domains owned by the same entity. Simply add a domain, "tab," and add additional domains. (Some domain restrictions apply). [For more information, see Cross-Domain Support.]

Access your Cookie Consent code within Osano

After creating and publishing your configuration within the Osano Cookie Consent admin (see CMP Setup Guide), the "Get Code" button will become active.

Cookie Consent - Get Code

This button will provide you with the osano.js. Once you have the Osano code, place it in the global <head> of your document. 

Important: Osano will only be able to discover and block scripts that are loaded after it, therefore it must execute in the <head> before any other 3rd party or tracking content. 


Continue to Installing Osano for instructions on adding the osano.js to your site.