Umbraco Cookie Consent Package
The Conzent Umbraco package adds consent management to any Umbraco 13+ site. Install via NuGet, add two tag helpers to your layout, and configuration is handled through appsettings.json.
Installation
Install via the .NET CLI:
dotnet add package Conzent.Umbraco
Or via the NuGet Package Manager in Visual Studio:
nstall-Package Conzent.Umbraco
Configuration
Add your settings to appsettings.json:
{
"Conzent": {
"WebsiteKey": "YOUR-WEBSITE-KEY",
"Enabled": true
}
}
Then register the tag helpers in _ViewImports.cshtml:
@addTagHelper *, Conzent.Umbraco
And add the tag helpers to your _Layout.cshtml:
<head>
...
<conzent-scripts />
</head>
<body>
<conzent-gtm-noscript />
...
</body>
See Official Page
Features
- Tag helper injection —
<conzent-scripts />injects the consent script and optional GTM into<head> - GTM noscript fallback —
<conzent-gtm-noscript />adds the noscript iframe when GTM is configured - Backoffice dashboard — a Conzent CMP dashboard appears under Settings in the Umbraco backoffice
- Google Consent Mode v2 — advanced consent signaling for Google services
- Environment variable support — configure via
Conzent__WebsiteKeyenvironment variables as an alternative toappsettings.json
Configuration Options
| Setting | Default | Description |
|---|---|---|
| WebsiteKey | (required) | Your site key from the Conzent dashboard |
| ServerUrl | https://cdn.getconzent.com | For self-hosted (OCI), enter your server URL |
| Enabled | true | Toggle the consent banner on/off |
Requirements
- Umbraco 13+
- .NET 8.0+
Self-Hosted (OCI)
If you run OCI on your own server, set the ServerUrl to your OCI instance:
{
"Conzent": {
"WebsiteKey": "YOUR-WEBSITE-KEY",
"ServerUrl": "https://consent.yourdomain.com",
"Enabled": true
}
}
Frequently asked questions
Which Umbraco versions are supported?
Umbraco 13+ on .NET 8.0+.
Do I need to edit Razor views extensively?
No — just two tag helpers in your layout, <conzent-scripts /> and <conzent-gtm-noscript />. Everything else is configured in appsettings.json or the backoffice dashboard.
Can I configure it via environment variables instead of appsettings.json?
Yes, using Conzent__WebsiteKey and related environment variables.
Does it support self-hosted OCI?
Yes, set the ServerUrl to your OCI instance.
Other Platforms
See integrations for WordPress, Drupal, Joomla, TYPO3, Wix, or the universal script tag for any other platform.