Microsoft Clarity records sessions. Sessions contain user input. User input frequently includes personally identifiable information — email addresses, phone numbers, full names, credit card details, sometimes worse. By default, Clarity masks what visitors type: input boxes and drop-down menus are masked in every mode, and the default Balanced mode also masks numbers and email addresses in page text. What it does not mask by itself is other personal text your pages display, such as a name or address shown back to the visitor.
The naive fix is to mask everything — turn on Clarity’s aggressive masking and call it compliance. The problem: aggressive masking destroys the analytical value of recordings. In Strict mode the entire page content is masked, so you can’t read the headings, buttons or error messages visitors were reacting to when they hesitated or corrected something. You’re blind to the behavioral signals that make session recordings valuable in the first place.
This guide is the selective PII masking framework we deploy for Dallas clients in regulated industries (healthcare, finance, legal). The exact Clarity configuration that masks PII while preserving CRO-relevant behavioral context. The 5 categories of data that need different treatment. The validation pattern that prevents accidental PII leaks. And the GDPR/CCPA/HIPAA implications most teams overlook.
Microsoft Clarity captures real user behavior. What visitors type into input boxes is masked in every mode, but personal details your pages display can still be recorded. Default masking is insufficient for regulated industries (healthcare, finance, legal) and risky for any business handling EU traffic under GDPR. The selective masking framework: (1) mask every element that displays personal details (names, addresses, account data) via data-clarity-mask="True"; input boxes are already masked by Clarity, (2) preserve UX context by NOT masking layout, button text, navigation, scroll behavior, (3) track interactions semantically (e.g., "user typed 12 characters in email field" instead of capturing the actual email), (4) validate ongoing by sampling 10 sessions monthly to check for PII leaks. The framework below covers configuration, validation, and the GDPR/CCPA implications most teams underestimate.
What PII Actually Leaks in Clarity (Without Custom Masking)
Open any Clarity session recording from a form-heavy page. By default, what visitors type is already hidden:
- Email addresses typed into form fields — masked (input boxes are masked in every mode)
- Phone numbers typed into fields — masked
- Full names typed into "Name" fields — masked
- Addresses typed into shipping forms — masked
- Date of birth on demographic forms — masked, whether typed or picked from a drop-down menu
- SSN or government ID on identity verification forms — masked when typed into an input box
- Credit card numbers — masked when typed into an input box, whatever its autocomplete attribute
This is not an attack on Clarity — the same issue exists with Hotjar, FullStory, LogRocket, and every session recording tool. What the default Balanced mode leaves readable is ordinary page text: it treats only numbers and email addresses as sensitive, so a name or street address your page shows back to the visitor is recorded unless you mask that element.
Privacy implications:
- GDPR: EU users have right to data minimization. Storing their email/name/phone in session recordings without explicit consent and a documented purpose is a violation.
- CCPA: California residents have right to deletion. PII in session recordings must be deletable when requested.
- HIPAA: Healthcare information (including names, emails, dates of birth) in session recordings is PHI. Unmasked PHI in a third-party tool is a HIPAA violation.
- Financial regulations: Account numbers, SSNs, and certain types of client data captured by financial services are subject to specific protection requirements (GLBA, PCI-DSS).
Microsoft Clarity masks input boxes and drop-down menus in every mode, and its default Balanced mode also masks numbers and email addresses in page text. That’s it. Names, addresses and other personal text your pages display — confirmation screens, account pages, order details — are recorded as shown. If you haven’t configured masking for those elements, you may have unmasked PII in your recordings right now. Audit it this week, not "later."
The 5 Data Categories That Need Different Treatment
Category 1: Hard identifiers (mask fully)
SSN, government ID numbers, credit card numbers, bank account numbers, medical record numbers. These should be COMPLETELY masked — not even character count should be visible. Treatment: data-clarity-mask="True" on the input, OR ideally the value never reaches the DOM (server-side rendering, secure iframes from payment processors).
Category 2: Contact info (mask content, keep field shape)
Email addresses, phone numbers. Mask the actual value (user typed something), but preserve the fact that they typed in the field, character count, and timing. Treatment: data-clarity-mask="True" applied to the input. Clarity will show that something was typed (visible cursor, character timing) but not what.
Category 3: Names & addresses (mask content, keep field shape)
First name, last name, full address, city, postal code. Same treatment as contact info — mask the content, preserve the interaction patterns. Treatment: data-clarity-mask="True".
Category 4: Selections & clicks (capture normally)
Dropdown selections, radio button choices, checkbox toggles, button clicks. These almost never contain PII (they’re predefined options). Capturing them is high-value for CRO analysis, with one limit: Clarity masks drop-down menus in every mode, so do not count on reading the selected option in a recording. Treatment: no extra masking.
Category 5: UI/navigation (capture normally)
Page transitions, scroll behavior, layout interactions, hover patterns. Zero PII risk; high CRO value. Treatment: no masking.
The principle: mask CONTENT in PII-bearing fields, preserve everything else. You still see the user typing in the email field (which tells you they engaged with it), how long they took, whether they corrected typos, whether they rage-clicked elsewhere after. You just don’t see the actual email address.
Implementation: The Selective Masking Setup
Method 1: HTML attribute on specific fields
The simplest approach: add data-clarity-mask="True" directly to PII-bearing input elements.

<!-- Mask the value but preserve interaction patterns -->
<input type="email" name="email" data-clarity-mask="True">
<input type="tel" name="phone" data-clarity-mask="True">
<input type="text" name="full_name" data-clarity-mask="True">
<input type="text" name="street_address" data-clarity-mask="True">
<!-- Don't mask selections or buttons -->
<select name="industry">...</select> <!-- No mask needed -->
<input type="radio" name="company_size" value="50_to_200"> <!-- No mask -->
<!-- Mask the WHOLE container if it might contain PII -->
<div data-clarity-mask="True">
<p>Account number: {{ user.account_number }}</p>
</div>
Method 2: CSS class-based masking
For sites where you control templates centrally, use a CSS class approach:
<!-- Define a single class for all PII inputs -->
<style>
.pii-field { /* visual styles */ }
</style>
<script>
// Auto-apply data-clarity-mask to all .pii-field elements
document.querySelectorAll('.pii-field').forEach(el => {
el.setAttribute('data-clarity-mask', 'True');
});
</script>
<!-- Then in templates -->
<input type="email" class="pii-field" name="email">
Method 3: Server-side defensive defaults
Most robust approach for regulated industries: render any field type that COULD contain PII with masking enabled by default, then explicitly opt-out for non-PII fields. Reverses the failure mode — new fields are private by default, not exposed by default.
{# Base form template — masks by default #}
<input type="{{ field.type }}" name="{{ field.name }}"
{% if field.type != 'submit' and field.type != 'checkbox' %}
data-clarity-mask="True"
{% endif %}>
{# Specific opt-out for non-PII text inputs #}
{% block special_dropdown %}
<select name="industry">
{# No mask — industries are predefined options #}
</select>
{% endblock %}
Tracking Behavior Without Capturing PII
The trick to preserving CRO value while masking PII: track INTERACTIONS, not VALUES. Examples:
- Email field interaction: Track "user typed 12 characters in email field" via custom event, not the actual email. Tells you they engaged; doesn’t leak the address.
- Form completion timing: Track "user spent 47 seconds on form" via duration tracking. Reveals friction without exposing data.
- Field validation failures: Track "email field failed validation 3 times" via error event count. Reveals UX issues without storing the wrong-formatted emails.
- Field correction patterns: Track "user deleted and retyped name field" as a behavior signal. Indicates hesitation or typo-correction without storing the text.
- Tab/focus patterns: Track which fields users focus, in what order, with what dwell time. Reveals form flow issues without capturing entered data.
These behavioral signals provide 80–90% of the CRO insight value of raw text capture, with zero PII risk. The remaining 10–20% (actual text users type) is rarely worth the privacy/legal exposure.
Clarity custom tags (covered in our ecommerce cart tags guide) are perfect for capturing PII-free behavioral signals. Tag email_field_attempts: 3 when a user tries three times to enter email. Tag form_completion_seconds: 47 for timing. Filter sessions by these tags to find struggle patterns without ever capturing the actual data. This is the privacy-friendly equivalent of having full text.
| What you want to learn | Record this | Never store this |
|---|---|---|
| Did the visitor use the email field? | How many characters were typed in the field | The email address itself |
| Where does the form slow people down? | Seconds spent on the form | Anything typed into the fields |
| Is validation tripping people up? | How many times a field failed validation | The wrongly formatted entries |
| Is the visitor hesitating? | That a field was deleted and retyped | The text that was typed |
| Is the field order confusing? | Which fields got focus, in what order and for how long | The data entered in them |
| Did the visitor give an email at all? | A custom tag such as email_was_provided: "yes" | A tag that holds the address, such as last_email |
Each row keeps the behavior and drops the value. Record counts, timings and yes/no flags, and neither a recording nor a tag ever holds personal data.
Validation: Auditing for PII Leaks Monthly
Configuration is not enough. New form fields, marketing campaigns, and code deploys can introduce PII leaks without anyone noticing. Set up a monthly validation routine:
- Sample 20 random sessions from the past 30 days.
- For each session, look for visible text in form fields. Should be all masked dots/asterisks. If you can read an email or name, that’s a leak.
- Check key forms specifically: demo request, contact, newsletter signup, checkout, account creation. New forms are highest-risk because they may not have been added to the masking config.
- Look at custom tags: ensure no tag values contain PII (e.g.,
last_email: "joe@example.com"is a violation;email_was_provided: "yes"is fine). - Log findings in a tracker. Each violation gets a ticket. Each ticket has a fix deployed within 7 days. Document fixed-vs-found rate as a privacy KPI.
HIPAA-Specific Considerations
For Dallas healthcare clients, HIPAA imposes stricter requirements than GDPR. Key additions:
- BAA required: HHS says a tracking vendor must have a signed BAA before any PHI is disclosed to it, and that a vendor’s promise to remove or mask the PHI is not enough. Microsoft describes Clarity as a free service with no paid version, so get written confirmation that a BAA is available before using it on pages that handle patient information; without one, keep Clarity off those pages.
- Mask broader categories: Beyond standard PII, HIPAA-relevant PHI includes any combination of identifiable + health information. Pages discussing specific conditions, treatments, or medication should mask interactive elements that could reveal patient identity.
- No recording of patient portals: Even with masking, patient portal pages typically should not be recorded at all. Use page-level exclusion in Clarity to skip these URLs.
- Document your config: HIPAA audits will ask. Maintain a "Clarity masking configuration" document showing what’s masked, what isn’t, and why each decision was made.
The full setup pattern for healthcare lives in our Clarity setup guide for Dallas healthcare practices.
Worked Example: Taking a Dallas Healthcare Practice to HIPAA-Compliant Analytics
Consider a Dallas-based multi-location medical practice that needs to deploy Clarity in a HIPAA-compliant way. Suppose the existing setup is Clarity installed with default config, no element masking and no BAA, with recordings kept for Clarity’s standard 30 days — and the compliance officer has flagged this as a critical violation.
A migration plan:
- Day 1: Disable all existing recordings, mark for deletion at 30-day retention boundary
- Week 1: Get written confirmation from Microsoft on whether a BAA is available for Clarity (it is a free service with no paid tier); if not, keep it off every page that handles patient information
- Week 2: Implement selective masking using Method 2 (CSS class-based) across all forms
- Week 3: Exclude patient portal URLs from recording entirely
- Week 4: Set up custom tags for behavioral signals (form abandonment, validation errors, completion timing)
- Week 5: Validate with 30-session audit; document compliance config
5 Common PII Masking Mistakes
- 1. Masking everything aggressively. Hides legitimate CRO insights. Selective masking is better — PII content hidden, interaction patterns visible.
- 2. Forgetting new forms. New marketing campaigns add new forms. Each new form needs to be added to the masking config. Build this into deploy checklists.
- 3. Using "type=password" hack for non-passwords. Some teams set sensitive fields as type="password" believing only password fields are masked. Clarity already masks every input box. This breaks autofill, accessibility, and mobile keyboard hints. Use proper
data-clarity-maskattribute instead. - 4. Capturing PII in custom tags. Custom tags are searchable in Clarity dashboard. Never set tags with actual email/phone/name values — use behavioral counts instead.
- 5. Never validating. Configuration drift happens. Monthly validation audits catch leaks before they become incidents. Make this a recurring calendar event.
For Dallas businesses with regulated-industry exposure (healthcare, finance, legal) or significant EU traffic, the selective masking framework is non-negotiable. For everyone else, it’s still strongly recommended — CCPA expansions and state-level privacy laws (Texas Data Privacy Act, etc.) are making strict PII protection a default expectation, not an edge case. Implement this once, validate monthly, and your behavioral analytics stays both legal and useful.
Frequently Asked Questions
Mask means the field is recorded but its content is hidden (shows as dots/asterisks). The interaction is captured; the value is not. Exclude means the entire page or element is not recorded at all. Use mask for individual PII fields on otherwise-recordable pages. Use exclude for entire pages that shouldn’t be recorded (patient portals, account settings, payment confirmation pages). Both have their place; choose based on whether you need to see any interaction at all on that page.
No. Heatmaps capture click coordinates and scroll positions, not content. Masking PII in form values doesn’t change where users click or scroll. Heatmap accuracy is preserved. The only behavioral analytics feature affected by content masking is session recording playback — you can’t SEE what users typed, but you can see they typed (cursor, timing, focus events). Heatmaps, scroll maps, and click maps all work normally with masking enabled.
Use field name attribute (which doesn’t change with language) as your masking selector, not the visible label. <input name="email" data-clarity-mask="True"> works regardless of whether the label says "Email", "El correo", or "El.paštas". For server-side defensive masking, key on the field type and name pattern, not the displayed label text. This makes the masking config language-independent.
Chat widgets (Intercom, Drift, Zendesk Chat) are particularly tricky. Users may type personal information into chat messages. The widget element should usually be excluded entirely from session recording: <div id="chat-container" data-clarity-region="hidden">. Better: configure Clarity to exclude the chat domain entirely if the chat is served from a separate origin. The CRO value of seeing chat content is low compared to the privacy risk.
You should notify them, regardless of masking. Most jurisdictions require informed consent for behavioral data collection. The standard approach: cookie consent banner that includes session recording in its scope, with an option to decline. For GDPR compliance, the banner must allow declining without dark patterns. For Dallas businesses targeting EU traffic, this is mandatory. For US-only traffic, it’s recommended practice and may soon be required by state laws (Texas, Florida, others moving in this direction).
Want us to audit your Clarity privacy config?
We’ll review your current Clarity setup, identify PII leaks in recordings, and deploy selective masking that preserves CRO context while protecting user data. Free for healthcare, finance, and legal businesses with active behavioral analytics.
Get a Privacy Audit Explore Healthcare SEOCall (346) 244-8617Book a free 30-minute call
Dallas, Texas · no obligation · you speak to Mantas, not a sales desk




