Does Microsoft Clarity Work in China? Session Recordings, PIPL & Data Residency
Microsoft Clarity records your visitors — their DOM content, clicks, scrolls and full session replays — and stores that data on Microsoft's offshore Azure cloud, where Microsoft is itself a data controller. For mainland China that is a PIPL cross-border transfer, with no in-country storage region for Clarity. A compliance-first look at the data-residency question.
Does Microsoft Clarity work in China?
Whether you can use Microsoft Clarity in China is first a data-residency and cross-border-data question, not a speed one. Clarity is a free analytics tool you embed as a script, and it works by recording your visitors — so the moment it runs for a mainland user, you are handling that person's data.
In Microsoft's own FAQ, "Clarity records all the page information a user sees (the DOM content) and the actions they take as they browse your site," and "your data is stored in the Microsoft Azure cloud service" — a global deployment for which Microsoft names no mainland-China region, describing Clarity as "GDPR-compliant as a data controller." So the session replays and behavioral records of your China visitors are held offshore on Microsoft's own cloud: a cross-border transfer of personal information that PIPL governs, needing notice, separate consent, a transfer mechanism, and — for a CIIO or large-volume handler — in-country storage. The table below is Microsoft's own wording and the rules it triggers.
This is a risk picture, not a verdict — your obligations turn on your data volumes and your role. Our China team can map your Clarity exposure with you →
Compliance snapshot
- ! Embeds a script that records your mainland visitors — DOM content, mouse movements, clicks, scrolls and full session replays
- ! Microsoft stores Clarity data "in the Microsoft Azure cloud service" and acts as a data controller of it
- ! Session recordings and behavioral data of China visitors sent offshore — a PIPL cross-border transfer (notice + separate consent)
- ✕ No mainland-China storage region for Clarity; its built-in consent path covers the EEA, UK and Switzerland — not China
- ✓ A compliant in-country capture and storage path exists — no rebuild, no migration
What Microsoft Clarity's own documentation says about China
| Fact | Primary source |
|---|---|
| In Microsoft's own words, Clarity records a replay of each visitor. Its FAQ states that Clarity "records all the page information a user sees (the DOM content) and the actions they take as they browse your site," and that "a session recording is an animation that captures all user actions across devices, such as mouse movements, clicks, scrolls, and more." It also "distinguishes each user through a unique identifier stored in their browser through a first-party cookie." A reconstruction of what a person saw and did, tied to a persistent per-user ID, is personal information under Chinese law. | Microsoft Learn — Clarity Frequently Asked Questions, retrieved 2026-10-07 |
| That recording is stored on Microsoft's own cloud, offshore. Asked where Clarity data is kept, Microsoft answers: "Your data is stored in the Microsoft Azure cloud service," and it describes Clarity as "GDPR-compliant as a data controller" — meaning Microsoft itself, not only you, holds and controls the data. Recordings are "retained for 30 days," with a sample kept "for up to 9 months." [Inference: Microsoft runs Clarity on its global Azure cloud and publishes no mainland-China region for the service — the only geography its FAQ singles out is the EEA, UK and Switzerland, for consent — so this data is held outside the mainland.] | Microsoft Learn — Clarity Frequently Asked Questions, retrieved 2026-10-07 |
| Sending that data offshore is a cross-border transfer under PIPL. Session recordings and behavioral data captured from mainland visitors are personal information, and exporting them to Microsoft's Azure servers abroad is a cross-border transfer governed by PIPL: the personal-information handler — you, Microsoft's customer, not Microsoft — must give notice, obtain separate consent, and satisfy one transfer mechanism (a CAC security assessment, the CAC standard contract, or certification). | PIPL Chapter III, Articles 38–43 |
| The exposure scales with volume and role. Since the CAC's March 2024 cross-border rules, a non-CIIO transferring fewer than 100,000 individuals' non-sensitive personal information in a calendar year is exempt from the security assessment, standard contract and certification. But for a CIIO or large-volume handler, personal information collected in China must be stored inside the mainland (PIPL Article 40; Cybersecurity Law Article 39 (formerly Article 37)) — and because Microsoft offers no mainland Clarity region, the only way to keep that data on Chinese soil is to run the capture and storage on infrastructure inside the mainland. | CAC — Regulations on Promoting and Regulating Cross-border Data Flows, March 2024; PIPL Article 40; CSL Article 39 (formerly Article 37) |
| Clarity's built-in consent path names Europe, not China. Microsoft requires explicit consent before setting Clarity cookies in the EEA, UK and Switzerland — "To comply with local regulations explicit user consent is required before placing cookies on their devices" — and it "uses IP address-based geolocation to determine user location" to enforce that. No equivalent China path is documented, so meeting PIPL's separate-consent duty for your mainland visitors falls entirely on you, the site owner. | Microsoft Learn — Clarity Frequently Asked Questions, retrieved 2026-10-07 |
Sources verified by the 21YunBox compliance team on 2026-10-07.
For a mainland-China audience, the deciding question about Microsoft Clarity is not how quickly its heatmaps fill in — it is whose data has to leave the country for them to exist. Clarity is a free, widely embedded analytics tool, and the way it works is by recording your visitors: it captures the page they see and everything they do on it, then stores that recording on Microsoft’s own cloud. Point it at your mainland visitors and you are exporting their session replays and behavioral data across the border — something China’s privacy law governs directly. Whether Microsoft’s endpoints happen to load on a given day inside China is a delivery detail; where the recordings end up, and who controls them, is the exposure.
Microsoft Clarity in China at a glance
| What decides it | In Microsoft's own terms |
|---|---|
| What it records | Clarity “records all the page information a user sees (the DOM content) and the actions they take” — “an animation that captures all user actions across devices, such as mouse movements, clicks, scrolls, and more” — and tags each visitor with a persistent first-party-cookie ID. All personal information. |
| Where it's stored | Microsoft's answer is literal: “Your data is stored in the Microsoft Azure cloud service.” It names no mainland-China region for Clarity, so your China visitors' recordings sit on global Azure, offshore — “retained for 30 days,” with a sample kept “for up to 9 months.” |
| Who controls it | Microsoft describes Clarity as “GDPR-compliant as a data controller” — it is not merely processing on your behalf; it is itself a controller of the recordings it holds abroad. |
| The consent carve-out | Microsoft enforces explicit consent for the EEA, UK and Switzerland and “uses IP address-based geolocation to determine user location” to do so. No China/PIPL consent path is documented — that duty falls to you. |
| The residency rule | Exporting China users' session and behavioral data is a cross-border transfer under PIPL (notice, separate consent, a transfer mechanism); CIIOs and large-volume handlers must store it in the mainland — which offshore Azure cannot do. |
Recording a visitor is collecting their personal data
Clarity doesn’t wait for you to gather anything extra — the recording is the data collection. In Microsoft’s own FAQ, Clarity session recordings “aren’t video streams,” but something more complete: Clarity “records all the page information a user sees (the DOM content) and the actions they take as they browse your site,” and “a session recording is an animation that captures all user actions across devices, such as mouse movements, clicks, scrolls, and more.” It also “distinguishes each user through a unique identifier stored in their browser through a first-party cookie.” A reconstruction of what a person saw and did on your site, tied to a persistent per-user ID, is personal information under China’s law. So the instant Clarity runs for a mainland visitor, you are handling that visitor’s personal data — and handling it by shipping it to Microsoft.
The recordings live on Microsoft’s offshore Azure — and Microsoft controls them
Asked plainly where Clarity keeps this data, Microsoft answers: “Your data is stored in the Microsoft Azure cloud service.” Two things about that sentence matter for China. First, Microsoft describes Clarity as “GDPR-compliant as a data controller” — it is not merely processing on your behalf; it is itself a controller of the recordings, which it “retains… for 30 days,” keeping a sample “for up to 9 months.” Second, Microsoft names no Azure region inside mainland China for Clarity; the only geography its FAQ singles out is the EEA, UK and Switzerland, and only for consent. So your China visitors’ session data sits on Microsoft’s cloud outside the mainland. Under China’s Personal Information Protection Law that is a cross-border transfer, and the handler — you, not Microsoft — must give notice, obtain separate consent, and clear one transfer mechanism (a CAC security assessment, the CAC standard contract, or certification) under Articles 38–43. For a critical information infrastructure operator or a large-volume handler, personal information collected in China must be stored in the mainland (PIPL Article 40; Cybersecurity Law Article 39 (formerly Article 37)) — a residency duty an offshore Azure cannot meet, and one no setting inside Clarity changes.
A consent path built for Europe, not for China
Microsoft has built real consent machinery into Clarity — but it is pointed at Europe. Its FAQ explains that in the European Economic Area, UK and Switzerland “explicit user consent is required before placing cookies on their devices,” and that Clarity “uses IP address-based geolocation to determine user location” to decide where to enforce it. There is no mainland-China version of that logic. PIPL’s own requirement of separate consent for sending personal information abroad is not something Clarity asks for on your behalf — so for your Chinese visitors that duty lands entirely on you, the site owner, alongside the transfer mechanism and any localization obligation. The tool is engineered to satisfy one regime; the Chinese one it leaves to you.
Reachable or not, the data still leaves the mainland
Clarity runs by embedding a script that loads from a Microsoft-operated endpoint — the clarity.ms domain its install snippet calls — and streams what it records back to Microsoft. Whether that endpoint loads cleanly from any given mainland line is a delivery question, and not the one that decides whether you may use Clarity. Even on the connections where the script loads perfectly, it loads in order to send your visitors’ session recordings offshore; a faster or steadier path would only export that data more efficiently, not make the transfer lawful. The half that settles whether Clarity is usable for China is the legal one — where the recordings are stored and under whose control — not the network one.
This is a risk map, not a verdict: whether you owe separate consent, a transfer mechanism, in-country storage, or all three turns on what Clarity captures for you, how much of it, and who your users are — worth settling with counsel before you rely on it.
Where 21YunBox fits — a compliant overlay, not a migration
You keep running Microsoft Clarity exactly as you do now. What we add is the piece Microsoft leaves to you: ICP-filed, in-country delivery placed in front of your existing origin inside mainland China — no rebuild, no second codebase, no move off your current analytics. Our China team traces where your visitors’ recordings travel today, weighs your PIPL cross-border and data-residency duties against your entity and your data volumes, and builds the lawful, in-mainland foundation a compliant China presence needs — while Clarity and the rest of your stack keep running where they already are.
Related reading:
Frequently Asked Questions
Does Microsoft Clarity store Chinese users' data in China?
No. By Microsoft's own FAQ, "your data is stored in the Microsoft Azure cloud service," and Microsoft publishes no mainland-China region for Clarity — the consent enforcement it documents reaches only the EEA, UK and Switzerland. The session recordings and behavioral data Clarity captures from your mainland visitors are therefore held offshore, on Microsoft's own cloud.
Is it against the law to use Microsoft Clarity in China?
Not inherently. The issue is the cross-border transfer of personal information — session recordings and behavioral data are personal information under Chinese law — which PIPL permits if you give notice, obtain separate consent and meet one transfer mechanism. Whether you also face a data-localization duty depends on your role (for example, whether you are a CIIO) and the volume of personal information you handle. Treat it as a risk to assess with counsel, not a blanket prohibition.
Can 21YunBox help make our Microsoft Clarity setup compliant in China?
Yes. Our China team can assess your cross-border and data-residency exposure for your data volumes and role, and stand up the compliant, ICP-filed in-country delivery — and, where the law requires your China users' behavioral data to stay on the mainland, in-country capture and storage — around the stack you already run. Get in touch to work through your specific case.
