← Back to My Microsoft Clarity Overview
Who this guide is for
Anyone running Microsoft Clarity on a UK or EEA site who wants to make sure the setup is compliant following the October 2025 consent enforcement change.
Prerequisites
Microsoft Clarity already installed on your site. A basic understanding of how cookie consent banners work. If you have not installed Clarity yet, start with Guide 01 first.
What you will be able to do
Understand what changed in October 2025, connect your consent management platform to Clarity via GTM, verify the setup is working, and update your privacy policy to cover Clarity correctly.
Applies to
UK sites (UK GDPR), EEA sites (EU GDPR), and Swiss sites. If your site only serves visitors outside the UK and EEA, consent enforcement does not currently apply — but best practice is to implement consent regardless.
What changed in October 2025 and why it matters
Before October 2025, Clarity tracked all visitors by default. After October 2025, it requires a valid consent signal before tracking visitors from the UK, EEA, or Switzerland.
Microsoft began enforcing consent requirements for Clarity on 31 October 2025. For any visitor from the United Kingdom, the European Economic Area, or Switzerland, Clarity now waits for a valid consent signal before collecting session data. If no consent signal is received — either because there is no cookie banner, or because the visitor declines — Clarity collects only fragmented, degraded data rather than full session recordings and heatmap contributions.
This aligns Clarity with the requirements of UK GDPR and EU GDPR, both of which require an analytics tool that sets or reads cookies for tracking purposes to obtain valid consent before doing so. The change was signalled in advance by Microsoft and took effect at the end of October 2025.
Before October 2025
- Clarity tracked all visitors by default regardless of consent
- Full session recordings collected from all visitors
- Heatmap data contributed by all sessions
- No consent API required for EU or UK visitors
After October 2025
- Clarity waits for a consent signal from UK, EEA, and Swiss visitors
- Full data only collected after consent is granted
- Without consent: fragmented sessions only, no continuous recordings
- Consent must be communicated to Clarity via the Consent API or GTM
If you installed Clarity before October 2025 and have not updated your setup
Your Clarity installation is likely running in degraded mode for UK and EEA visitors who have not granted consent through your banner. This guide explains how to connect your consent banner to Clarity so that the data collected from consenting visitors is complete and continuous.
What happens if Clarity runs without consent
Running Clarity without a valid consent setup does not mean Clarity stops entirely — it means the data you collect is fragmentary and far less useful.
When a UK or EEA visitor arrives at your site and no consent signal has been received by Clarity, it switches to a restricted mode. In this mode, each individual page view is treated as a separate session rather than part of a continuous visit. A visitor who views five pages without granting consent will appear as five separate one-page sessions in your Clarity data rather than one five-page session.
This makes several things effectively unusable. Session recordings show one page at a time and cannot capture the visitor’s journey across multiple pages. Heatmaps receive contributions, but the session-level context is lost. Filters that rely on session behaviour — such as filtering for sessions with rage clicks, or sessions that visited a specific page — are significantly less reliable against fragmented data.
Beyond the practical data quality problem, running Clarity without a compliant consent setup for UK and EEA visitors is a regulatory compliance issue under UK GDPR and EU GDPR. The practical and the legal incentives point in the same direction: get consent working properly.
Do not mistake fragmented data for a quiet period
If you recently installed Clarity without consent management in place, the recording and session counts in your dashboard may look low. This is likely because UK and EEA visitors are generating fragmented single-page sessions rather than being excluded entirely. The data exists but is not usable at the session level. Getting consent working will improve your data quality immediately for consenting visitors.
What Clarity does by default to protect visitor data
Clarity has several data protection defaults built in. Understanding these is important context before configuring additional consent controls.
Even before consent management was introduced, Clarity applied a set of default data protections to every site. These are worth understanding because they address common concerns about what recordings capture.
Default on
Form input masking
By default, Clarity masks the content of all text input fields in recordings. You see the interaction with the field (clicking it, typing, deleting) but not the text the visitor typed. This applies to email addresses, names, phone numbers, and any other free-text input.
Default on
Password field masking
Password fields are masked by default and the masking cannot be disabled. No session recording will ever capture a visitor’s password. This is a hard protection, not a configurable setting.
Default on
IP address anonymisation
Clarity does not store visitors’ full IP addresses. Approximate location data (country, region) is available in the dashboard, but the visitor’s specific IP address is not retained in a form that identifies them individually.
Configurable
Additional content masking
If your site displays personal data in page content — for example, a logged-in user’s name in the header or an account number on a dashboard — you can apply additional masking classes to those elements. Clarity provides a clarity-mask CSS class for this purpose. Elements marked with this class are blurred in recordings.
The masking defaults mean recordings are safer than many people assume
A common concern when introducing session recordings to clients is that recordings might capture sensitive visitor data. In practice, Clarity’s defaults mean form inputs are never readable in a recording. The main privacy consideration is whether the visitor consented to being recorded in the first place — which is what the consent setup addresses.
The GTM consent trigger method (recommended)
If you installed Clarity via Google Tag Manager, the cleanest compliance setup is a GTM consent trigger that fires the Clarity tag only after the visitor grants analytics consent.
This is the approach used across the business sites and client sites at Carden Digital. GTM’s built-in consent mode support means you can connect your consent management platform (CMP) — such as Cookiebot, CookieYes, or OneTrust — to GTM, and then set the Clarity tag to fire only when the relevant consent category is granted. The CMP handles the banner, the consent decision, and the signal. GTM passes that signal to the Clarity tag. Clarity waits until it receives the go-ahead before collecting data.
1
Confirm your CMP is publishing consent signals to GTM’s Data Layer
Most major CMPs — Cookiebot, CookieYes, OneTrust, Usercentrics — support Google Consent Mode and push consent updates to the GTM Data Layer automatically when a visitor makes a choice. Check your CMP’s documentation to confirm this is enabled for your setup. Without this, the GTM consent trigger cannot work because it has nothing to listen to.
If you are using Cookiebot, for example, it publishes a cookiebot_accepted_analytics event to the Data Layer when analytics cookies are accepted. CookieYes publishes a cookieyes-consent-update event. The event name varies by platform — check your CMP’s GTM integration documentation for the exact event name.
2
Create a consent trigger in GTM
In your GTM container, create a new trigger. Set the trigger type to “Custom Event”. Enter the consent-granted event name that your CMP publishes to the Data Layer. This trigger will fire when the visitor grants analytics consent — which is the moment Clarity should be allowed to start collecting data.
If your CMP uses Google’s standard Consent Mode signals rather than a custom event, you can instead use GTM’s built-in Consent Initialisation trigger type, which fires in the correct sequence relative to consent signals.
GTM Custom Event Trigger — example for CookieYes // In GTM: New Trigger Trigger Type: Custom Event Event Name: cookieyes-consent-update Condition: {{CookieYes Analytics}} equals accepted // This fires when the visitor accepts analytics cookies // Replace event name and variable with your CMP's equivalents
3
Update your Clarity tag firing trigger
Open the Clarity tag in your GTM container. Currently it most likely fires on “All Pages”. Add your new consent trigger as an additional firing trigger. The tag will now fire on page view (for returning visitors who have already granted consent and whose consent cookie is already set) and also when the consent-granted event fires during a new session where the visitor accepts.
Do not remove the All Pages trigger without a returning visitor trigger
If you remove the All Pages trigger and only fire on the consent event, Clarity will not fire for returning visitors whose consent cookie is already set — because they will not see the banner and will not trigger the consent event again. Either keep a modified All Pages trigger that checks for existing consent, or use GTM’s Consent Initialisation trigger type which handles this automatically.
4
Publish the GTM container
Submit and publish the updated GTM container. This is the step people most often forget — a GTM change has no effect until the container is published. After publishing, test the setup in GTM Preview mode before confirming it is live.
If you are not using GTM
If Clarity is installed via a direct script or a WordPress plugin rather than GTM, the Clarity Consent API is the mechanism for communicating consent decisions.
Microsoft provides a Consent API specifically for sites that are not using GTM or that need more direct control over when Clarity receives the consent signal. The API allows you to pass a consent decision to Clarity directly from your CMP or from a custom consent implementation.
The basic pattern is: Clarity’s tracking script loads on the page, but waits. When your CMP determines that the visitor has granted analytics consent — either from a fresh decision or from a stored consent cookie on a return visit — your code calls the Clarity consent function with a consent signal of true. Clarity then begins collecting data.
Clarity Consent API — basic implementation pattern // Call this function when the visitor grants analytics consent // Replace the consent check with your CMP's actual method
function handleConsentGranted() {
if (typeof clarity === "function") {
clarity("consent");
}}
// Example: check consent on page load for returning visitors document.addEventListener("DOMContentLoaded", function() {
if (yourCMP.hasAnalyticsConsent()) { handleConsentGranted(); } });
// Example: respond to visitor accepting via the banner
yourCMP.onConsentAccepted(function() { handleConsentGranted(); });
Your CMP will have its own callback or event mechanism
The exact method for detecting when consent is granted depends on your CMP. Cookiebot, CookieYes, OneTrust, and most other major platforms provide callback functions or custom events that fire when the visitor accepts. Refer to your CMP’s developer documentation for the specific method name and how to register a callback.
WordPress sites using the Clarity plugin
If you installed Clarity via the official Microsoft Clarity WordPress plugin, the plugin has a built-in consent integration setting. In the plugin settings, look for a consent mode or cookie compliance option. This may allow the plugin to automatically wait for your existing cookie consent plugin (such as GDPR Cookie Consent or Cookiebot) before firing Clarity. Check the current plugin settings before implementing a manual Consent API solution — the plugin may handle it for you.
How to verify the setup is working
After configuring consent, you need to confirm that Clarity is waiting for consent before firing, and collecting full data after it is granted.
1
Test in an incognito window before accepting consent
Open your site in a private or incognito browser window. This clears any existing consent cookies, so the banner will appear as it would to a new visitor. Before accepting the consent banner, open your browser developer tools and go to the Network tab. Filter for requests to “clarity.ms”. If Clarity is correctly waiting for consent, you should see no Clarity network requests at this point.
2
Accept analytics consent and check for Clarity requests
Accept analytics cookies via your consent banner. Within a few seconds, Clarity network requests should appear in the Network tab. If they appear only after consent is granted, the setup is working correctly. If they appear before consent is granted, the trigger is not conditional on consent and the setup needs adjustment.
3
Check for a full session recording in Clarity
After accepting consent and browsing the site for a few minutes, go to Clarity and check the recordings list for your project. You should see a full session recording — multiple pages if you navigated across them — rather than fragmented single-page sessions. This confirms Clarity is receiving consent and collecting continuous session data.
4
Test the decline path
Repeat the test in a new incognito window, but this time decline analytics cookies via the consent banner. After declining, browse several pages. Go back to Clarity and check whether a recording was generated. If the consent setup is working correctly, declining should result in no recording, or only fragmented single-page sessions. No continuous multi-page recording should appear for a visitor who declined.
What your privacy policy needs to say about Clarity
Any site using Microsoft Clarity needs to disclose it in the privacy policy. Here is what that disclosure should cover and a practical template to adapt.
UK GDPR requires transparency about the tools used to collect visitor data. Your privacy policy needs to tell visitors that Clarity is in use, what it collects, who the data is shared with (Microsoft), how long data is retained, and what legal basis you are relying on for the collection. For analytics tools, the legal basis is typically consent — which is exactly what the consent setup implements.
Privacy policy template — Clarity section
Website analytics and session recording
We use Microsoft Clarity, provided by Microsoft Corporation, to understand how visitors use this website. Clarity records anonymised session data including mouse movements, clicks, scroll behaviour, and pages visited. This data is used to improve the website’s usability and performance.
Clarity does not record the content of form fields (such as names, email addresses, or passwords). Data collected by Clarity is processed by Microsoft and stored on Microsoft’s servers. Microsoft may use this data in accordance with its privacy policy, which you can review at privacy.microsoft.com.
We rely on your consent as the legal basis for using Clarity. You can withdraw consent at any time by adjusting your cookie preferences using the cookie settings link in the footer of this site.
Session recordings are retained for 30 days. Aggregated heatmap data is retained for up to 13 months.
For more information about how Microsoft handles data collected via Clarity, visit: clarity.microsoft.com/privacy
Adapt this to your site before using it
The template above covers the standard Clarity setup. If you have configured additional masking, enabled mobile app tracking, or have specific data sharing arrangements, adjust the wording accordingly. Also check whether your existing privacy policy uses specific wording conventions or a particular reading level — consistency with the rest of the policy matters for readability.
In addition to the privacy policy, your cookie banner’s cookies section should list the Clarity cookies specifically. Clarity uses a small number of first-party cookies to identify sessions and manage the data collection. The cookie names (such as _clck and _clsk) and their purposes are documented in Microsoft’s Clarity privacy documentation, which your CMP’s cookie scan should detect automatically when you run a site scan.
Where Clarity stores data and what that means for UK sites
Clarity data is stored on Microsoft Azure infrastructure, including US-based servers. This is compliant for UK sites but is worth understanding clearly.
Microsoft Clarity stores data on Microsoft’s global Azure infrastructure. For UK customers, Microsoft Ireland processes the data under a contract that complies with UK GDPR’s requirements for international data transfers. The transfer to US-based servers is covered by the EU-US Data Privacy Framework and UK equivalent arrangements.
This is a standard arrangement for many SaaS analytics tools, including Google Analytics. It does not make Clarity non-compliant, but it does mean data leaves the UK. Your privacy policy should disclose international transfers if your site serves UK visitors, which the template wording above covers.
If a client or your own legal team raises specific concerns about data residency — for example, in a regulated sector where EU or UK data residency is a contractual requirement — Clarity may not be the right tool for that specific situation. In that case, the data residency point from the Guide 05 comparison with Hotjar is worth revisiting, as Hotjar operates from EU infrastructure.
| Data type | Where stored | Retention period | International transfer |
|---|---|---|---|
| Session recordings | Microsoft Azure (global, including US) | 30 days | Yes — UK to US under DPF / UK GDPR basis |
| Heatmap data (aggregated) | Microsoft Azure (global, including US) | Up to 13 months | Yes — same basis as above |
| Form field content | Not collected — masked by default | N/A | N/A |
| IP addresses | Anonymised — full IP not retained | N/A (not stored) | N/A |
| Approximate location | Microsoft Azure | Same as session/heatmap | Yes — same basis |
GDPR compliance checklist for Microsoft Clarity
Consent mechanism
- Cookie consent banner is in place and shown to UK and EEA visitors on first visit
- Analytics cookies (including Clarity) require explicit opt-in — pre-ticked is not compliant
- Visitors can decline analytics cookies and the site continues to function
- Consent decision is stored so returning visitors who accepted are not prompted again, and those who declined are not tracked
Clarity consent integration
- GTM method: Clarity tag fires on consent-granted event, not unconditionally on All Pages
- GTM method: returning visitors with stored consent are still tracked (not only new acceptances)
- GTM container published after making changes
- Non-GTM method: Clarity Consent API called when consent is granted (on new acceptance and on page load for returning consent holders)
Verification
- Tested in incognito window: no Clarity network requests before consent is granted
- Tested in incognito window: Clarity requests appear after consent is granted
- Full multi-page session recording visible in Clarity after accepting consent
- Tested decline path: no continuous multi-page recording generated for a visitor who declined
Privacy documentation
- Privacy policy includes a Clarity disclosure covering: what it collects, who it is shared with, retention periods, legal basis, and how to withdraw consent
- Cookie banner lists Clarity cookies (eg. _clck, _clsk) in the analytics category
- International data transfer disclosed (UK to US) in privacy policy
- Privacy policy updated date reflects these changes
Ongoing
- Data masking reviewed: any elements showing personal data in page content are masked using the clarity-mask class
- If running Clarity on client sites: client has been informed Clarity is in use and privacy policy has been updated on their site
- Noted the 30-day recording retention and 13-month heatmap retention periods in any DPA or data register
Get the compliance setup done once, correctly
Clarity’s data is only as useful as its consent setup allows. A properly configured consent integration means full, continuous session recordings from visitors who agree to be tracked — which is what the tool is designed to provide.
Disclosure: This is not a paid promotion. I have no affiliate or commercial relationship with Microsoft or Microsoft Clarity. It is a tool I genuinely use and have implemented compliantly on my own business sites and client sites. Views are my own.