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.
<script lang="ts">
import { onMount } from "svelte";
import { useScreeb } from "@screeb/sdk-svelte";
let cardInput: HTMLInputElement;
const { ScreebMaskText, ScreebId } = useScreeb();
onMount(() => {
ScreebMaskText(cardInput);
ScreebId(cardInput, "card_number_input");
});
</script>
<input bind:this={cardInput} type="text" />
| 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 use the hook, 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>