Skip to Content

Microsoft UET Consent Mode

ℹ️

Microsoft UET Consent mode is available since CookieHub 2.8.8. Make sure you are not using older version as that will cause lost tracking data if you implement the UET Consent mode defaults.

Microsoft Universal Event Tracking (UET) Consent Mode enables advertisers to adjust UET’s behavior based on user consent choices. This ensures compliance with privacy regulations by controlling how cookies are utilized for tracking and advertising purposes.


How It Works

UET Consent Mode uses the ad_storage parameter to manage cookie behavior:

  • granted: Allows UET to read and write both first and third-party cookies.
  • denied: Prevents UET from reading or writing first-party cookies. Third-party cookies are not written and are only read for fraud and spam detection, not for advertising.

By default, if no setting is specified, UET assumes granted.


  1. Set Default Consent State

    Add the following script at the top of your website’s <head> section to set the default consent state to denied:

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

    • If you’re using Google Tag Manager (GTM) or have disabled Automatic Cookie Blocking for your domain, you can skip this step.
    • Otherwise, disable Automatic Cookie Blocking for the Microsoft Ads service to prevent UET requests from being blocked before consent is granted.
    • This can be managed in the Cookies & Services tab within your domain’s settings on the CookieHub Dashboard.
  3. Handling Microsoft Clarity

    If your UET implementation includes Microsoft Clarity, ensure that Clarity’s cookies are also controlled based on user consent. Configure Clarity to delay setting cookies until consent is granted.


Integration with IAB TCF

To enable UET to utilize the IAB Transparency and Consent Framework (TCF) v2.0 string:

Add the following script at the top of your website’s <head> section:

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

This configuration allows UET to read the TCF string and adjust its behavior according to the user’s consent preferences.


Summary

FeatureSupported
UET Consent Mode Integration✅ Yes
Default Consent State Configuration✅ Yes
Automatic Cookie Blocking Control✅ Yes
Microsoft Clarity Cookie Management✅ Yes
IAB TCF v2.0 Integration✅ Yes

Last updated on