Limiting the Cookie declaration to a specific language with Google Tag Manager

Besides the cookiebanner you can set the language for the cookie declaration (policy) as well.

When you operate a multilingual website and would like to have the cookie declaration displayed in the same language as your website you can use the data-culture attribute.

In this example, the language is set to  Spanish:

var contentPlaceholder = document.getElementById("bodycontent");

var cookieDeclarationScript = document.createElement("script");

cookieDeclarationScript.type = "text/javascript";

cookieDeclarationScript.id = "CookiePolicy";

cookieDeclarationScript.src = "https://consent.cookiebot.com/00000000-0000-0000-0000-000000000000/cd.js";

cookieDeclarationScript.setAttribute("data-culture", "es");

contentPlaceholder.appendChild(cookieDeclarationScript);

</script>

14 day free trial Cookiebot

Cookie scanner, cookie banner, cookie declaration and cookie consent in one solution.

  • Use cookies on your website compliant with GDPR, ePrivacy and cookie legislation
  • Cookie management completely automated
  • Cookie banner based on your corporate identity
  • Automatic composed cookie declaration, always up to date

The Cookiebot solution runs on 1.4 million websites, manages 5.2 billion monthly User Consents and supports 47+ languages.