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.
| Model | Source |
|---|---|
| sonnet | pack: cro |
Full Reference
Microsoft Clarity
Section titled “Microsoft Clarity”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.
Quick Reference
Section titled “Quick Reference”| Item | Value |
|---|---|
| Pricing | Free, unlimited sessions |
| Script tag | Auto-generated in Settings → Setup |
| NPM package | npm install @microsoft/clarity |
| Consent required | EEA/UK/CH since Oct 31, 2025 |
| Docs | https://learn.microsoft.com/en-us/clarity/ |
| Dashboard | https://clarity.microsoft.com/ |
| Data Export API | 10 requests/project/day, 1–3 day window, 1,000 row cap |
| Custom smart events | Max 20 per project |
Reference Index
Section titled “Reference Index”| I want to… | File |
|---|---|
| Install and set up tracking (script tag, NPM, Next.js, Astro) | reference/setup.md |
| Configure consent for EEA/UK/CH users | reference/consent.md |
| Analyze heatmaps and interpret click/scroll patterns | reference/heatmaps.md |
| Filter and watch session recordings | reference/session-recordings.md |
| Track smart events and custom events | reference/events.md |
| Use Copilot AI for session and heatmap insights | reference/copilot-ai.md |
| Monitor AI referral traffic (AIPlatform channel) | reference/ai-traffic.md |
| Export data via the Data Export API | reference/api.md |
| Identify users, set custom tags, and mask sensitive content | reference/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.
Announcement
Section titled “Announcement”┏━ 📊 microsoft-clarity ━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Heatmaps, session recordings, smart events, and AI insights via Clarity ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛