TapCub is live — analytics, insights and live chat, free on one platform
Glossary

What is data masking? Capture-time vs display masking

Data masking replaces sensitive values with altered ones so data stays usable. The key question is when: at capture, in a copy, or only on display. A worked example, techniques, and how TapCub masks replays, events and reports.

Lucas Hayes Reviewed by Chen Yu Also called data obfuscation Last updated Nov 17, 2026 Glossary

Quick answer

Data masking replaces sensitive values with altered ones, such as asterisks, a shortened form or a realistic fake, so data stays usable while the real value is hidden. It can be applied at capture, in a prepared copy or only when someone views the data, and each leaves something different stored.

What is data masking?

Data masking replaces sensitive values with altered ones, such as asterisks, a shortened form or a realistic fake, so the data stays usable while the real value is hidden. A phone number shown as xxxx, an email shown as RXXX@XXXX.com and a card field recorded as **** are all masked values.

It is not encryption, because encryption is meant to be reversed with a key and masking usually is not. It is also not automatically anonymisation: the Article 29 Working Party's Opinion 05/2014 (WP216) notes that techniques which only replace identifiers leave a person able to be singled out and linked across records. For the stronger idea, see anonymization.

Most pages that explain the term write about database masking: hiding production data in a test copy or from some database users. This page covers that briefly, then the case that matters in analytics: what a session recording, a report or an export is allowed to show. The central question is not how to mask but when: while the data is captured, or only when someone looks at it.

Three moments to mask

When the mask is appliedWhat stays in storageWho can still recover the originalExample
At capture (before the value is written)Only the masked valueNobody; the original was never storedA recorder writes an input as asterisks; a string that looks like an email is replaced with a placeholder before it is saved
Static (a masked copy made ahead of time)The masked copy; the source still holds the originalWhoever can read the sourceA test database built from production with names and numbers replaced
Dynamic (masked in what a user sees)The original, unchangedRoles with unmask rights, administrators, and anyone who can infer values by queryingMicrosoft SQL Server's dynamic data masking

The last row is the one people mistake for protection of the data itself. Microsoft's documentation for dynamic data masking says plainly that the data in the database is not changed, that users with the UNMASK permission and administrative roles see the original, and that the feature does not stop a user who can run ad hoc queries from inferring values by guessing. It is an access control on what a result shows. That is useful; it is not the same as not holding the value.

The first row is the opposite. Open-source recorders expose it as an option set when recording: rrweb, whose player TapCub's console uses, can mask every input, masks password inputs by default and masks the text of elements you mark with a class name.

Common masking techniques

TechniqueWhat it doesExampleReversible?
Full maskReplaces the whole value with a fixed pattern555.123.4567 → xxxxNo
Partial maskKeeps the first or last charactersA phone number reduced to its last four digitsNo
Email maskKeeps the first letter and a fixed shapeRTamburello@contoso.com → RXXX@XXXX.comNo
SubstitutionSwaps in a realistic fakeRoberto → MariaNo, if the mapping is not kept
ShufflingMoves real values between rowsSalaries reassigned across employeesNo, if the order is not kept
NullingDeletes the valueNULLNo

The examples for full masking and the email mask come from Microsoft's documentation. A partial mask is the one to be careful with: a first letter plus a domain can narrow a small customer list to a handful of people.

Worked example: where the mask goes decides what is stored

Sample data: a site has 20,000 sessions in a month and records 10% of them with session replay, so 2,000 recordings. The checkout form has 6 input fields. About 18% of sessions (360 of the 2,000 recordings) also open an account page that shows the person's name and email as plain text.

SetupInput values readable in storageRecordings with name or email as text
No masking2,000 × 6 = 12,000360
Input values masked at capture0360
Input masked, plus the account page excluded from recording00
Input not masked, but values hidden only when someone plays the recording12,000360

The last row looks safe when you watch a recording and is not: the 12,000 values and the 360 pages are still stored for the retention period, in any export and in any backup. A mask that only works in the player protects the viewer from the data, not the data from a breach. Note also that masking inputs does nothing for text that is simply on the page, which is why the third row needs a different control: exclude the page, or mask all text.

When to mask at capture, at display or in a copy

  • If you would rather not hold the value at all (passwords, card numbers, identity and medical forms), mask or exclude at capture. GDPR Article 5(1)(c) asks that data be limited to what is necessary, and Article 25(2) asks for that by default.
  • If some roles need the value and others do not (support sees the email, a viewer does not), mask at display, and keep it combined with role limits and audit.
  • If the data is going to a test or training environment, make a statically masked copy so the original never leaves production.
  • If a value is only occasionally useful, shorten how long it is kept as well; masking and retention work together.

Common misunderstandings

  • "Masked means anonymous." A masked field can sit next to a user ID, a device or a timestamp that still identifies the person. See PII.
  • "If the player hides it, it is not there." Display masking changes what a screen shows. Stored data, exports and backups follow the stored value.
  • "Mask all inputs and the recording is safe." Text printed on the page can still carry personal data.
  • "Masking later fixes earlier recordings." A change in settings applies to what is captured next. Earlier recordings keep what they captured until they are deleted or expire.
  • "One layer is enough." Capture, display and retention each cover a different failure.

Data masking in TapCub

TapCub has masking at capture (session replay and property stripping) and at display (roles). The two are separate layers, and this section is only about what an analytics user sees; live-chat conversations have their own retention and delete controls.

Start from the example above: you want recordings of the checkout flow without storing what people typed.

  1. Turn replay on deliberately. Session replay is off by default and only an owner or admin can enable it, in All-platform analytics › Behavior › Session replay › Settings. The switch asks you to confirm that your privacy policy covers recording and that pages with payment, ID or medical forms are on the exclude list.
  2. Keep the input mask on. Mask input values is on by default and records input values as asterisks. Mask all text is off by default; turn it on for back-office style pages where text on the page is personal. Password fields, blocks marked data-tc-ignore or wc-no-replay, and the support widget are never recorded.
  3. Exclude paths. Excluded paths takes up to 20 path prefixes starting with /; those pages are not recorded. This is the control for the account page in the example.
  4. Shorten the exposure. The default sample rate is 10% (above 10% shows a storage warning), and retention is 30 days, adjustable from 1 to 90. An admin can delete recordings, and an owner can purge all of them. Changing settings does not rewrite recordings already made.
  5. Strip personal data from events. In Configuration › Privacy center, when stripping is on, strings that look like an email or a phone number in event properties are replaced with a placeholder before storage. Autocapture does not record visible text by default.
  6. Mask what members see. Separately, reports and exports apply display masking by role: none, partial or full. By default admins see identifiers in the clear, analysts see direct identifiers partly masked, and viewers see them fully masked. Direct identifiers are masked in lists and exports by default, and where a property rule and a member rule disagree, the stricter one wins. This does not change what is stored.

TapCub does not mask live-chat transcripts with these settings and does not replay support conversations; replay covers web pages only.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Lucas Hayes

Data Engineer

Writes about event design, data quality, and collection workflows, with verifiable implementation methods for reliable analytics.

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What is data masking in simple terms?

It replaces a real value with an altered one, such as asterisks or a realistic fake, so people or systems can work with the data without seeing the original. A phone number shown as xxxx and an email shown as RXXX@XXXX.com are masked values.

What is the difference between static and dynamic data masking?

Static masking makes a masked copy ahead of time, so the copy never holds the originals. Dynamic masking leaves the original stored and changes what a user sees in query results, so privileged roles and inference can still reach the real value.

Is data masking the same as encryption or anonymization?

No. Encryption is meant to be reversed with a key, and masking usually is not. Masked data can still identify a person if other fields or the value's shape point to them, so it is not automatically anonymous.

Should I mask at capture or at display?

Mask at capture anything you would rather not hold, such as passwords, card numbers and sensitive forms. Mask at display when some roles need the value and others do not. Display masking does not remove the stored original.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics