Skip to content

Microsoft Clarity Consent Mode

Microsoft Clarity Consent Mode is Microsoft Clarity’s mechanism for respecting the cookie consent choice on page visits from the European Economic Area, United Kingdom and Switzerland. A valid consent signal is required to ensure full functionality of Clarity features for users in these regions.

Microsoft Clarity collects user session data using a cookie. The cookie tells Clarity how a user accessed your site, the user's location, the user's language preference, and more.

As a website publisher, you might be subject to data protection laws that require you to obtain consent before collecting users’ personal information, such as the EU's GDPR and ePrivacy Directive. Other regulations may require you to provide users with the ability to opt out of cookie usage.

Usercentrics CMP has built-in support for Microsoft Clarity Consent Mode. You must set up Usercentrics CMP with Microsoft Clarity Consent Mode once you start collecting or passing user data to Microsoft Clarity.

Follow these steps to set up Microsoft Consent Mode for Usercentrics CMP:

  1. In the Configurations tab, select your configuration.

  2. Under Service Settings - Data Processing Services, click the Add DPS via Database button. Add the Microsoft Clarity service to the list of services, with the Marketing category. Then, publish the changes.

  3. Enable Microsoft Clarity Consent Mode under Configuration - CMP Settings - Microsoft Clarity Consent Mode

  4. Make sure that the script tag is implemented on the website.

When enabled, Usercentrics sets the necessary properties on the website so that Microsoft only uses user data for ads and analytics if consent is given. The permissions are mapped to:

  • Marketing category

  • Microsoft Clarity (Template ID: jzMEq56vW) data processing service

Microsoft Clarity Consent Mode settings for cookie management and user consent control

Clarity uses two parameters to communicate user consent:

Name Description Accepted values
ad_Storage Indicates whether the user has consented to Microsoft processing data related to ads. GRANTED or DENIED
analytics_Storage Indicates whether the user has given Microsoft consent to store analytics-related data. GRANTED or DENIED

If these parameters are set in the browser, Microsoft Clarity will honor that consent signal:

  • It will set its cookies and persisting session/user IDs if the value is GRANTED.

  • It will run in no-consent mode without setting cookies (treating each page view as a separate ID) if the value is DENIED.

If these parameters are not set, features/data collection are impacted and reporting behavior changes (i.e., you won’t get the “full” Clarity experience).

The value of ad_Storage and analytics_Storage is set to GRANTED only when the user has given consent for the Marketing category or for the Microsoft Clarity DPS that is used on your website.