Skip to main content
Version: Angular SDK

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 { Component, ViewChild, ElementRef } from "@angular/core";
import { Screeb } from "@screeb/sdk-angular";

constructor(private screeb: Screeb) {}

ngAfterViewInit() {
this.screeb.ScreebMaskText(this.cardNumberInput.nativeElement);
this.screeb.ScreebNoCapture(this.personalInfoSection.nativeElement);
this.screeb.ScreebId(this.checkoutButton.nativeElement, "checkout_button");
}
HelperDescription
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 inject the service, apply the equivalent class or attribute directly in your template:

<input class="screeb-mask-text" />
<div class="screeb-no-capture">...</div>
<button data-screeb-id="checkout_button">Checkout</button>