Details an integration available for Cookiebot, built and maintained by Umbraco HQ.
This integration provides an implementation model for the Cookiebot banner and declaration.

Minimum version requirements

Umbraco CMS

Version 10
Version 11


The following configuration is required for the Cookiebot scripts to be loaded correctly:
"Umbraco": {
"Cookiebot": {
"Settings": {
// CBID = Cookiebot Identifier
"Id": "[YOUR_CBID]"


The package is a reusable Razor class library that will allow editors to load the Cookiebot Banner and Declaration scripts.
The banner script needs to be inserted as the first script of the website, by placing it within the <head></head> tag using this syntax:
@await Html.PartialAsync("~/Views/Partials/UmbracoCms.Integrations/Analytics/Cookiebot/Banner.cshtml")
The Declaration script can be added to whatever page you want, using this syntax:
@await Html.PartialAsync("~/Views/Partials/UmbracoCms.Integrations/Scripts/Cookiebot/Declaration.cshtml")
Both scripts "pick up" CBID from the website's configuration file and update the details accordingly.

Custom Implementations

This integration demonstrates how an Umbraco package can be used as an integration with a script-based provider, using partial views and the IConfiguration interface.
You can use this package as a reference for creating integrations with other providers using scripts:
  1. 1.
    Create a new Razor class library for your integration.
  2. 2.
    Add partial views where you insert your custom script code.
  3. 3.
    Inject the IConfiguration interface into your view: @inject Microsoft.Extensions.Configuration.IConfiguration Configuration.
  4. 4.
    Use Configuration[YOUR_SETTINGS_PATH:KEY] to retrieve the required configuration values.
  5. 5.
    Add umbraco-marketplace.json file with Marketplace details of the package.
Once your integration is ready, all that remains to do is to deploy the package to NuGet.