Installing the script
- Written for
- + Written for
- Deprecated
- + Deprecated
- Applies to
- + Applies to
Installing the script
Every property is protected by a single <script> tag. This page covers the tag itself, where to place it, and the attributes that control blocking mode and language.
Get your snippet
From Properties, find your site's card and click Install. The dialog shows a tag generated specifically for that property's cbid (site ID). Click Copy snippet to copy it to your clipboard.
A generated tag looks like this:
<script id="CookieMunch"
src="https://cdn.cookiemunch.net/consent.js"
data-cbid="acme-com-9f3k"
data-blockingmode="auto"></script>Note: If your dashboard's embed CDN and API run on different origins, the tag also includes a
data-api="https://api.yourdomain.com"attribute — copy the snippet as generated rather than retyping it by hand.
Where to put it
Paste the tag as high as possible in <head>, before any analytics, ads, or embed scripts. Placement matters for two reasons:
Consent banner timing. The script needs to run early to show the banner before visitors interact with the page.
Auto-blocking. In
automode, the script intercepts DOM insertions from the moment it runs — any tracking script that loads before it is invisible to the blocker. See prior blocking for how blocking works.
Tag attributes
Attribute | Purpose |
|---|---|
| Fixed ID the runtime and other page scripts use to find the tag. Keep it as generated. |
| The embed script URL, served from your CDN/embed origin. |
| Your property's unique site ID. Identifies which config/banner to load. |
|
|
| Only present when the API origin differs from the embed origin. Leave as generated. |
| Optional. Forces a starting language (e.g. |
Platform notes
The Platform you chose when adding the property (Web, iOS, Android, AMP, or Other) doesn't change the tag — it only tailors the install guidance shown in the dashboard. For standard web platforms (custom HTML, most site builders and CMSs), paste the tag directly into the site's global <head> include. For tag-manager-driven sites, add it as a custom HTML tag that fires on all pages, set to fire as early as possible (ideally outside of the tag manager's own async loader).
Confirming installation
Reload your site in an incognito/private window. You should see the banner. If you don't see it:
Open your browser's dev tools and confirm the
<script>tag is present in the rendered HTML<head>— not injected later by JavaScript.Check the console for network errors loading
consent.js— a staledata-cbidor wrongsrcorigin is the most common cause.Confirm the property is verified — verification unlocks full dashboard control. See properties.
Next steps
Prior blocking — configure
autovsmanualmode.Banner Studio — design what visitors see.
Data attributes reference — manual-mode markup for scripts and iframes.