CookieHub Docs

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 lets you adjust UET cookie access based on the consent status of your users. Consent mode is set via a property in UET called ad_storage. The possible values for ad_storage are:

Value for ad_storageDescription
grantedFirst and third-party cookies may be read and written for UET. If no default is set, UET uses granted by default.
deniedFirst-party cookies are not read nor written for UET. Third-party cookies are not written. Third-party cookies are read-only for fraud and spam purposes—not for advertising purposes.

What CookieHub sends

ad_storage follows the Marketing category. It is granted when the visitor has allowed Marketing and denied otherwise.

With the Microsoft UET Consent Mode integration enabled, CookieHub:

  1. Sets the default consent state to denied when it loads:
window.uetq = window.uetq || [];
window.uetq.push('consent', 'default', {
  'ad_storage': 'denied'
});
  1. Updates the consent state when the page loads and whenever the visitor changes their choice:
window.uetq.push('consent', 'update', {
  'ad_storage': 'granted' // or 'denied'
});
  1. In the CookieHub Dashboard, open your domain and go to the Settings tab. In the Integrations section, make sure Microsoft UET Consent Mode is switched on, and click Save & publish. It is on by default.
  2. Load the CookieHub script before your UET tag, so the default consent state is in place before UET sends anything.
  3. If UET is implemented via GTM or Automatic Cookie Blocking is disabled for the domain, you can skip this step. Otherwise, disable Automatic Cookie Blocking for the Microsoft Ads service to prevent it from blocking UET requests before cookie consent is granted. You can manage the Microsoft Ads service in the Cookies & Services tab of your domain within the CookieHub Dashboard under Managing Services.
  4. If UET loads Clarity, UET consent mode does not control Clarity's cookies. Enable the Clarity integration as well.

Versions before 2.8.12

CookieHub 2.8.8 to 2.8.11 have no Integrations setting. On those versions CookieHub always sends the update shown above, but it does not set the default consent state. Add the default yourself, at the top of the <head> tag so it runs before UET:

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

Versions older than 2.8.8 do not support UET consent mode. Adding the default on those versions stops UET collecting data, because nothing ever grants consent. Upgrade the domain first.

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, so it loads before all other services:

<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

On this page