---
title: "Microsoft Consent Mode: Clarity + Bing Ads | CookieBeam"
description: "Learn how to implement Microsoft Consent Mode for Clarity session recordings and Bing Ads UET tracking. Step-by-step guide with CookieBeam integration."
url: "https://cookiebeam.com/guides/microsoft-consent-mode-clarity-bing-ads-2026"
lang: "en"
last_updated: "2026-10-18T00:12:18.904Z"
---

# Microsoft Consent Mode: Setting Up Clarity and Bing Ads Together

Set up Microsoft Consent Mode for both Clarity and Bing Ads in one go. Covers how consent signals work, what happens when visitors decline, and how CookieBeam handles it automatically alongside Google Consent Mode v2.

> **Tip: TL;DR**
>
> Microsoft Consent Mode lets Clarity and Bing Ads respect your visitors' cookie choices without losing all measurement. Each product takes consent through its own API: Bing Ads UET reads `ad_storage` from `window.uetq`, and Clarity reads `ad_Storage` and `analytics_Storage` from `clarity('consentv2', ...)`. Neither reads Google's `gtag` consent state. CookieBeam sends both signals when the Microsoft Ads (UET) and Microsoft Clarity vendor consent signals are switched on.

> **Note: Which Microsoft consent guide do you need?**
>
> - **This guide**: combined setup for Clarity and Bing Ads consent mode together.
> - [UET consent mode explained](https://cookiebeam.com/articles/microsoft-advertising-uet-consent-2026): the May 2025 deadline and `ad_storage` signal in depth.
> - [CookieBeam UET bridge](https://cookiebeam.com/guides/microsoft-advertising-uet-consent-mode-cookiebeam-2026): how CookieBeam sends UET consent signals automatically.
> - [Clarity consentv2 API](https://cookiebeam.com/guides/microsoft-consent-mode-clarity-bing-ads-2026): manual Clarity consent implementation.
> - [CookieBeam Clarity bridge](https://cookiebeam.com/guides/microsoft-consent-mode-clarity-bing-ads-2026): how CookieBeam sends Clarity consent signals.

## 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 accept consent signals, each through its own API, so one banner decision can drive both.

## 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 the `analytics_Storage` signal it receives through its `consentv2` API 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 takes a single consent signal, `ad_storage`, through its own queue: `window.uetq.push('consent', 'default' | 'update', { 'ad_storage': 'granted' | 'denied' })`. When `ad_storage` is denied, UET won't write or read advertising cookies for conversion tracking or remarketing.

In practice, most consent banners map the "advertising" or "marketing" category to this signal. If a visitor declines marketing cookies, UET receives `ad_storage: 'denied'`.

When the signal is 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.

**Consent signal behavior by product**

| Signal | Clarity behavior when denied | Bing Ads UET behavior when denied |
| --- | --- | --- |
| analytics_storage (Clarity: analytics_Storage) | No session recording, no heatmaps, no cookies | No effect (UET doesn't use this signal) |
| ad_storage (Clarity: ad_Storage) | Audience data not shared with Bing Ads | No cookies set, limited-mode pings only |
| ad_personalization | No effect (Clarity doesn't use this signal) | No effect (UET reads only ad_storage) |

## 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. Each product needs its own default call, and the visitor's choice then goes to each product's own API. This snippet does both:

`microsoft-consent.html`

```html
<!-- Place above the CookieBeam script and before any Microsoft tags -->
<script>
  // Bing Ads UET: queue the default before the UET tag loads.
  window.uetq = window.uetq || [];
  window.uetq.push('consent', 'default', { 'ad_storage': 'denied' });

  // Clarity: queue stub, so calls made before Clarity loads are replayed.
  window.clarity = window.clarity || function () {
    (window.clarity.q = window.clarity.q || []).push(arguments);
  };
  window.clarity('consentv2', { 'ad_Storage': 'denied', 'analytics_Storage': 'denied' });

  // Send the visitor's choice: when it changes (consentUpdate) and again on
  // each later page view for a stored choice (consentRestored).
  function sendMicrosoftConsent(event) {
    var categories = (event.detail && event.detail.categories) || [];
    var ad = categories.indexOf('marketing') !== -1 ? 'granted' : 'denied';
    var analytics = categories.indexOf('analytics') !== -1 ? 'granted' : 'denied';
    window.uetq = window.uetq || [];
    window.uetq.push('consent', 'update', { 'ad_storage': ad });
    window.clarity('consentv2', { 'ad_Storage': ad, 'analytics_Storage': analytics });
  }
  window.addEventListener('cookiebeam:consentUpdate', sendMicrosoftConsent);
  window.addEventListener('cookiebeam:consentRestored', sendMicrosoftConsent);
</script>
```

Bing Ads UET does not read Google's `gtag('consent', ...)` state. Its default and updates go through its own `uetq` queue, and the `default` push has to be queued before the UET tag loads, because UET treats `ad_storage` as granted until it is told otherwise. Clarity has its own `consentv2` API with capital-S keys (`ad_Storage`, `analytics_Storage`). The older `clarity('consent', true/false)` call carries only one signal, so use `consentv2`.

The listener reads `event.detail.categories` from two CookieBeam events: `cookiebeam:consentUpdate` (a choice made on this page) and `cookiebeam:consentRestored` (a stored choice re-announced on a later page view). It maps the marketing category to `ad_storage` and `ad_Storage`, and the analytics category to `analytics_Storage`. Without the restored listener, a returning visitor's choice reaches Microsoft only on the page where it was made.

This is the key difference from Google: **Google and Microsoft need separate consent calls**. One banner decision can drive both, but a `gtag` consent update alone leaves UET and Clarity on their own defaults.

## How CookieBeam Handles Microsoft Consent Mode

If you're using CookieBeam as your consent management platform, its vendor consent bridges send the Microsoft calls for you. Here's what happens behind the scenes:

1. **Page loads**: CookieBeam sets the Google Consent Mode default through `gtag`. With the Microsoft Ads (UET) signal on, it also queues `uetq.push('consent', 'default', { 'ad_storage': ... })` for the visitor's region before UET loads. Clarity gets no default from CookieBeam and keeps its own regional default until the first `consentv2` call.
2. **Banner appears**: The visitor sees your cookie banner with category choices (necessary, analytics, marketing, preferences).
3. **Visitor chooses**: When they accept or customize their preferences, CookieBeam fires `cookiebeam:consentUpdate` with each signal set to granted or denied.
4. **Bridges react**: The UET bridge pushes `uetq.push('consent', 'update', { 'ad_storage': ... })`. The Clarity bridge calls `clarity('consentv2', { 'ad_Storage': ..., 'analytics_Storage': ... })`. On later page views, the stored choice is sent again through `cookiebeam:consentRestored`.

You don't need to write any custom JavaScript for this, as long as Microsoft Ads (UET) and Microsoft Clarity are switched on under Vendor Consent Signals in your banner's App Integrations (both are on by default). CookieBeam maps its cookie categories to consent signals like this:

**CookieBeam category to consent signal mapping**

| 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

### Step 1: 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](https://cookiebeam.com/guides/setup-banner) for detailed instructions.

### Step 2: Check the Microsoft vendor consent signals

In the CookieBeam dashboard, open your banner's App Integrations and check that Microsoft Ads (UET) and Microsoft Clarity are switched on under Vendor Consent Signals. These are separate from Google Consent Mode v2: Google's `gtag` consent state doesn't reach UET or Clarity.

### Step 3: Add your Clarity project

Install Clarity's tracking script after the CookieBeam script. CookieBeam's Clarity bridge sends `consentv2` calls, and if Clarity hasn't loaded yet it queues them for Clarity to replay. Don't add your own `clarity('consent', ...)` calls alongside the bridge.

### Step 4: 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. CookieBeam's UET bridge pushes its consent commands to the same `window.uetq` queue the UET tag reads, so you don't need to change the UET snippet.

### Step 5: 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 signal names match (`ad_storage`, `analytics_storage`), but the APIs don't: Google tags read `gtag('consent', ...)`, UET reads `uetq.push('consent', ...)`, and Clarity reads `clarity('consentv2', ...)`.

CookieBeam drives all three from one visitor decision: Google Consent Mode through `gtag`, and the Microsoft bridges through their own APIs, all from the same `cookiebeam:consentUpdate` event. You don't need separate consent flows for each vendor.

The thing to watch out for: if Google Tag Manager or your own code also sends Microsoft consent commands, they can conflict with the bridges. Use either the bridges or your own calls, not both.

> **Warning: Google's consent state doesn't reach Microsoft tags**
>
> UET and Clarity don't read `gtag` consent. CookieBeam's bridges handle this, but if you're building a custom integration, every choice needs the `gtag` consent update, `uetq.push('consent', 'update', ...)` and `clarity('consentv2', ...)`. Missing the Microsoft calls leaves UET and Clarity on their own defaults, so tracking might start even when 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?

The signals are similar, but the APIs are separate. Google tags read `gtag('consent', ...)`. UET reads `uetq.push('consent', ...)` with a single `ad_storage` signal. Clarity reads `clarity('consentv2', ...)` with `ad_Storage` and `analytics_Storage`. If you're using a CMP like CookieBeam that supports all three, one banner decision is sent to each.

### 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?

Yes. UET and Clarity take their own consent calls, so they work without `gtag`. In CookieBeam, Microsoft Ads (UET) and Microsoft Clarity are separate vendor consent signal toggles from Google Consent Mode v2.

## Next Steps

Once your Microsoft Consent Mode setup is working, consider these follow-ups:

- [Google Consent Mode v2 implementation guide](https://cookiebeam.com/guides/google-consent-mode-v2) for detailed Google-side setup
- [Server-side consent enforcement](https://cookiebeam.com/guides/server-side-consent-enforcement) to extend consent beyond the browser
- [Improving your consent rate](https://cookiebeam.com/guides/cookie-banner-consent-rate-optimization) so more visitors opt in to analytics and advertising
