Starting October 31, 2025, Microsoft Clarity requires websites serving visitors in the EEA, UK, or Switzerland to explicitly provide consent information using the Consent API v2. Without it, Clarity will operate in a limited, no-consent mode—no cookies, no session stitching, and restricted analytics.
If you’re using Sypher as your cookie consent manager, you can easily forward users’ choices to Clarity so it only collects data after proper consent.
<script type="text/javascript">
document.addEventListener('gdprCookiesEnabled', function(e) {
var analyticsConsent = e.detail.analytics ? "granted" : "denied";
var adConsent = e.detail.marketing ? "granted" : "denied";
// Send consent to Clarity using Consent v2 API
window.clarity('consentv2', {
analytics_Storage: analyticsConsent,
ad_Storage: adConsent
});
});
</script>
What this does:
In the console, you can verify the consent status with:
clarity('metadata', (d,u,consent) => console.log('consentStatus:', consent), false, true, true);
By following these steps, your website stays GDPR-compliant while ensuring Clarity receives the correct consent information. Your analytics remain accurate, and your users’ privacy choices are fully respected.