Tilbake til hjelpesenteret

Integrations

Umbraco setup

Add the banner to an Umbraco site

Add the GetCookies banner to an Umbraco site.

Install

  1. In your layout template (e.g., _Layout.cshtml), add the loader as the first script in <head>, without async or defer:
<script src="https://app.getcookies.co/api/v1/widget/loader.js?id=YOUR_DOMAIN_ID"></script>
  1. Publish the template.

Or use the GetCookie.Umbraco package

  1. dotnet add package GetCookie.Umbraco, then set GetCookie:DomainId in appsettings.json.
  2. Put @await Html.PartialAsync("_GetCookieHead") (or <get-cookie-head />) first in <head>. It prints the loader above.
  3. Upgrading from 1.0: remove _GetCookieWidget from 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.