Skip to content

microsoft-clarity

Use when implementing Microsoft Clarity for heatmaps, session recordings, smart events, AI insights, or consent management. Also use when analyzing user behavior, identifying UX friction, or setting up LLM referral tracking.

ModelSource
sonnetpack: cro
Full Reference

Microsoft Clarity is a free, unlimited behavior analytics platform — heatmaps, session recordings, smart events, and AI-powered insights. No session caps, no data sampling, no paywalls. Every session is recorded.

Clarity is behavior-layer: you see how users interact with pages. PostHog and GA4 are event/funnel-layer — you track what users do across sessions. Run all three. Clarity always fires unconditionally (analytics tier), not consent-gated for marketing purposes unless serving EEA/UK/CH traffic.

ItemValue
PricingFree, unlimited sessions
Script tagAuto-generated in Settings → Setup
NPM packagenpm install @microsoft/clarity
Consent requiredEEA/UK/CH since Oct 31, 2025
Docshttps://learn.microsoft.com/en-us/clarity/
Dashboardhttps://clarity.microsoft.com/
Data Export API10 requests/project/day, 1–3 day window, 1,000 row cap
Custom smart eventsMax 20 per project
I want to…File
Install and set up tracking (script tag, NPM, Next.js, Astro)reference/setup.md
Configure consent for EEA/UK/CH usersreference/consent.md
Analyze heatmaps and interpret click/scroll patternsreference/heatmaps.md
Filter and watch session recordingsreference/session-recordings.md
Track smart events and custom eventsreference/events.md
Use Copilot AI for session and heatmap insightsreference/copilot-ai.md
Monitor AI referral traffic (AIPlatform channel)reference/ai-traffic.md
Export data via the Data Export APIreference/api.md
Identify users, set custom tags, and mask sensitive contentreference/custom-identifiers.md

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.


┏━ 📊 microsoft-clarity ━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Heatmaps, session recordings, smart events, and AI insights via Clarity ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛