Skip to content

Integrations overview ​

There are three ways to make a tag respect the visitor's consent, from simplest to most hands-on. Pick one per tag.

For Google, Microsoft UET and Microsoft Clarity, turn on the matching toggle in Banner Designer → Consent and install the tag normally. The banner sends the tag its consent signal — ad_storage, analytics_storage, consentv2 — and the tag adjusts itself: full tracking when consented, a cookieless/limited mode when not.

No code, and your tags keep measuring conversions cookielessly even when a visitor declines. This is Google's and Microsoft's own recommended model.

2. Script gating by category ​

For any tag with no consent awareness of its own, let the banner hold it back until consent. Change the tag's <script> to type="text/plain" and add a data-category:

html
<script type="text/plain" data-category="marketing"
        src="https://example.com/tag.js"></script>
html
<script type="text/plain" data-category="analytics">
  // inline tag code
</script>

The banner runs the script only once the visitor accepts that category, and removes its cookies if they later withdraw. Use the category that matches the tag: marketing for advertising, analytics for measurement, preferences for functional.

3. Consent events for your own code ​

When you need custom logic — initialise an SDK, flip a feature, call your own API — listen for the banner's consent events and act on the visitor's categories yourself:

js
window.addEventListener('cc:onConsent', (e) => {
  if (e.detail.cookie.categories.includes('marketing')) initAdvertising()
})

window.addEventListener('cc:onChange', (e) => {
  const on = e.detail.cookie.categories.includes('marketing')
  on ? initAdvertising() : teardownAdvertising()
})

Both events and the exact payload are documented under Consent cookie & events.

Which one? ​

You want to…Use
A Google / Microsoft UET / Clarity tag to respect consentConsent Mode toggle
A tag to simply not run until consentScript gating
To run your own code on the decisionConsent events
GTM to fire a tag on consentEither the toggle (Consent Mode is native in GTM) or a Custom Event trigger on cc:onChange

You can mix them: a site might use the Consent Mode toggle for Google, gate a third-party widget by category, and run a consent event handler for its own SDK.

CookieWave consent management