Skip to main content
Web Design

Microsoft Clarity Privacy and Consent: A Site Owner's Audit

KD

Kaleb Dickhaut

Founder, ClickWerxs

October 22, 2026
10 min read
A small wooden box with its hinged lid open on a concrete table, a brass key lying in front of it.

TL;DR: Microsoft Clarity privacy comes down to six checks: the Cookies setting, a Decline test, the consent signal from your banner, masking, IP blocking and your disclosure. We kept Clarity's cookies on for our site and made the Decline button reach Clarity on every page. Run Microsoft's test before you trust your banner.

The one-sentence answer: Decide whether Clarity may set cookies before a choice, send the visitor's choice from your banner with consentv2 on every page load, keep masking at Balanced or Strict, block your office IP, and name Clarity, session replay and its retention periods in your privacy policy.


A cookie banner is only half of Clarity consent. The other half is the call that tells Clarity what the visitor chose, and nothing in Clarity's dashboard shows whether that call is happening.

We run Clarity on clickwerxs.com with a custom banner: Accept All or Decline. Wiring the two together took one decision, one function and one privacy policy section.

The decision was whether Clarity may set cookies before anyone answers the banner. We said yes, which means our Decline button has to actually undo them.

The function came next. Microsoft's own example for it failed a syntax check, so we wrote and tested our own.

This guide is that setup, in the order we'd build it again.

This post reflects publicly available regulatory information as of the publication date. Regulations vary by jurisdiction and change frequently. This is not legal advice. Consult qualified legal counsel before making compliance decisions for your business.

Last verified: October 18, 2026, against Microsoft's Clarity documentation and our own Clarity project for clickwerxs.com.

Prerequisites: Admin access to your Clarity project (Microsoft says only admins can change masking or IP blocking). Access to your site's code or banner settings. Your privacy policy. A desktop browser with developer tools. Our guide to installing Clarity without hurting PageSpeed covers the tag itself.


Step 1: Check Microsoft Clarity's cookie setting

Clarity's cookie behavior is one switch: Settings, Setup, Advanced settings, Cookies. Microsoft calls turning it off Consent Mode, where Clarity waits for a valid consent signal before setting any cookie. For visitors in the EEA, UK and Switzerland, Microsoft enables Consent Mode by default. We keep Cookies On, so Consent Mode applies only to visitors from those regions.

Clarity Settings, Setup, Advanced settings with the Cookies switch On and the note that recordings will not be linked into multi-page sessions if it is turned off

Microsoft lists seven cookies. Two are first-party: _clck keeps the Clarity user ID and preferences, and _clsk joins page views into one recording. Five are third-party: CLID, ANONCHK, MR, MUID and SM. Microsoft's FAQ says Clarity's features rely on the first-party pair, and that its third-party cookies support operational purposes like advertising.

Turning it off costs data. Microsoft's reporting page lists the effects for sessions without consent. Each page view becomes its own session, pages per session drops to 1, multi-step funnels show a full drop-off, and "No user is considered as a returning user."

We kept it On because our banner is opt-out: cookies until a visitor declines, then none. Visitors who never touch the banner still appear as full multi-page sessions. Turn it off if you want nothing set before Accept.

If you turn Cookies off and your numbers shift: check the change against the reporting list above before reading it as a traffic change. Write down the date you changed it, and compare periods on the same side of that date only.

Step 2: Test your Decline button the way Microsoft does

Microsoft's Consent Mode page gives a five-step test. Clear your site's cookies, load the site, decline, confirm Clarity is still sending /collect calls, then check that _clck and _clsk are absent. The collect calls should continue; the two cookies tell you whether the decline arrived.

The same page has a console check. It calls clarity('metadata', …) and prints a consentStatus object. In Consent Mode, Microsoft says both analytics_storage and ad_storage should read DENIED before a choice. After Accept, analytics_storage should read GRANTED. We expect ad_storage to stay DENIED, since our snippet passes denied for ads.

We ran both checks on clickwerxs.com on October 18, 2026, the day our banner change went live. Before any choice, the console check read granted for both fields and _clck and _clsk were set. That is what an opt-out setup with Cookies On should show. After Decline, Clarity kept sending /collect calls (each answered 204), both cookies were gone, and both fields read denied. The decline held on the next page we opened. After Accept, from the footer's Cookie settings link, analytics_storage read granted, ad_storage stayed denied, and both cookies came back.

If the cookies are there after Decline: confirm your banner sends the choice (Step 3) and that it runs on every page load as well as on click. Still there? Add Microsoft's revoke call, clarity("consent", false), to Decline. If they persist, turn Cookies off (Step 1).

If the /collect calls stop completely after Decline: first check the console for Clarity's blocked-IP message and turn off ad blockers. If neither explains it, your banner blocks the tag outright; confirm that Accept starts Clarity again and that the console check shows analytics_storage as GRANTED afterward. Run the Decline test from a network you haven't blocked in Step 5.

Step 3: Send the visitor's choice to Clarity

Microsoft lists four ways to pass consent: its Consent API, a supported consent platform (its FAQ names CookieYes), third-party platforms with built-in handling, or Google Consent Mode. A custom banner like ours needs the API. The current call is consentv2, with two values, ad_Storage and analytics_Storage, each set to granted or denied.

Microsoft's event-listener example on that page failed a Node syntax check. It mixes TypeScript type annotations into plain JavaScript, and it passes the strings "ad_storage" and "analytics_storage" where the syntax block expects granted or denied. This is the version we tested instead:

// Run on every page, after the Clarity tag.
function sendClarityConsent(choice) {
  if (typeof window.clarity !== "function") return;
  window.clarity("consentv2", {
    ad_Storage: "denied",
    analytics_Storage: choice === "accepted" ? "granted" : "denied",
  });
}

// Returning visitor: replay the stored choice.
let saved = null;
try { saved = localStorage.getItem("cookie_consent"); } catch {}
if (saved) sendClarityConsent(saved);

// In the banner's handlers:
// Accept  -> sendClarityConsent("accepted")
// Decline -> sendClarityConsent("declined")

Against a stubbed clarity function, no call fires before a choice, Accept sends granted, Decline sends denied, a stored choice replays on the next visit, and nothing throws when Clarity or storage is unavailable. Change cookie_consent and "accepted" to the key and value your banner stores; any other value sends denied.

ad_Storage stays denied because our project isn't connected to Microsoft Ads. Microsoft's consent table says granting it lets Clarity share data with Microsoft Ads, so pass the visitor's advertising choice there if you run that integration.

On our site the same logic lives in one helper. The banner calls it on click, and our Clarity loader replays the stored choice once it installs Clarity's queue stub, before the library arrives.

If you use Google Consent Mode: Microsoft's GCM page says Clarity honors those signals with no extra configuration. Its FAQ still says GCM support "is coming soon." Go by the dedicated page, then confirm with the console check from Step 2.

If you use a consent platform: check Microsoft's supported list first. If yours isn't on it, call consentv2 from the platform's own consent event, as above.

Step 4: Set masking for what your pages show

Settings, Masking offers three modes. Strict masks all text. Balanced, the documented default, masks content Microsoft classifies as sensitive: numbers and email addresses. Relaxed masks nothing beyond input boxes and dropdowns, which stay masked in every mode. Ours runs Balanced. Changes reach new recordings only, within about an hour.

Clarity Settings, Masking page with Strict, Balanced (selected) and Relaxed masking modes and the note that changes can't be applied retroactively

Microsoft's descriptions disagree. The masking page says Balanced is the default. The FAQ says "By default, Clarity suppresses the client's entire content," which sounds like Strict. In our project, the Balanced card reads "Masking images and text." We go by the mode our project shows as selected, then check a recording.

Clarity doesn't mask content inside style sheets or style tags, so keep sensitive text out of CSS. You can override the mode for one element under Mask by element with a CSS selector, or with a data-clarity-mask="True" or data-clarity-unmask="true" attribute in your HTML.

Our session recordings guide covers what masked fields look like on playback.

If a recording shows something it shouldn't: mask that element by selector or attribute, then wait up to an hour. Masking isn't retroactive, so that recording stays until playback data expires at 30 days (9 months if labeled or favorited), per Microsoft's retention page.

Step 5: Block your own visits by IP

IP blocking keeps your team's visits out of the dashboard, recordings and heatmaps. Go to Settings, IP blocking, Block IP address, and add an IPv4 address or a CIDR range. Microsoft says the change takes about 15 minutes, and that IPv6, dynamic addresses such as VPNs, and mobile devices can't be blocked reliably.

We block our office address; this page isn't pictured because it shows the address.

To verify, browse from the blocked network and open the browser console. Microsoft says a message appears saying the session isn't being collected "due to your configured project settings."

If the message doesn't appear: Microsoft says blocking can fail when a connection uses both IPv4 and IPv6. Retest from a desktop on the office network with IPv6 turned off, and leave phones out of the test. If it still fails, treat office sessions as unblockable and label them.

Step 6: Disclose Clarity on your site and in your privacy policy

Microsoft recommends a footer or homepage disclosure plus a privacy policy section, with sample wording for both. Its checklist: say you use Clarity, what data you capture and why, link your privacy statement, and in the policy, link Microsoft's Privacy Statement. Our banner names Clarity; our policy covers each item.

The sample site disclosure opens with "We improve our products and advertising by using Microsoft Clarity" and says using the site means agreeing to collection. Whether that's enough where your visitors live is the legal question below, so tailor it before you paste it.

What our Clarity section covers, all from the steps above:

  • Clarity and Microsoft by name, with session replay and heatmaps as the purposes.
  • First-party and third-party cookies, and when they're set (ours says on arrival, until the visitor declines).
  • Retention: playback data 30 days; labeled or favorited sessions, heatmaps and click data 9 months.
  • Integrations you run (ours connects to Google Analytics).
  • How to decline or change your mind (our footer reopens the banner), and what a decline does: Clarity deletes its cookies, ends the session, then records without cookies, one unlinked session per page.
  • Where the data goes: Microsoft's Azure cloud, possibly outside the visitor's country.

If your banner and your policy describe different behavior: fix the policy to match what Step 2 showed, and fix the banner if that behavior isn't what you want.

What do the rules say for a North American site?

Microsoft has enforced consent signals for visitors in the EEA, UK and Switzerland since October 31, 2025, and locates visitors by IP geolocation. Its FAQ says your own location doesn't matter. For Canadian visitors, we read the federal privacy commissioner's consent guidance and British Columbia's PIPA. We didn't research US state law for this post.

EEA, UK and Switzerland. Microsoft's FAQ says a site with no visitors from those regions sees no impact. It still recommends sending the signal, because enforcement "may extend to other regions in the future."

Canada, federal (PIPEDA). The Office of the Privacy Commissioner's consent principle page (issued January 8, 2018, modified August 13, 2020) says consent is only valid if people can be expected to understand the nature, purpose and consequences of the collection. It calls for express consent where a collection generally involves sensitive information, falls outside reasonable expectations, or creates a meaningful residual risk of significant harm.

Canada, joint guidelines. The federal, Alberta and BC commissioners' guidelines for meaningful consent (issued May 24, 2018) say "pointing to a line buried in a privacy policy will not suffice" to show valid consent.

Canada, closest guidance on tracking. The commissioner's guidelines on online behavioural advertising (issued December 17, 2015, modified August 11, 2025) cover ad tracking across sites, not session replay. They list conditions for opt-out consent, including that the opt-out "takes effect immediately and is persistent." We read them as a reference point only.

British Columbia (PIPA, in force January 1, 2004). Section 8(3) allows collection for specified purposes after an understandable notice and a reasonable opportunity to decline, if the individual doesn't decline and the collection is reasonable given its sensitivity. Section 10(1) requires disclosing the purposes on or before collection. The statute doesn't mention cookies or tracking.

How do you know it's working?

After a fresh Decline, Microsoft's test shows /collect calls and no _clck or _clsk. The console check reads DENIED for both, then analytics_storage reads GRANTED after Accept. A recording of your form shows masked inputs. The blocked-IP console message appears on an office desktop. Your policy names Clarity, session replay and the retention periods.

Where this guide fails

  • Microsoft's ConsentV2 page is written for consent-required projects. We call it with Cookies On. Our Step 2 test is the evidence it works on ours; rerun it after any Clarity, banner or loader change.
  • Microsoft's pages disagree. GCM support, the masking default, the Balanced label and the API example each conflict somewhere. When two pages disagree, test the behavior in your browser.
  • Mobile apps aren't covered. Microsoft says no immediate action is needed for mobile apps. Check the mobile SDK docs separately.
  • US state laws, Quebec and Alberta's own act aren't covered. Take those to counsel with the facts from Steps 1 to 6.

Frequently Asked Questions

Does Clarity respond to Do Not Track or Global Privacy Control?

Microsoft's FAQ says Clarity doesn't currently respond to browser Do Not Track signals. The same FAQ says Clarity supports Global Privacy Control.

Can a visitor opt out of Clarity themselves?

Microsoft's FAQ points visitors to the Digital Advertising Alliance opt-out page, where they select Microsoft. It adds that the Protect My Choices browser app keeps that opt-out saved.

Do I need separate consent code for each site?

Yes. Microsoft's FAQ says each Clarity project handles consent independently, recommends one project per domain, and says every page using Clarity should call the Consent API.

How long does a visitor's consent last in Clarity?

Microsoft says Clarity treats consent as valid for up to 9 months, unless the visitor updates it or local configuration requires it sooner.


Our setup came down to one decision (cookies before a choice), one tested function in place of Microsoft's broken example, and one privacy policy section. None of it shows up in Clarity's dashboard, which is why the Decline test matters. If you want the same check run on your site, see our web design services or get in touch.


Sources

  1. Microsoft Learn, "Consent Management": EEA, UK and Switzerland enforcement from October 31, 2025; no cookies there without valid consent; consent valid up to 9 months; no immediate action for mobile apps; four ways to pass consent; Consent Mode default in those regions. learn.microsoft.com/en-us/clarity/setup-and-installation/consent-management (updated 2026-05-21)
  2. Microsoft Learn, "Consent Mode": Settings, Setup, turn off to avoid setting cookies by default; waits for a valid signal; site owner responsible for informing Clarity of changes; console verification; five-step cookie test. learn.microsoft.com/en-us/clarity/setup-and-installation/consent-mode (updated 2025-08-14)
  3. Microsoft Learn, "Clarity Cookie Consent API - ConsentV2": syntax and parameters; for projects configured to require consent; event-listener example (fails a syntax check, tested October 18, 2026). learn.microsoft.com/en-us/clarity/setup-and-installation/clarity-consent-api-v2 (updated 2025-08-28)
  4. Microsoft Learn, "Changes to Clarity Reporting Without Cookie Consent": session, pages-per-session, funnel and returning-user changes. learn.microsoft.com/en-us/clarity/setup-and-installation/clarity-without-cookie-consent (updated 2025-08-27)
  5. Microsoft Learn, "Clarity Cookies": _clck, _clsk, CLID, ANONCHK, MR, MUID, SM and their purposes. learn.microsoft.com/en-us/clarity/setup-and-installation/clarity-cookies (updated 2025-08-27)
  6. Microsoft Learn, "Support for Google Consent Mode (GCM) in Clarity": Clarity honors GCM signals without extra configuration. learn.microsoft.com/en-us/clarity/setup-and-installation/cookie-gcm (updated 2025-09-22)
  7. Microsoft Learn, "Masking content": Strict, Balanced (default), Relaxed; inputs and dropdowns masked in all modes; style sheets not masked; mask by element; data-clarity-mask and data-clarity-unmask; up to one hour, not retroactive; admins only. learn.microsoft.com/en-us/clarity/setup-and-installation/clarity-masking (updated 2024-11-01)
  8. Microsoft Learn, "Data retention": playback data 30 days; labeled or favorited sessions, heatmaps and click data 9 months. learn.microsoft.com/en-us/clarity/setup-and-installation/data-retention (updated 2026-05-21)
  9. Microsoft Learn, "Blocking IP Addresses": IPv4 only; no IPv6, dynamic or mobile; CIDR ranges; about 15 minutes; admins only; console verification message. learn.microsoft.com/en-us/clarity/setup-and-installation/ip-exclusion (updated 2025-12-01)
  10. Microsoft Learn, "Sample wording for Clarity Site and Privacy Policy Disclosure": footer or homepage disclosure; sample wording; disclosure checklist; link to the Microsoft Privacy Statement. learn.microsoft.com/en-us/clarity/setup-and-installation/privacy-disclosure (updated 2025-05-14)
  11. Microsoft Learn, "Frequently asked questions" (Clarity): default content suppression wording; DNT not supported; GPC supported; DAA opt-out; third-party cookies for operational purposes; GCM "coming soon"; IP geolocation; location of the site owner not relevant; enforcement may extend; one project per domain. learn.microsoft.com/en-us/clarity/faq (updated 2026-09-08)
  12. Office of the Privacy Commissioner of Canada, "PIPEDA Fair Information Principle 3 – Consent": meaningful consent; express consent conditions. priv.gc.ca (issued 2018-01-08, modified 2020-08-13)
  13. OPC, OIPC Alberta and OIPC British Columbia, "Guidelines for obtaining meaningful consent": seven principles; a line buried in a privacy policy will not suffice. priv.gc.ca (issued 2018-05-24)
  14. Office of the Privacy Commissioner of Canada, "Guidelines on privacy and online behavioural advertising": conditions for opt-out consent. priv.gc.ca (issued 2015-12-17, modified 2025-08-11)
  15. Province of British Columbia, Personal Information Protection Act, SBC 2003, c. 63: ss. 8(3), 10(1); s. 60 in force January 1, 2004; current to October 6, 2026. bclaws.gov.bc.ca
  16. ClickWerxs, Clarity project and site code for clickwerxs.com, checked October 18, 2026: Settings, Setup, Cookies On; masking Balanced; Microsoft Ads integration Not Connected; banner and loader send consentv2 on click and on every page load (lib/clarity-consent.ts); privacy policy Clarity section, updated October 2026; Decline and Accept tests on production, October 18, 2026.

Kaleb Dickhaut — Founder, ClickWerxs. Kaleb built ClickWerxs from the ground up, from payment processing ISO to the Command Center platform to the AI SEO methodology the blog runs on. He has onboarded hundreds of small businesses onto payment and CRM systems. linkedin.com/in/kaleb-dickhaut

Ready to Stop Overpaying on Payment Processing?

Get a free rate comparison and see how much you can save with interchange-plus pricing.