If there is no possibility to place the script for the cookie declaration in your page, for example because you are not allowed to create script tags (e.g. in Lightspeed, Shopify etc.), you can also load the cookie declaration via Google Tag Manager.

In your page, create a placeholder with the id “CookieDeclarationPlaceholder”. This looks like this:

 <div id="CookieDeclarationPlaceholder"></div>

The placeholder is not visible to the user.

Google Tag Manager settings

Now within GTM, create a Custom HTML tag with the code below, replacing the blue 00000000-0000-0000-0000-0000-000000000000 with the domain-id of your Cookiebot account. This causes the cookie declaration script to be placed in your previously created placeholder.

<script data-cookieconsent="ignore">
/* Inject Coockie Declaration from CookieBot */
var  cookieDeclarationPlaceholder = document.getElementById("CookieDeclarationPlaceholder");
  
if(cookieDeclarationPlaceholder){
  var scriptNode = document.createElement('script');
  scriptNode.id = "CookieDeclaration";
  scriptNode.src = "https://consent.cookiebot.com/00000000-0000-0000-0000-000000000000/cd.js";
  scriptNode.type = "text/javascript";
  scriptNode.async = true;
  cookieDeclarationPlaceholder.appendChild(scriptNode);
}
</script>

Then you create a trigger that goes off the moment the user has loaded the cookie statement page.

The whole thing then looks like this:

Cookie declaration via Google Tag Manager - Cookiebot