Skip to main content

What is Microsoft Clarity Consent API?

The Microsoft Clarity Consent API is a JavaScript interface used to communicate a website visitor’s cookie consent choice to Microsoft Clarity. It ensures that Clarity only activates tracking, like setting first-party and third-party cookies, session recordings, heatmaps, and analytics, after the user has granted explicit consent. If consent is denied, Clarity switches to a no-consent mode where no cookies are set and limited, cookieless tracking occurs (assigning a unique ID per page view without persisting sessions).

This API helps website owners comply with privacy regulations such as the GDPR, UK GDPR, and ePrivacy Directive.

Starting 31 October, 2025, Microsoft Clarity will enforce consent signal requirements in the EEA, UK, and Switzerland.

For more details, check out our guide on Microsoft Clarity Consent API.

Start your compliance right away

14-day free trialCancel anytime

Get started for free

View plans