All articles Fundamentals

How to Mask Sensitive Data in Session Replay

A translucent panel representing masked content in a session replay recording, lit with blue edge light on a black background.

Most replay rollouts fail on the same review question: what exactly can an engineer see when they open a session? If the answer depends on the engineer, the page and the day, you have a policy problem, not a tooling problem. The way you mask sensitive data in session replay should be a small number of rules that hold for every session, on every site, without anyone remembering to apply them.

Prynt Replay is built around that assumption. Every form field is masked in the browser and again on the server, and there is no unmask option in the product. That covers the obvious inputs. The rest of this guide is about the edges around the input: text rendered outside a field, page structure you never want recorded, URLs that carry tokens, and the sampling settings that decide how much you keep.

Here is the configuration we recommend, in the order we recommend applying it.

Start from the default: inputs are always masked

In Prynt Replay, masking of form fields is not a setting you can turn off. The browser agent replaces field values before anything leaves the page, and the server applies masking again on ingest. The second pass matters: a modified client or a race condition during page load cannot produce a stored session with a plaintext value.

What this covers, and what it does not

It covers inputs, textareas and anything that behaves like a field, including fields inside modals, multi-step checkouts and same-site iframes. It does not cover content that is not a field: an order confirmation paragraph, a support message preview, a name printed in a header. Those are your job, and the next two sections are how you do it.

Use data-prynt-mask and data-prynt-block for everything else

Two attributes handle almost all remaining cases.

Developer reviewing a recorded session where content appears as masked blocks in a dark studio.

data-prynt-mask replaces an element’s text with a fixed mask in the recording while the page keeps rendering normally for the user. Use it on containers that display personal data: account headers, invoice summaries, address blocks, the confirmation panel after checkout.

<div class="order-summary" data-prynt-mask>
  ...rendered normally for the user, masked in replay...
</div>

data-prynt-block is the stronger option: the element is not recorded at all. Use it when the shape of the content is itself sensitive, or when you cannot guarantee what renders inside it — a third-party widget, an embedded document viewer, an internal admin panel that occasionally shows a customer record.

Mask or block?

Mask when support needs to know the element was present; block when they never need to know. When in doubt, block. You can narrow a block later, but you cannot unmask a recording that already exists.

Turn on mask-all-text with a deliberate allow list

If your product shows personal data in ways you cannot enumerate — a CRM view, a messaging inbox, a document editor — element-by-element attributes will never keep up. The safer configuration is to mask all text by default and allow the small set of selectors that are safe to keep: navigation labels, button text, static headings, error messages you wrote yourself.

An allow list is a reviewed artifact. Keep it short, give it one owner, and change it in the same pull request as the component it refers to. Add a selector only when someone can say what text will render inside it in the worst case.

Drop query strings before they reach storage

Replay tools record the URL of each page view, and URLs leak: password reset links, invite tokens, email parameters, session identifiers appended by marketing tools, OAuth codes on the redirect. Prynt drops URL query strings, so the recorded value is the route and not the parameters.

A light path with side branches removed, illustrating URL query strings dropped before storage.

Check your own logging, not only the replay tool

Dropping query strings in Replay does not clean the rest of your stack. If you forward page views to analytics, an error tracker or a data warehouse, apply the same rule there. A short allow list of parameters you actually use for routing is easier to defend than a denylist of parameters you hope nobody adds.

Set sampling per site, then verify access

Choose the rate per site

Sampling is where replay cost and replay value collide. A single global rate forces every property into the same tradeoff. Configure it per site: a high rate on the flows you are actively debugging — signup, checkout, the new onboarding — and a low one on marketing pages where the questions are already answered. Bot sessions do not count against quota in Prynt Replay, so a crawler spike will not push you into a sampling decision you did not make. The Free plan includes 1,000 sessions per month with 14-day retention on one site; Pro is $279 per month for 10,000 sessions, 30-day retention and three sites after a 14-day trial, with volume plans up to 1M sessions.

Walk three sessions before you widen access

Before you hand replay to support or embed sessions in your own admin, open a checkout, a settings change and a page with a search field, and try to find something you should not see. Our documentation covers the embed: you list sessions with the secret key and open them in the player per company or user with identify(userId, { accountId }). Keep that key server-side, never in a browser bundle, and treat the allow list and the block attributes as part of your form protection review — the exercise that decides what a form may collect also decides what a recording may keep. Our security page describes how the two masking passes fit together.

FAQ

Sparse grid of glowing dots illustrating different replay sampling rates per site.

Does masking form fields change what my users see or what my app collects?

No. Masking happens at the recording layer. Field values still post to your server, validation still works, and the browser agent sends masked values only to Prynt.

Can someone on my team unmask a session later?

No. There is no unmask option in Prynt Replay. Values are masked in the browser and again on the server, so access to a session does not mean access to the data inside it.

What about native mobile apps?

Native mobile replay is supported for iOS, Android, React Native and Flutter, and the same rule applies: fields are masked before a session leaves the device. Review screens that print personal data outside a field and apply the mobile equivalent of a block.

The next useful step

Pick one high-traffic flow — checkout is usually the right one — and review it for masking: fields, text, URL, sample rate. That review takes an afternoon and it is most of the job. When you want a place to run it, start with Prynt Replay on the Free plan and open a few sessions before you decide anything about Pro.

Try it free

Prynt is device intelligence with a free plan: 5,000 identifications a month, visitor IDs with confidence and bot detection — no credit card. Upgrade to Pro for VPN, proxy, tampering and behavioral signals.

Keep reading