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
SQAlbanianITItalian
ARArabicJAJapanese
BGBulgarianKOKorean
CACatalanLVLatvian
ZHChineseLTLithuanian
TWChinese (Taiwan)MSMalay
HRCroatianNBNorwegian Bokmål
CSCzechNONorwegian
DADanishNNNorwegian Nynorsk
NLDutchPLPolish
ENEnglishPTPortuguese
ETEstonianRORomanian
FIFinnishRURussian
FRFrenchSRSerbian
DEGermanSKSlovak
ELGreekSLSlovenian
KLGreenlandicESSpanish
HEHebrewSVSwedish
HIHindiTHThai
HUHungarianTRTurkish
ISIcelandicUKUkrainian
IDIndonesianVIVietnamese

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?