Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Starting October 31, 2025, Clarity begins enforcing consent signal requirements for page visits originating from the European Economic Area (EEA), United Kingdom (UK), and Switzerland (CH). A valid consent signal is required to ensure full functionality of Clarity features for sessions of the users from these regions.
Clarity's Consent Mode allows you to adjust cookie access based on the user's current consent status. With Consent Mode enabled, Clarity only set cookies after receiving valid consent from the user. To ensure Clarity does not set cookies prematurely, you can enable Consent Mode, which allows cookies to be set only after valid user consent is received.
Enabling Consent Mode
To ensure Clarity does not set first-party and third-party cookies until you obtain consent, follow these steps:
Select the Clarity project. Go to Settings -> Setup and Turn OFF to avoid setting cookies by default.
Note
Consent Mode is enabled by default for all users originating from the European Economic Area (EEA), United Kingdom (UK), and Switzerland (CH).
Once enabled, Clarity waits for a valid consent signal before setting any cookies. Refer to the list of ways to pass consent signal to Clarity.
Refer to Clarity Consent API for details on the latest implementation.
Implementing Consent Mode
To ensure Clarity respects user privacy and aligns with global compliance standards, follow these steps to implement Consent Mode on your site:
Note
The following instructions assume that you can provide Clarity with the consent status for each individual visitor to your site. If you're unsure of your consent management methods, or if you can't customize your site's JavaScript to send the necessary signal to Microsoft, consult your website developer.
Step 1: Get user consent
Before collecting any data, obtain user consent. You can do this by:
- Using a supported Consent Management Platform (CMP): These platforms automatically manage and pass consent signals to Clarity.
- Implement a custom consent banner: If you're not using a CMP, you can build your own banner and communicate consent using Clarity's Consent API.
Step 2: Communicate consent status to Clarity
Once consent is collected, you need to communicate the user's preferences to Clarity.
Clarity currently integrates with CookieYes, with additional CMP support coming soon. These integrations enable automatic passing of consent signals. See the list of supported CMPs.
If you're using a custom solution or a CMP not listed above, you can pass the user's consent state using our Consent API.
Note
As a site owner, you're responsible for informing Clarity any changes in user consent, so that Clarity can remove any previously set cookies accordingly.
Step 3: Verify consent implementation
To confirm that consent is being passed correctly and Clarity is behaving as expected, follow these steps:
Step a: Open developer tools
- Right-click anywhere on your site and select Inspect or
- Select Ctrl+Shift+I (Windows) / Cmd+Option+I (Mac)
- Go to the Console tab
Step b: Run the verification function
Paste and run the following function in the console:
clarity('metadata', (d, upgrade, consent) => {
console.log('consentStatus:', consent);
}, false, true, true);
Step c: Review the output
Look for the consentStatus object in the console. If the Clarity project is in the Consent Mode and the user has not accepted cookies, Clarity should not be setting any cookies.
You should see a consent object like this:
{
analytics_storage: "DENIED",
ad_storage: "DENIED"
};
This confirms that Clarity is respecting the user's consent preferences.
After a user interacts with the consent banner, if the Consent API is correctly implemented or a supported CMP is used, the changes should automatically appear in the console based on the user's selection.
For example, if a user interacts with the consent banner and accepts all cookies, the output for consentStatus object is:
{
analytics_storage: "GRANTED",
ad_storage: "GRANTED"
};
Steps to confirm Clarity isn't writing cookies
Note
Clarity can recognize when an end user declines cookies after initially accepting it. This informs Clarity to stop writing cookies for that user.
- Clear cookies for your website.
- Navigate to your website.
- Decline to give cookie consent.
- Ensure Clarity is executing (check for the /collect calls).
- Check your browser cookies and observe that there's no entry for _clck or _clsk.
FAQ
For more answers, refer to Cookie Consent FAQ.