Integrations
Umbraco setup
Add the banner to an Umbraco site
Add the GetCookies banner to an Umbraco site.
Install
- In your layout template (e.g.,
_Layout.cshtml), add the loader as the first script in <head>, withoutasyncordefer:
<script src="https://app.getcookies.co/api/v1/widget/loader.js?id=YOUR_DOMAIN_ID"></script>- Publish the template.
Or use the GetCookie.Umbraco package
dotnet add package GetCookie.Umbraco, then setGetCookie:DomainIdinappsettings.json.- Put
@await Html.PartialAsync("_GetCookieHead")(or<get-cookie-head />) first in <head>. It prints the loader above. - Upgrading from 1.0: remove
_GetCookieWidgetfrom before </body>; it no longer prints anything.
The package also adds a GetCookie dashboard to the backoffice (cookies detected, last scan) and the _GetCookieDeclaration partial.
Verify
- Browse the site in incognito; banner should appear.
- Check trackers are blocked until consent.
Tips
- Known trackers in your templates are held back automatically. For hard-coded scripts GetCookies does not recognise, wrap them with data attributes (
type="text/plain"). - If using GTM, consider the GTM template or hybrid blocker for stricter control.
Står du fortsatt fast?
Send e-post til [email protected] med domenet ditt og hva du har prøvd. Innloggede kunder kan også opprette en henvendelse fra dashbordet.