Privacy helpers
Privacy helpers control how specific elements appear in session replay.
Screeb automatically masks password inputs and elements matched by common sensitive-keyword heuristics. Use these helpers for custom sensitive content.
import { ScreebMaskText, ScreebNoCapture, ScreebId } from "@screeb/sdk-browser";
ScreebMaskText(document.querySelector("#card-number"));
ScreebNoCapture(document.querySelector("#personal-info"));
ScreebId(document.querySelector("#checkout-button"), "checkout_button");
| Helper | Description |
|---|---|
ScreebMaskText(element) | Masks text content in session replay. |
ScreebNoCapture(element) | Excludes the element from session replay capture. |
ScreebId(element, id) | Sets a stable element ID for IAM targeting and replay context. |
Using CSS classes directlyโ
If you don't want to import the helpers, apply the equivalent class or attribute directly in your markup:
<input class="screeb-mask-text" />
<div class="screeb-no-capture">...</div>
<button data-screeb-id="checkout_button">Checkout</button>