Session replay masking attributes: data-hj-suppress and its equivalents
Every session replay tool has its own attribute for hiding sensitive content, and almost none of them reads the others' (the Contentsquare tag, which honors Hotjar's and Heap's, is the exception). This table lists the mask, block and unmask attributes of 17 tools, each checked against the vendor's own documentation.
Checked against each vendor's documentation on . Vendors change their SDKs; follow the source links before you rely on a cell.
Masking attributes by tool
Mask keeps the element and replaces its text. Block leaves the element out of the recording, with a placeholder at most. Unmask records a value that would otherwise be masked. Cells are sorted by what the attribute does, not by the vendor's name for it: Contentsquare's data-cs-mask, for example, empties the element, so it is listed under block.
| Tool | Mask | Block | Unmask | Inputs masked by default | Sources |
|---|---|---|---|---|---|
| Replayowl | data-ro-mask | data-ro-block | data-ro-unmask | Yes; emails and 12 to 19 digit runs in text too | Masking and privacyKnown limitations |
| Hotjar | data-hj-suppressclass data-hj-suppress | None documented | data-hj-allow (inputs)data-hj-allow-iframe | Yes | Suppress text, images and inputShow elements and keystrokesPlatforms not compatibleiframes |
| Microsoft Clarity | data-clarity-mask="True" | None documented | data-clarity-unmask="true" | Yes, in every masking mode | Clarity maskingClarity setup |
| FullStory | .fs-mask | .fs-exclude.fs-block (deprecated) | .fs-unmask | Depends on account: newer accounts mask form fields | Protect users' privacyWeb Components and shadow DOMiframes |
| LogRocket | data-private="lipsum" (inputs) | data-privatedata-private="delete"class _lr-hide (legacy) | data-public | No, only password fields | DOM referencePrivacyShadow DOMiframes |
| PostHog | maskTextSelector (option) | class ph-no-captureblockSelector (option) | None on web | Yes | Session replay privacyiframes |
| Smartlook | data-sl="mask" | data-sl="exclude" | data-sl="unmask" | Yes, forms off until enabled | Privacy APIRecording sensitive dataiframes |
| Mouseflow | class mf-masked with mf-listendata-mf-replacedata-mf-replace-inner | class mf-excluded | Whitelist in settings only | Mostly: fields with personal data | Excluding and masking via codeShadow DOMiframes |
| Lucky Orange | class lo-sensitiveclass losensitive | None documented | class lo-not-sensitiveclass lonotsensitive | Yes | Privacy toolsPlatforms not compatible |
| Sentry Session Replay | .sentry-maskdata-sentry-mask | .sentry-blockdata-sentry-block | None by default since SDK v8 (configurable) | Yes; all text and media too by default | Session replay privacyTroubleshooting |
| rrweb | .rr-maskmaskTextSelector (option) | .rr-blockblockSelector (option) | None | No, only password fields | rrweb guide |
| OpenReplay | data-openreplay-obscured | data-openreplay-hidden | None documented | Yes; emails too | Sanitize dataCross-domain iframes |
| Datadog Session Replay | data-dd-privacy="mask"data-dd-privacy="mask-user-input" | data-dd-privacy="hidden" | data-dd-privacy="allow" | Yes | Privacy optionsShadow DOM |
| Contentsquare | None documented | data-cs-mask | data-cs-capture | Yes, typed text never collected | Personal data handlingCompatibilityChangelog |
| Inspectlet | class inspectlet-sensitive | class inspectletIgnore | class inspectlet-whitelist | No, only password fields | Excluding sensitive dataPrivacy guide |
| Crazy Egg | CSS selectors in settings (gray box) | None documented | None documented | Yes | Masking with CSS selectorsAutomatically masked elements |
| Highlight.io | class highlight-mask | class highlight-block | data-hl-record="true" | Yes | Privacy (GitHub) |
"None documented" means we did not find it in the vendor's documentation, not that it cannot exist.
Moving from one tool to another
Because recorders ignore each other's attributes, with Contentsquare's handling of Hotjar and Heap tags as the main exception, switching tools silently drops your masking unless you add the new attributes. The safe order:
- Search your templates for the old attributes. A search for
data-hj-,data-clarity-,fs-,data-private,ph-no-captureordata-sl=finds most of them. - Add the new tool's attribute next to each one. Keep the old one until the old script is gone; they do not conflict.
- Check that the new tool's defaults cover what the old one did by default. Defaults differ more than attributes: LogRocket, rrweb and Inspectlet do not mask inputs unless configured, Sentry masks all text by default, and Replayowl masks inputs plus emails and card-like numbers in text.
- Paste the templates into the PII masking tester, which flags the other tools' attributes and can add the Replayowl ones for you.
- Record a test session and search the upload in DevTools for a value you typed.
data-hj-suppress in Hotjar
Hotjar masks text in elements with data-hj-suppress (attribute or class) with asterisks and replaces images and videos with boxes of the same size. Keystrokes in inputs are suppressed by default; data-hj-allow lets a text input through, and it is not inherited by child elements. Hotjar has no attribute that removes an element entirely. Since Hotjar became part of Contentsquare, the Contentsquare tag also honors data-hj-suppress as a default masked selector.
The Replayowl equivalents are data-ro-mask for data-hj-suppress and data-ro-unmask for data-hj-allow. Unlike data-hj-allow, data-ro-unmask also works on a container and applies to the inputs inside it. Moving off Hotjar? See Hotjar alternatives and Replayowl vs Hotjar.
data-clarity-mask in Microsoft Clarity
Clarity uses data-clarity-mask="True" to mask an element and data-clarity-unmask="true" to show it, on top of three site-wide modes: Strict, Balanced (the default) and Relaxed. Input boxes and drop-downs are masked in every mode. There is no documented attribute to leave an element out entirely. See Replayowl vs Clarity.
fs-exclude, fs-mask and fs-unmask in FullStory
FullStory uses classes, not data attributes. .fs-exclude removes the element and also drops clicks and changes on it; .fs-mask hides the text but keeps interaction events; .fs-unmask reverses masking. .fs-block is deprecated but still works. Whether inputs are masked by default depends on when the account was created.
data-private and data-public in LogRocket
data-private redacts an element: its size is kept and the replay draws stripes. data-private="delete" hides it completely, and on inputs data-private="lipsum" replays the typing as Lorem Ipsum. data-public allows an element through when the input, text or image sanitizers are on. LogRocket records input values by default except passwords, so turn on inputSanitizer if you need inputs masked.
ph-no-capture in PostHog
PostHog's ph-no-capture class blocks the element from recordings and from autocapture. Masking specific text is done with the maskTextSelector option rather than an attribute, and inputs are masked by default.
Sentry, Datadog, Smartlook and the rest
Sentry Session Replay masks all text and inputs and blocks media by default and offers sentry-mask and sentry-block as classes or data attributes; since SDK version 8 it has no default unmask selector. Datadog uses one attribute with four values, data-dd-privacy="allow|mask|mask-user-input|hidden". Smartlook also uses one attribute, data-sl, with mask, exclude and unmask. rrweb, which several tools are built on, uses the classes rr-mask and rr-block and does not mask inputs by default. OpenReplay uses data-openreplay-obscured and data-openreplay-hidden.
Shadow DOM and iframes
Masking only matters for content the recorder can see. Of the tools that document it, most do not record closed shadow roots (Contentsquare does since tag 15.250.1), and cross-origin iframes need the tool's script inside the iframe as well. The details per tool, with our own test of rrweb and Replayowl, are in session replay and Shadow DOM.
Masking in Replayowl
Replayowl masks every text input, and email addresses and runs of 12 to 19 digits in page text, in the browser before upload. Fields it recognizes as password, card or credential fields, by type, autocomplete or name, can never be unmasked, even with data-ro-unmask. The attributes work across open shadow root boundaries. Details in masking and privacy; for the compliance side, see session replay and GDPR.
Questions and answers
What does data-hj-suppress do?
It is Hotjar's masking attribute. Text inside an element with data-hj-suppress is replaced with asterisks, and images and videos are replaced with boxes of the same size, before the data is sent to Hotjar. It works as an attribute or as a class. Hotjar's data-hj-allow does the opposite for input fields.
Does Replayowl read data-hj-suppress or other vendors' attributes?
No. Replayowl reads only data-ro-mask, data-ro-block and data-ro-unmask. When you switch tools, add the Replayowl attribute next to the old one; the PII masking tester can do that for you.
What is the difference between masking and blocking?
Masking keeps the element in the recording and replaces its text, so the replay keeps the layout. Blocking leaves the element out entirely, usually showing a placeholder of the same size. Block areas whose content you never need to see, such as chat transcripts or embedded documents.
Can I keep several vendors' attributes on the same element?
Yes. Recorders ignore attributes they do not know, so data-hj-suppress, data-clarity-mask and data-ro-mask can sit on the same element while you compare tools or migrate.
Spotted an attribute that changed? Open an issue and we will fix it.
Try Replayowl on your own site
Hosted
Free for 1,000 sessions a month
Then $29 a month for 10,000. Paste one script tag and watch your first session a minute later.
Start freeSelf-hosted
Free, no session caps
One Cloudflare Worker with your own R2 bucket and D1 database. Nothing is sent to us.
Self-host on CloudflareOr watch it record you first in the live demo, no sign-up.