Implementing Microsoft Consent Mode: UET Integration for Privacy-Compliant Advertising
Jerisaliant
Author
What Is Microsoft Consent Mode?
Microsoft Consent Mode allows advertisers to adjust how Universal Event Tracking (UET) tags access cookies based on user consent status. Similar to Google's implementation, Microsoft's Consent Mode uses the ad_storage property to control first-party and third-party cookie behavior for advertising measurement. With Microsoft enforcing consent signals in the EEA, UK, and Switzerland, implementing Consent Mode is now mandatory to avoid conversion attribution loss in those regions.
How It Works: The ad_storage Property
Microsoft Consent Mode revolves around a single key property:
| ad_storage Value | Behavior |
|---|---|
| granted | First-party and third-party cookies are read and written normally for UET. |
| denied | First-party cookies are not read or written. Third-party cookies are read only for fraud/spam detection, not advertising. |
For most countries, if no consent setting is explicitly set, UET defaults to granted. However, in EEA countries, the UK, and Switzerland, the default is denied, and the granted signal must be explicitly passed when a user accepts consent.
Basic vs. Advanced Consent Mode
Basic Consent Mode
- UET tags are blocked until the user grants consent.
- No data is sent to Microsoft before explicit consent.
- Uses generic modeling for conversion estimation.
Advanced Consent Mode (Recommended)
- UET tags load immediately with consent defaulted to denied.
- When consent is denied, only anonymized data is collected and later aggregated for modeling.
- Produces more precise, advertiser-specific modeling.
- Microsoft Advertising recommends this as the technical best practice.
Implementation Example
For Advanced Consent Mode, set the default on every page load:
window.uetq = window.uetq || [];
window.uetq.push('consent', 'default', {
'ad_storage': 'denied'
});
When the user grants consent via your cookie banner, update the setting:
window.uetq = window.uetq || [];
window.uetq.push('consent', 'update', {
'ad_storage': 'granted'
});
Place these scripts in your <head> tags to ensure the consent state is set before any UET events fire.
Supported CMPs
Microsoft supports over 20 Consent Management Platforms for automatic consent signal integration, including: Cookiebot, OneTrust, Didomi, UserCentrics, CookieYes, TrustArc, Iubenda, Complianz, CookieFirst, CookieHub, Consentmo, Tealium, and more. If your CMP is supported, consent signals can be relayed to UET automatically.
Microsoft also supports reading consent from TCF (Transparency and Consent Framework) and other standard mechanisms. You can even disable this automatic logic by setting enableAutoConsent: false in your UET tag initialization if you prefer explicit control.
Validating Your Implementation
Microsoft provides multiple validation tools:
- UET Tag Helper browser plugin: Available for Edge and Chrome. Inspect the asc parameter in UET events to verify consent status (denied or granted).
- UET Dashboard: Shows a Consent Signal column with status labels: Healthy (>75% of events have valid consent), Moderate (0-75%), or Missing (0%).
- Test Your Tag tab: Shows consent status as Present or Not present per event on tested URLs.
Jerisaliant integrates with Microsoft Consent Mode natively, sending the correct ad_storage signals based on user consent choices without any additional setup for advertisers.
Ensure DPDPA Compliance Today
Ready to make your business compliant? Run a free gap assessment or talk to our experts.