TL;DR
Microsoft Consent Mode lets Clarity and Bing Ads respect your visitors' cookie choices without losing all measurement. When a visitor declines analytics or advertising cookies, the Microsoft tags adjust their behavior automatically. CookieBeam sends these consent signals out of the box if you've enabled the Microsoft integrations.
What Is Microsoft Consent Mode?
Microsoft Consent Mode is a consent signaling framework that tells Microsoft products (Clarity and Bing Ads) whether a visitor has granted or denied permission for analytics and advertising cookies. It works the same way Google Consent Mode v2 does for GA4 and Google Ads: your consent banner collects the visitor's choice, and the tags on your site adjust their behavior based on that choice.
Without consent mode, you have two options when a visitor declines cookies: either fire the tags anyway (and violate privacy regulations) or block them entirely (and lose all data for that visitor). Consent mode gives you a third option: the tags still load, but they operate in a restricted way that doesn't set cookies or collect personal data.
Microsoft rolled out consent mode support in phases. Clarity added it first, and Bing Ads UET (Universal Event Tracking) followed. Both now respond to the same consent signals, which means you can configure them together.
How Consent Signals Work for Clarity
Clarity is a session recording and heatmap tool. When it runs without consent, it captures mouse movements, clicks, scroll depth, and page content, including form field interactions. That's personal data under GDPR and most other privacy laws.
With consent mode enabled, Clarity checks whether analytics_storage has been granted before it starts recording. If the visitor hasn't consented:
- No session recording starts
- No heatmap data is collected
- No cookies are set by Clarity
- The Clarity script still loads (so it can start immediately if consent is later granted) but it doesn't do anything observable
Once the visitor grants analytics consent, Clarity begins recording from that point forward. It won't retroactively capture what happened before consent was given.
If you're using Clarity's integration with Bing Ads, the advertising signals matter too. Clarity can feed behavioral data into your Bing Ads campaigns for audience building, but that pathway requires ad_storage consent as well.
How Consent Signals Work for Bing Ads UET
Bing Ads uses Universal Event Tracking (UET) to measure conversions and build remarketing audiences. UET responds to two consent signals:
- ad_storage: Controls whether UET can set cookies for conversion tracking and remarketing. When denied, UET won't write or read advertising cookies.
- ad_personalization: Controls whether visitor data can be used for remarketing audiences. When denied, UET still tracks conversions (if ad_storage is granted) but won't add the visitor to any audience lists.
In practice, most consent banners treat these as a single "advertising" or "marketing" category. If a visitor declines marketing cookies, both signals are denied together.
When both signals are denied, UET operates in a limited mode. It can still send pings to Microsoft's servers with basic page information, but those pings won't be associated with a cookie identifier. Microsoft uses this data for aggregate conversion modeling, similar to how Google uses cookieless pings for conversion modeling in Google Ads.
| Signal | Clarity behavior when denied | Bing Ads UET behavior when denied |
|---|---|---|
| analytics_storage | No session recording, no heatmaps, no cookies | No effect (UET doesn't use this signal) |
| ad_storage | Audience data not shared with Bing Ads | No cookies set, limited-mode pings only |
| ad_personalization | No effect on Clarity directly | No remarketing audience building |
Setting Default Consent State
Like Google Consent Mode v2, Microsoft Consent Mode expects you to set a default consent state before any tags fire. This tells the Microsoft tags how to behave in the gap between page load and the moment the visitor makes a choice on your banner.
For visitors in the EEA, the default should deny everything:
1 <!-- Set before any Microsoft tags load --> 2 <script> 3 window.clarity = window.clarity || function(){(window.clarity.q = window.clarity.q || []).push(arguments)}; 4 // Deny by default for EEA visitors 5 clarity('consent', false); 6 </script>
For Bing Ads UET, the consent default is set through the same gtag('consent', 'default', ...) call you use for Google Consent Mode v2. UET reads the ad_storage and ad_personalization signals from that call. If you're already running Google Consent Mode v2 with proper defaults, Bing Ads picks them up automatically.
This is the key insight: you don't need separate consent plumbing for Google and Microsoft. Both read from the same consent state. The only addition is Clarity's own clarity('consent', ...) API for the analytics signal.
How CookieBeam Handles Microsoft Consent Mode
If you're using CookieBeam as your consent management platform, Microsoft Consent Mode works out of the box. Here's what happens behind the scenes:
- Page loads: CookieBeam's script sets the default consent state to denied for all signal types (analytics, advertising, personalization). Both Google and Microsoft tags see this default immediately.
- Banner appears: The visitor sees your cookie banner with category choices (necessary, analytics, marketing, preferences).
- Visitor chooses: When they accept or customize their preferences, CookieBeam fires a consent update that sets each signal to granted or denied based on their choices.
- Tags react: Clarity checks
analytics_storageand either starts recording or stays silent. Bing Ads UET checksad_storageandad_personalizationand either sets cookies or operates in limited mode.
You don't need to write any custom JavaScript for this. CookieBeam maps its cookie categories to consent signals automatically:
| CookieBeam category | Consent signals set to 'granted' |
|---|---|
| Necessary | functionality_storage, security_storage |
| Analytics | analytics_storage |
| Marketing | ad_storage, ad_user_data, ad_personalization |
| Preferences | personalization_storage |
Step-by-Step: Adding Microsoft Consent Mode with CookieBeam
Setup steps
Install CookieBeam on your site
Add the CookieBeam script to your site's <head> section. It should load before any Microsoft or Google tags. See the banner setup guide for detailed instructions.
Enable Consent Mode in your banner settings
In the CookieBeam dashboard, go to your banner's Integrations tab. Make sure Google Consent Mode v2 is enabled. This also covers Microsoft's consent signals since they share the same framework.
Add your Clarity project
Install Clarity's tracking script after the CookieBeam script. Clarity will automatically detect the consent state and behave accordingly. No extra configuration is needed on the Clarity side.
Add your Bing Ads UET tag
Install UET the same way. If you're using Google Tag Manager, add the UET tag with a consent trigger. If you're using the script directly, place it after the CookieBeam script. UET reads the consent signals from the same global state.
Test the integration
Clear your cookies and reload. The banner should appear. Before you interact with it, open your browser's Network tab and verify that Clarity isn't sending recording data and UET isn't setting cookies. Then accept all cookies and confirm both tools start working.
Running Google and Microsoft Consent Mode Together
Most websites run both Google and Microsoft tags. The good news is that consent mode works identically for both ecosystems. The gtag('consent', ...) API is the shared interface, and both Google and Microsoft tags listen to it.
CookieBeam sends consent updates through this shared API, so a single consent banner covers GA4, Google Ads, Clarity, and Bing Ads simultaneously. You don't need separate consent flows or separate tag configurations for each vendor.
The only thing to watch out for: if you're using Google Tag Manager's built-in consent mode and also loading Clarity outside of GTM, make sure the Clarity script loads after the consent default is set. If it loads first, it might start recording before the default kicks in.
Don't forget Clarity's own consent API
While Bing Ads UET reads consent from the standard gtag consent state, Clarity has its own clarity('consent', true/false) call. CookieBeam handles this automatically, but if you're building a custom integration, you need to call both the gtag consent update and the Clarity consent API. Missing the Clarity call means recordings might start even when analytics consent is denied.
Verifying Your Setup
After implementation, verify that consent mode is working correctly:
- Clarity dashboard: Check your Clarity project's settings page. It should show "Consent Mode: Active" if it's detecting the consent signals.
- Browser DevTools: In the Network tab, filter for requests to
clarity.ms. Before consent, you should see the initial script load but no recording data. After consent, recording payloads should start flowing. - Bing Ads: In the UET tag helper browser extension, verify the tag shows the correct consent state. It should display "Consent: Denied" before banner interaction and update after the visitor consents.
- CookieBeam dashboard: Check your consent analytics. The consent rate for the analytics and marketing categories tells you what percentage of visitors are opting in to Clarity and Bing Ads tracking respectively.
Frequently Asked Questions
Does Microsoft Consent Mode work the same as Google Consent Mode v2?
They share the same signaling framework. Both use gtag('consent', ...) to read consent state. The main difference is that Clarity also has its own clarity('consent', ...) API for the analytics signal. If you're using a CMP like CookieBeam that supports both, you don't need to manage the differences yourself.
Do I need Microsoft Consent Mode if I'm only using Clarity (not Bing Ads)?
Yes. Clarity records session data including mouse movements, clicks, and page content. Under GDPR and similar laws, that's personal data processing that requires consent. Without consent mode, you'd need to completely block Clarity for non-consenting visitors, losing all data. With consent mode, the script stays loaded and starts recording the moment consent is granted.
What data does Bing Ads still collect when consent is denied?
In limited mode, UET sends basic pings without cookie identifiers. Microsoft uses these for aggregate conversion modeling, which helps preserve some campaign measurement even for visitors who decline cookies. No personal data or cross-site tracking occurs in this mode.
Can I use Microsoft Consent Mode without Google Consent Mode v2?
Technically yes, but there's no practical reason to. Both use the same consent signal format. If you set up consent mode for one, you've set it up for both. CookieBeam enables both simultaneously.
Next Steps
Once your Microsoft Consent Mode setup is working, consider these follow-ups:
- Google Consent Mode v2 implementation guide for detailed Google-side setup
- Server-side consent enforcement to extend consent beyond the browser
- Improving your consent rate so more visitors opt in to analytics and advertising