Skip to Content
AdvancedUET Consent Mode

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.

UET consent mode lets you adjust UET cookie access based on the consent status of your users. This enhances the privacy capabilities of UET and gives you control over whether first and third-party cookies are stored. 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.
  1. Add the following script to the top of the <head> tag of your domain to ensure it loads before all other services. This script sets the default Microsoft consent mode:
<script> window.uetq = window.uetq || []; window.uetq.push('consent', 'default', { 'ad_storage': 'denied' }); </script>
  1. 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 the automatic cookie blocker 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.
  2. If UET loads Clarity, you must disable Clarity’s cookies until consent is granted. Configure the Clarity cookie settings accordingly.
  3. If your domain uses the TCF framework then you can
  1. To use the TCF v2.0 string with your UET tags, you’ll need to opt in by adding the following script to the top of the <head> tag of your domain to ensure it loads before all other services.
<script> window.uetq = window.uetq || []; window.uetq.push('config', 'tcf', { 'enabled' : true }); </script>
Last updated on