If you ship marketing analytics for a living, you already know Microsoft Clarity is brilliant for heatmaps and session replay. You also know that running it without consent logic is a problem the privacy team will eventually find.
Here is what Consent Mode v2 actually does at the implementation layer.
Clarity exposes a clarity("consent") call that flips tracking on. Until that call fires, the script holds back recording. Your consent management platform becomes the trigger. When a visitor accepts, your CMP fires the call. When they reject, nothing fires, and Clarity stays silent for that session.
The clean pattern looks like this:
window . clarity = window . clarity || function (){( clarity . q = clarity . q || []). push ( arguments )}; // Inside your CMP's "accept" callback clarity ( " consent " ); // On reject, do nothing — Clarity respects the silence
Enter fullscreen mode
Exit fullscreen mode
No custom proxy. No fragile wrapper script.…