Microsoft Clarity, set up with consent
Microsoft Clarity gives you heatmaps and recordings at no cost. We install it with the consent signal Clarity now requires for visitors from the EEA, UK and Switzerland.
How we set it up
The method depends on where your site is built. Here is what we use for Microsoft Clarity on each platform.
Framer
Clarity runs as a tag in the GTM container in Framer’s custom code. When the visitor answers the cookie banner, a second tag calls Clarity’s consentv2 API with their choice. Without consent Clarity runs in its cookieless mode, with each page view treated as separate.
Framer development Via GTMWebflow
We add Clarity to the GTM container in Webflow’s custom code and wire the consent call to your banner. Form fields and account areas get Clarity’s masking attribute in the Designer, so their content never leaves the browser.
Webflow development Via GTMAstro
On Astro, Clarity loads from GTM in the base layout. The consent call runs from the banner’s accept event. Clarity is light, but we still limit recordings to the pages under study if the site has heavy traffic.
Astro development Via GTMNext.js
In Next.js, Clarity loads through the GTM container from @next/third-parties. Clarity handles client-side route changes itself. We pass consent through consentv2 and check that page transitions show as separate pages in recordings.
Next.js developmentWhat teams use it for
Spot rage clicks
Clarity flags repeated clicks on elements that do nothing, often a sign of a misleading design.
Compare segments
Recordings filtered by device, source or page help explain why mobile visitors convert less.
Cheap first look
Free heatmaps on a new site show early problems before you invest in a paid tool.
What to watch out for
Clarity requires a consent signal for EEA, UK and Swiss visitors. Without it, features are limited and you carry the compliance risk.
Clarity data is processed by Microsoft. Check where it is stored and add Microsoft to your list of processors.
Masking defaults can be relaxed in settings. Keep strict masking on for anything behind a log-in.
Questions about Microsoft Clarity
Is Microsoft Clarity free?
What changed with Clarity consent in 2025?
Can Clarity connect to Google Analytics?
Microsoft Clarity or Hotjar?
Thomas OldenburgerFounder, design and build leadStill deciding? A 30-minute call answers most of it.
Related integrations and services
Hotjar
Heatmaps, session recordings and on-page surveys that show how visitors use your pages.
OpenPostHog
Product analytics, session replay and feature flags, with an EU cloud option.
OpenGoogle Analytics
Google’s free web analytics (GA4) for traffic, events, conversions and acquisition reports.
OpenWebsite design
Clarity shows where visitors hesitate, which tells us what to fix in a redesign.
OpenGoogle Tag Manager
Load Clarity through one tag container, after consent.
OpenUX audit
Glossary definition.
Open