Analytics and consent integration · Updated November 15, 2026
Microsoft Clarity integration
Microsoft Clarity records sessions and builds heatmaps at no charge. We add it to WordPress, Webflow, Astro, Next.js or custom software, set masking before the first recording, and wire it to your consent banner so it waits for a yes where the law expects one.
Microsoft Clarity at a glance
- Connects
- One tracking script, the ConsentV2 API, a GA4 connection, and consent platforms Microsoft lists as supported.
- WordPress
- Microsoft's official Clarity plugin, or the script in the theme header.
- Webflow
- The Microsoft Clarity app in Webflow's marketplace, or the script in site-wide head code.
- Astro or Next.js with Sanity
- Script in the shared layout; mask attributes on sensitive components in code.
- Custom software
- Script on app pages, Strict masking, and unmask attributes only where safe.
- Complexity
- Medium. Masking and consent take longer than the script.
- Typical setup
- 1 day for the script and masking, 2 to 4 days with consent wiring, GA4 and a recording review.
How we connect Microsoft Clarity
WordPress
We use Microsoft's Clarity plugin from the WordPress directory, or add the script through the theme. Login, checkout and account templates get data-clarity-mask on their containers. The plugin adds no consent banner; Clarity reads the visitor's choice from a consent plugin on Microsoft's supported list, such as CookieYes or the WP Consent API.
Webflow
Clarity is listed in Webflow's app marketplace, or we paste the script into site-wide head code on a paid site plan. Clarity takes its consent signal from a third-party banner. Webflow's tracking consent API governs only Webflow Analyze and Optimize and can't pause Clarity.
Astro or Next.js with Sanity
We load the script once in the shared layout and check that recordings follow client-side route changes. Sensitive components, such as forms, carry data-clarity-mask in the code itself, so an editor who adds a form block in Sanity can't expose what visitors type into it.
Custom software
Clarity works on logged-in pages too, which is where masking matters most. We switch the project to Strict mode, then unmask navigation and labels with data-clarity-unmask. Recording a client portal or staff tool should be a deliberate decision, written into your privacy notice before it starts.
What organizations use Microsoft Clarity for
Finding where forms lose people
Recordings show hesitation, rage clicks and the field where people give up. We set up filters for your donation, application or quote pages so staff watch those sessions instead of scrolling through thousands.
Heatmaps before a redesign
Click and scroll heatmaps show how far people read and what they try to click that isn't a link. We collect them on the pages under review a few weeks before design work starts, so decisions begin with what visitors did.
Pairing it with GA4
Connecting GA4 brings Google Analytics figures into Clarity's dashboard. Microsoft's docs say Clarity doesn't send playback URLs to GA4 and doesn't support GA4 segments, so your team moves between the two tools rather than filtering one by the other.
What to watch out for
What masking covers by default
Balanced is the default mode. It masks numbers and email addresses, and input boxes and dropdowns are masked in every mode. Names and other text shown on the page still appear. Clarity doesn't mask content in style sheets. Masking changes apply only to new recordings and can take up to an hour, so we set them before launch.
Consent rules by region
Since October 31, 2025, Clarity enforces consent signals for visits from the EEA, the UK and Switzerland. As of November 15, 2026, Canada isn't on that list, but since September 22, 2023, Quebec's Law 25 has required tracking that can identify, locate or profile someone to be off by default. We treat session recordings as that kind of tracking and hold Clarity until consent.
The script's performance cost
Clarity loads asynchronously, and Microsoft's sample measurements put the download near 25 KB, cached for a day. Microsoft says most sites see no measurable load impact but doesn't publish the benchmarks. The script still downloads, runs and watches the page, so we compare LCP and INP with and without it.
Sources
Checked against Microsoft's Clarity docs on November 15, 2026.
- Masking content Strict, Balanced, Relaxed
- Consent Mode October 31, 2025 enforcement
- Clarity Consent API, ConsentV2 no-consent mode
- Supported consent management platforms
- GA4 integration no playback URL, no segments
- Clarity FAQ Azure storage, 30-day retention
- How Clarity minimizes impact on Core Web Vitals October 30, 2024
- Webflow integration
- Webflow consent management API Analyze and Optimize only
Questions about Microsoft Clarity
What does Clarity do when a visitor declines?
It keeps running in no-consent mode. Clarity sets no cookies, gives each page view its own ID and doesn't join pages into one session. If someone withdraws consent, Clarity deletes its cookies and ends the session. You still get page-level heatmaps.
Does Clarity work with our cookie banner?
Probably. Microsoft lists CookieYes, Cookiebot, Usercentrics, the WP Consent API and others as passing consent automatically once Clarity's Consent Mode is on. For a custom banner we call the ConsentV2 API with ad_Storage and analytics_Storage values. As of November 15, 2026, OneTrust is listed as coming soon.
Where is Clarity data stored, and for how long?
In Microsoft Azure, per the Clarity FAQ, which doesn't name a region, so plan for storage outside Canada. Recordings are kept for 30 days. Quebec organizations should assess the transfer first, and your privacy policy should name Clarity.
Related integrations
Cookiebot
Cookiebot is Usercentrics' consent management platform for small and mid-sized sites, with a cookie scanner, consent banner, automatic blocking and Google Consent Mode.
Cookiebot integrationCookieYes
CookieYes is a consent management platform with a cookie scanner, banner templates, automatic and manual script blocking, and Google Consent Mode v2 support.
CookieYes integrationFathom Analytics
Fathom Analytics is a paid, cookieless website analytics service run by Conva Ventures Inc. of Victoria, British Columbia.
Fathom Analytics integrationGoogle Analytics 4
Google Analytics 4 is Google's web and app analytics product. It measures visits as events and processes them on Google's servers, with no documented option to keep data in Canada.
Google Analytics 4 integrationGoogle Tag Manager
Google Tag Manager is Google's tag management system. A web container loads tags such as GA4 and the Meta Pixel in the browser; a server container runs them on infrastructure you host.
Google Tag Manager integrationMeta Pixel and Conversions API
The Meta Pixel is Meta's browser code for measuring Facebook and Instagram ads. The Conversions API is its server-to-server counterpart.
Meta Pixel and Conversions API integrationWebsite development
Builds with Clarity masking written into the form components.
Website developmentSEO
Heatmaps and recordings that explain why a ranking page doesn't convert.
SEOPublic sector
Service sites where recordings need Strict masking and a privacy assessment.
Public sector
Want to see how people use your forms?
Tell us which pages you want to understand and how much of your traffic comes from Quebec or Europe. We'll install Clarity with masking and consent set before the first recording.
Book a call