Microsoft UET Consent Mode

Microsoft Universal Event Tracking (UET) Consent Mode adjusts how UET uses cookies based on user consent, helping you stay compliant with privacy regulations. CookieHub supports UET Consent Mode starting from version 2.8.8. Make sure you are not using an older version, as it can cause lost tracking data.

How it works

UET Consent Mode uses the ad_storage parameter:

  • granted – Allows UET to read and write first- and third-party cookies
  • denied – Prevents UET from writing first-party cookies and limits third-party cookies to fraud and spam detection only

If no setting is provided, UET assumes granted.

Implementing UET Consent Mode with CookieHub

1. Set the default consent state

Add this script in the <head> of your site to set ad_storage to denied by default:

<script>
  window.uetq = window.uetq || [];
  window.uetq.push('consent', 'default', {
    'ad_storage': 'denied'
  });
</script>

2. Configure CookieHub settings

  • If you use Google Tag Manager (GTM) or have disabled Automatic Cookie Blocking, skip this step.
  • Otherwise, disable Automatic Cookie Blocking for Microsoft Ads in the Cookies & Services tab on your CookieHub dashboard.

    This ensures UET requests are not blocked before consent is granted.

3. Handling Microsoft Clarity

If UET is linked with Microsoft Clarity, make sure Clarity cookies are set only after consent. Configure Clarity to delay cookie creation until consent is given.

4. Integration with IAB TCF

To allow UET to use the IAB TCF v2 string, add this script to the <head> :

<script>
  window.uetq = window.uetq || [];
  window.uetq.push('config', 'tcf', { 'enabled': true });
</script>

This lets UET read the TCF string and apply user consent preferences.

Summary of features

Feature Supported
UET Consent Mode integration ✅ Yes
Default consent state configuration ✅ Yes
Automatic cookie blocking control ✅ Yes
Microsoft Clarity cookie management ✅ Yes
IAB TCF v2 integration ✅ Yes