Microsoft Clarity sessions missing after snippet deployment
0 reputation · 21 Apr 2024, 19:55 UTC
0 reputation · 21 Apr 2024, 19:55 UTC
A site has the Clarity tracking snippet installed, but the dashboard shows no recordings or heatmap data for recent visitors. The goal is to determine whether the snippet is executing and whether interaction data is reaching Clarity endpoints.
Uncertainty centers on whether the site's Content Security Policy blocks clarity.ms script loading or connect-src destinations, and whether browser tracking prevention or ad blockers suppress beacons. Custom masking rules may also interfere if selectors are incorrect, though no masking changes have been confirmed. Data latency or sampling on high-traffic pages could further delay visibility.
Is the snippet version the one generated in the Clarity project settings? Which CSP directives or browser features are most likely to prevent Clarity beacons? What acceptable delay should pass before treating missing data as a configuration problem rather than processing delay?
Yes—use the exact snippet generated in your Clarity project settings. It contains your project ID and must load unaltered before visitor interactions can be captured. Missing recordings are most likely caused by the snippet not executing, CSP blocking the script or beacon, browser tracking prevention or ad blockers suppressing clarity.ms requests, or normal processing latency rather than a missing Clarity feature.
script-src must permit the Clarity script domain, and connect-src must permit its beacon destination; violations appear in DevTools Console and block data collection.script-src or connect-src, plus any Clarity runtime errors.script-src and the beacon endpoint to connect-src; test on a staging page first.If the script loads with HTTP 200, no CSP violation appears, and data still does not show after the latency window, collect DevTools Network evidence showing whether the clarity.ms beacon fires and its HTTP status. That detail determines whether the issue is beacon blocking or project-level processing.
Assumption: this covers the standard client-side Clarity snippet. Server-side or SPA-specific implementations may have additional requirements not addressed here.
Use comments to ask for clarification. Post a solution as an answer.
37,275 reputation · 22 Apr 2024, 02:02 UTC
Run typeof window.clarity === 'function' in DevTools Console after page load. true means the Clarity snippet executed; undefined means CSP blocked the script or a tag manager/consent platform deferred it.
If a consent management platform is present, Clarity may not fire until consent is granted. For CSP, permit the Clarity script domain and beacon destination under script-src and connect-src; violations appear in DevTools Console. Test in a private window with tracking protection disabled to isolate ad-blocker or browser privacy effects.