Hiding sensitive data
Strabber records what visitors see and do on your website. Some of that you shouldn't keep, such as card numbers, passwords, health details or a customer's address on their account page. Mark the parts of your pages that show or ask for such data, and Strabber masks them in the visitor's browser, before anything is sent.
What is always hidden
Without any setup, Strabber never records:
- What visitors type into password fields, or what those fields hold
- The values of hidden fields (
<input type="hidden">), which often hold security tokens
Mark an element as sensitive
Add the data-strabber-sensitive attribute to any element:
<input type="text" name="card-number" data-strabber-sensitive>
The attribute covers the element and everything inside it, so you can mark a whole form or section at once:
<div class="billing-details" data-strabber-sensitive>
<p>Anna Smith, 12 Main Street, Berlin</p>
<input type="text" name="card-number">
<input type="text" name="card-expiry">
</div>
The attribute doesn't need a value. It works in any framework that lets you set HTML attributes, such as React (<div data-strabber-sensitive>) or Vue.
What is hidden in a marked element
Inside a marked element, Strabber masks:
- Text on the page, also when it changes later
- What visitors type: the keys they press and the values of fields
- Attributes that can hold personal data:
value,title,alt,aria-labelanddata-value - Images and links: their
src,srcsetandhref, so images aren't loaded in the replay and link targets, such asmailto:addresses, aren't recorded
Text is replaced with asterisks of the same length, so the replay keeps its layout: you still see that the visitor filled in the card form, but not what they entered. The AI summary of a recording leaves marked elements out completely.
What is not hidden
The attribute only covers what is on the page. It doesn't change:
- The page addresses the visitor opens. Don't put personal data in URLs or their query strings.
- Console messages, script errors and the addresses of network requests, which Strabber records as they are. Request and response bodies are never recorded. See Logs and errors.
- Data you send yourself, such as events and their properties, or the identifier, name and custom data of identified users.
- Clicks, scrolling and mouse movements, which are still recorded in marked elements. Only their content is masked.
Good to know
- Masking applies to recordings made after you add the attribute. Recordings made before keep what they recorded; delete them from the recordings list if they hold data you shouldn't keep.
- An element that becomes sensitive while the page is open, because the attribute is added later, is masked from then on. To be safe, add the attribute in the HTML the page loads with.
- To check your setup, open a page with marked elements, then watch its recording in Strabber: the marked parts should show asterisks.