Overriding the consent banner template

  • Updated

Osano utilizes the end user's IP address to pinpoint their location and displays a consent banner most consistent with privacy laws in their region. You may review a list of regions and consent banner templates that are associated with each region here

You can override this automatic targeting by adjusting setting a "language" and a "variant" on the Osano query string. When requesting the osano.js file, the requested variant and/or language will be served. If either entry is incorrect, the consent banner will revert to serving the automatic banner template and translation.


Code Example

In Osano, create a configuration for your site and click the "Get Code" button to retrieve the osano.js.

Copy this code. Before pasting the osano.js in the <head> of your document, edit the query string to include the "language" and "variant."

 

THIS IS THE DEFAULT SCRIPT

src="https://cmp.osano.com/yourCustomerId/yourConfigId/osano.js"

 

THIS IS THE SCRIPT EDITED TO INCLUDE THE LANGUAGE AND VARIANT

src="https://cmp.osano.com/yourCustomerId/yourConfigId/osano.js?language=en&variant=two"

 

Once active and placed on your site, the above script will enforce the language ENGLISH and template variant TWO for all users. (See below for language options and our Consent Banner gallery for template descriptions). [See Osano Installation Instructions for details on adding the code to your site.]

Note: Utilizing this script override will void the Osano Pledge. Please exercise caution when using overrides. 

 

Supported Language Examples

A list of all supported languages can be found in our Consent Languages documentation. 

Language Code
Afrikaans af
Albanian al
Arabic

ar

Armenian hy
Bulgarian bg
Catalan ca
Chinese zh
Chinese (Hong Kong) zh-hk
Chinese (Taiwan) zh-tw
Croatian hr
Czech cs
Danish da
Dutch (Belgium) nl-be
Dutch (Netherlands) nl
English (Australia) en-au
English (Britain) en-gb
English (Canada) en-ca
English (United States) en
Estonian et
Finnish fi
French (Canada) fr-ca
French (France) fr