Google Consent Mode and tracking

Microsoft Clarity cookie consent: set it up and test it

Microsoft Clarity cookie consent, step by step: which cookies Clarity sets, how to send the consentv2 signal, and how to test that it waits for a choice.

By Hamza Ahmad Aslam

Published

8 min read

Sources checked 13 Nov 2026

A web page under a heatmap with a session replay button, wired to a panel of consent switches

Microsoft Clarity needs a consent signal for visitors in the EEA, the UK and Switzerland. Microsoft has enforced this since 31 October 2025: without a granted signal, Clarity sets no cookies for those visitors and counts every page view as a new session. Send the signal with Clarity's consentv2 call, through Google Consent Mode, or with a consent tool that supports Clarity.

For visitors in the EEA, the UK and Switzerland, Microsoft requires a valid consent signal before Clarity uses cookies. Microsoft says Clarity's typical use sets non-essential cookies, and its FAQ gives local regulations as the reason for asking for consent in those regions.

Clarity places visitors by IP address geolocation and turns on Consent Mode for those regions by default, with consent denied until your site updates it. If you want Clarity to wait for consent for every visitor, Microsoft's Consent Mode page says to open the project, go to Settings > Setup and turn cookies off.

Clarity reads two consent types, and Microsoft's consent management page describes what each state does:

Consent type Granted Denied
analytics_storage The Clarity tag loads, cookies are set and all features work. The tag loads, but only cookieless data is collected.
ad_storage Clarity shares data with Microsoft Ads. Clarity does not share data with Microsoft Ads.

Keep the two separate: a visitor who allows analytics but declines marketing should send ad_storage as denied. Outside those three regions, whether you need consent depends on the laws that apply to your site.

Which cookies does Clarity set?

Clarity sets two first-party cookies on your domain and five third-party cookies. This list follows Microsoft's Clarity cookie page, last updated 16 October 2026.

Name Purpose (Microsoft's description, shortened) Party
_clck Keeps the Clarity user ID and preferences for this site. First-party
_clsk Joins a visitor's page views into one session recording. First-party
CLID Identifies the first time Clarity saw this user on any site using Clarity. Third-party
MUID Identifies unique browsers visiting Microsoft sites; used for advertising, site analytics and other operational purposes. Third-party
ANONCHK Flags whether MUID is transferred to ANID; Clarity sets it to 0. Third-party
MR Flags whether to refresh MUID. Third-party
SM Used to synchronize MUID across Microsoft domains. Third-party

Microsoft's list gives no lifetimes, so read expiry dates in your own browser. In a test, look for the two first-party cookies: after a decline, neither _clck nor _clsk should exist. If any Clarity cookie shows up before a choice, finding and blocking cookies set before consent covers the usual causes.

What changed on 31 October 2025?

On 31 October 2025 Clarity began enforcing consent signal requirements for page visits from the EEA, the UK and Switzerland.

Microsoft says the update "does not introduce new consent requirements". What changed is that Clarity now acts on the signal. A banner that stores a choice but never passes it to Clarity leaves those visitors denied; Clarity's FAQ says the signal has to reach Clarity through the Consent API or a supported tool.

Two more details matter for setup. Clarity treats a choice as valid for up to nine months unless the visitor changes it, and each Clarity project needs its own consent signal.

Call Clarity's consentv2 API yourself, let Clarity read Google Consent Mode, or use a consent tool that sends the signal. Whichever you pick, send the current choice on every page and again whenever it changes.

Route 1, the consentv2 call:

  1. Collect separate analytics and marketing choices in your banner.

  2. When the visitor chooses, call Clarity with both parameters, each "granted" or "denied". Both are required, and both are spelled with a capital S:

    window.clarity('consentv2', {
      ad_Storage: 'denied',
      analytics_Storage: 'granted'
    });
    
  3. If the visitor later withdraws consent, Microsoft documents window.clarity('consent', false) to erase Clarity's cookies and start a new session.

Per Microsoft's Consent API v2 page, consentv2 replaces the older consent API, which is planned for deprecation.

Route 2, Google Consent Mode:

  1. Set Consent Mode defaults before Google tags run.
  2. Update analytics_storage and ad_storage when the visitor chooses.
  3. Run the test below to confirm Clarity picked the values up.

Microsoft's Google Consent Mode page says Clarity reads those signals with no extra configuration. Clarity's FAQ, last updated 20 October 2026, still answers "coming soon" to the same question, so test before relying on it. How CookieConsentHQ handles Consent Mode v2 lists the Google signals our banner sets.

Route 3, a consent tool:

  1. Turn on Clarity Consent Mode first; Microsoft's list of supported tools requires it for every tool.
  2. Mark Clarity's cookies as non-essential in the tool, which is on Microsoft's compliance checklist.
  3. Check that the tool sends the stored choice on later page loads, not only on the first click.

CookieConsentHQ is not on Microsoft's list. Its banner makes the consentv2 call itself, through a Clarity integration that is on by default: ad_Storage follows the marketing choice and analytics_Storage the analytics choice. The call goes out on page load for a returning visitor's stored choice, with the region's starting values once the region is known (both denied in opt-in regions such as the EEA), and again each time the visitor chooses. If Clarity has not loaded yet, the call waits in the queue Clarity's own snippet uses.

With automatic blocking on (the default), the Clarity tag (clarity.ms/tag) is one of our known trackers in the analytics category and does not load until analytics is allowed. If you load Clarity through Google Tag Manager, the banner's cchq_consent event can fire it; the Google Tag Manager guide shows the variables.

Why did Clarity sessions or recordings change after you added a banner?

Without analytics consent, Clarity cannot link page views, so each page view becomes its own session. The numbers shift because of how they are counted, not because visitors behave differently.

Microsoft's page on Clarity without cookie consent lists the effects, including:

  • Session counts rise, because each page view is a session.
  • Pages per session becomes 1, and each recording shows a page count of 1.
  • Funnels with several steps show a full drop-off.
  • Every user counts as unique, and no one counts as returning.

A visitor who rejects after accepting resets too: Clarity deletes its cookies, ends the session and stays in no-consent mode on future visits until the visitor consents.

A second cause applies if your banner blocks the Clarity tag. A blocked tag sends nothing, so visitors who reject or never choose are missing from Clarity rather than recorded cookieless. That is the result of CookieConsentHQ's default blocking in opt-in regions, the trade-off for loading no Clarity code before a choice.

Test in a fresh private window, once rejecting and once accepting. Microsoft's check combines a Console command with a look at the cookies.

  1. Open a private window, open DevTools with Ctrl+Shift+I (Cmd+Option+I on a Mac) and load the page without touching the banner. Clarity turns Consent Mode on by default for visitors it places in the EEA, the UK or Switzerland, so if you test from elsewhere, turn cookies off in Settings > Setup first.

  2. In the Console tab, run Microsoft's verification command:

    clarity('metadata', (d, upgrade, consent) => {
      console.log('consentStatus:', consent);
    }, false, true, true);
    
  3. Before a choice, expect analytics_storage: "DENIED" and ad_storage: "DENIED".

  4. Click Reject. In the Network tab, look for Clarity's /collect requests, which show Clarity still runs. Then open Application > Storage > Cookies and confirm there is no _clck or _clsk.

  5. Open a new private window, click Accept all and run the command again. Expect "GRANTED" for both.

  6. Load a second page and run it once more, to confirm the stored choice is sent again.

If your banner blocks the Clarity tag before consent, steps 3 and 4 look different: there is no Clarity script yet, so the command prints nothing until the tag loads, and no request to clarity.ms should appear in the Network tab.

The free Consent Mode v2 checker checks one page from one location: it flags cookies set before consent and hardcoded tracker tags and checks Google's consent signals, but does not run the Clarity command. The cookie scanner repeats a before-and-after-consent scan on a schedule.

Our own browser test on 13 November 2026, as a visitor placed in Germany on a test page without the real Microsoft scripts, showed the UET queue starting with a denied default. After Accept all, Clarity's queue ended with consentv2 granted for both values, and UET received a granted update.

What about Microsoft Advertising (UET)?

UET, the Microsoft Advertising tag, has its own consent setting and needs its own signal. It uses one property, ad_storage, and Microsoft's UET Consent Mode page shows a denied default on every page:

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

Once the visitor accepts, send window.uetq.push('consent', 'update', { 'ad_storage': 'granted' }) on every page for as long as the choice applies. If no default is set, UET uses granted in most countries; in the EEA, the UK and Switzerland, where Microsoft enforces Consent Mode, the default is denied.

To check it, use Microsoft's UET Tag Helper extension: the asc parameter on each event should read denied before consent and granted after. In Microsoft Advertising, select Conversions, then UET, and read the Consent Signal column. Microsoft's help page, read on 13 November 2026, marks a tag Healthy when more than 75% of its events in the last seven days carry a valid consent signal.

The two help sites disagree on Clarity loaded through UET: the UET page says to set Clarity's consent separately, Clarity's FAQ says no update is needed. Sending both signals covers either reading. CookieConsentHQ pushes the UET denied default on every page load and an update from the marketing choice, alongside the Clarity call.

Common questions

Yes. With analytics consent denied, Clarity collects cookieless data and gives each page view its own ID, so funnels show a full drop-off and no one counts as a returning user.

Do I need the Clarity signal if I have no visitors from the EEA, UK or Switzerland?

Clarity's FAQ says there is no impact on your Clarity experience in that case, but recommends sending the signal anyway because enforcement may extend to other regions. Whether you need consent under your own laws is a separate question.

Microsoft says Clarity treats consent as valid for up to nine months, unless the visitor changes it sooner.

Run the free checker on your site

Check your site

Sources