Skip to main content

Vue / Browser — Configuration

createSignal(options) accepts the browser SDK options. Required: apiKey, projectId. Optional: endpoint (defaults to https://api.trysignal.ai/). Same options apply in Vue, Vanilla JS, Svelte, Angular, or any framework.

Transport and batching

Features

sessionRecordingMasking

Session recording masking controls how sensitive content appears in replays. The recorder (rrweb) applies these rules when capturing the DOM: blocked elements are removed or replaced with a placeholder; masked text is replaced with asterisks (or a custom string); ignored inputs do not record value changes (only focus/blur). You can target elements by CSS class, CSS selector, or (for custom logic) a function. How the options work
  • blockClass / blockSelector — Elements matching the class or selector are fully hidden in the replay (replaced with a placeholder). Use for entire sections you don’t want visible (e.g. sidebar with PII, payment forms). Default class: signal-no-capture.
  • maskTextClass / maskTextSelector — Text content of matching elements is replaced with asterisks (***) in the replay. Use for sensitive text (names, emails, IDs) that you still want to show layout for. Default class: signal-mask.
  • maskTextFn — Optional (text, element?) => string. Called for each masked text node; return the string to show in the replay (e.g. '[REDACTED]' or partial mask). If you return the original text, it is not masked.
  • ignoreClass — Inputs/textarea with this class do not have their values recorded; only focus and interaction are. Use when you want to hide what the user typed but keep the fact they used the field. Default class: signal-ignore-input.
  • maskAllInputs — When true, all <input> and <textarea> values are masked in the replay (replaced with asterisks). When false (default), only inputs matching maskInputOptions or password type are masked.
  • maskInputOptions — Per–input-type control when maskAllInputs is false. Keys: text, email, tel, textarea, number, search, url, password, etc. Set to true to mask that type. Password is always masked.
  • maskInputFn — Optional (text, element?) => string. Called for each masked input value; return the string to show in the replay (e.g. last 4 digits only).
Example
In your markup: class="signal-no-capture" (hide), class="signal-mask" (mask text), class="signal-ignore-input" (ignore input values).

networkCaptureOptions

Network capture records fetch and XHR requests so they appear in the session replay (URL, method, and optionally headers and body). These options control what is captured and how it is redacted. How the options work
  • recordHeaders — When true, request and response headers are included. Turn on only if needed; redact sensitive headers via sensitiveHeaders.
  • recordBody — When true, request and response bodies are captured (up to payloadSizeLimitBytes). Use with care for PII; use maskRequestFn or exclude sensitive URLs via urlDenyList.
  • sensitiveHeaders — Array of header names (case-insensitive) to redact in captured data (e.g. authorization, cookie, x-api-key). Their values are replaced with a placeholder.
  • urlDenyList — Array of URL strings or RegExp. Requests whose URL matches are excluded from capture. Default excludes Signal ingestion: ['api.trysignal.ai']. Add entries to skip health checks, analytics, or any URL that must not appear in replays.
  • payloadSizeLimitBytes — Max size (bytes) of request/response body to capture. Larger bodies are truncated. Default 1000000 (1 MB).
  • maskRequestFn — Optional (request) => request \| null. Return a modified request to redact fields, or return null to drop this request from capture (e.g. for sensitive endpoints).
Example

consoleCaptureOptions

Session and advanced

Page leave ($pageleave) is automatic when enableSessionTracking is true. There is no separate capturePageleave API.

See also