Set up the consent popup script

Learn how to set up the consent popup script.

A consent popup script is a script that lets you display the consent banner on your website. In this article, we’ll show you how to set it up.

Before you start

Here are a few things to know before you start:

  • The data-culture = "EN" attribute controls the language in which the popup will appear on the site. This example will be displayed in English. Set the data-culture attribute to a different language code to change the language.
    Make sure that the languages set in the script’s data-culture attribute match the languages set up in the platform.

Set up the consent popup script

To set up the consent popup script, follow these steps:

1. Add the following script for the consent popup to your website’s <head> tag in the HTML code:

<script id="CookieConsent" src="https://policy.app.cookieinformation.com/uc.js" data-culture="EN" data-gcm-version="2.0" type="text/javascript"></script>

Note:

  • Don’t modify the consent popup script to avoid any disruptions.
  • If you don’t need Google consent mode v2, you can use the following script:

<script id="CookieConsent" src="https://policy.app.cookieinformation.com/uc.js" data-culture="EN" type="text/javascript"></script>

2. Use the code from the table below to set the data-culture attribute to your desired language.

Language codes

Data cultureLanguageData cultureLanguage
ARArabicLTLithuanian
BGBulgarianLVLatvian
CACatalan, ValencianMSMalay
CSCzechNBNorwegian Bokmål
DADanishNNNorwegian Nynorsk
DEGermanNONorwegian
ELModern GreekNLDutch, Flemish
ENEnglishPLPolish
ESSpanish, CastilianPTPortuguese
ETEstonianRORomanian
FIFinnishRURussian
FRFrenchSKSlovak
HEModern HebrewSLSlovene
HIHindiSQAlbanian
HRCroatianSRSerbian
HUHungarianSVSwedish
IDIndonesianTHThai
ISIcelandicTRTurkish
ITItalianTWTaiwanese
JAJapaneseUKUkrainian
KOKoreanVIVietnamese
KLGreenlandicZHChinese

Note: Make sure that the languages set in the script’s data-culture attribute match the languages set up in the platform.

Related articles:

Was this article helpful?