Skip to Content
Compliance & frameworksIntegrationsMicrosoft UET Consent Mode

Microsoft UET Consent Mode

ℹ️

Microsoft UET Consent mode is available since CookieHub 2.8.8, and has been controlled by the Microsoft UET Consent Mode integration setting since 2.8.12. Make sure you are not using an older version than 2.8.8, 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. Enable the integration

    In the Integrations section of your domain’s Settings tab, make sure Microsoft UET Consent Mode is switched on. It is on by default. CookieHub then sets the default consent state to denied when it loads, and updates ad_storage from the Marketing category when the page loads and whenever the visitor changes their choice. Load the CookieHub script before your UET tag so the default is in place first.

    On CookieHub 2.8.8 to 2.8.11, which have no Integrations setting, CookieHub sends the update but not the default. Add the default yourself at the top of your website’s <head> section:

    <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, UET consent mode does not control Clarity’s cookies. Enable the Clarity integration as well.


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