Docs menu

Microsoft Ads (UET)

Passing consent state to the Microsoft Advertising (UET) tag: enabling it, how the ad_storage signal works and verification.

Microsoft UET Consent Mode

CookieHug can pass consent state to the Microsoft Advertising (UET) tag — the Bing Ads counterpart of Google Consent Mode. Microsoft requires a consent signal (ad_storage) for traffic from the European Economic Area; without it, conversions and remarketing in Microsoft Ads stop working correctly.

The feature is off by default and enabled per domain. CookieHug does not install the UET tag — it only drives its consent. It works whether UET is embedded directly or through Google Tag Manager.

Enabling

  • Open the domain in the dashboard → Advanced → the Consent policy section.
  • Find the Microsoft UET Consent Mode (Bing / Microsoft Ads) card and flip the switch — it saves automatically.
  • The change lands in the banner script on its next fetch (script cache: up to 5 minutes).

How the signal works

Before the UET tag (bat.js) runs, the SDK pushes a consent default into the window.uetq queue. If the visitor already has a stored decision, the default reflects it immediately:

// before the user decides (or after a rejection):
window.uetq.push('consent', 'default', { ad_storage: 'denied' });

// after consent to the Marketing category (also on return visits with stored consent):
window.uetq.push('consent', 'update', { ad_storage: 'granted' });

An update is sent after every decision: accept, reject, change and withdrawal. The signal is driven by the Marketing category — the same one that drives ad_storage in Google Consent Mode. Important: the CookieHug snippet must load before the UET tag (the same rule as for Google tags) — that way the default enters the queue before bat.js processes it.

Verification

In DevTools on a page with the feature enabled:

// right after page load (before any decision):
window.uetq
// → queued: ['consent', 'default', { ad_storage: 'denied' }]

// after clicking "Accept all":
// → added: ['consent', 'update', { ad_storage: 'granted' }]

You can also inspect the state with Microsoft's UET Tag Helper extension. If window.uetq does not exist, the page has no UET tag — CookieHug's signal then sits idly in the queue and breaks nothing.