Replay privacy
Inputs are always masked in replays. Everything below adds to that default, is configured per project in Project settings (admins), and is served to the...
Inputs are always masked in replays. Everything below adds to that default, is configured per project in Project settings (admins), and is served to the SDKs through GET /v1/config (keys of settings.sdk).
Masked inputs show a fixed placeholder (********) whatever was typed, so a replay does not reveal how long a password or e-mail address was. A custom replay.maskInputFn replaces the placeholder.
URLs (urlPrivacy)
Values of well-known sensitive query parameters (password, passwd, pwd, pass, token, access_token, refresh_token, id_token, secret, client_secret, state, session, api_key, apikey, key, auth, authorization, code, otp, email, ssn) are replaced with <masked> in every URL the browser SDK sends: $current_url, $referrer, $pageleave, $initial_* and the page address inside the recording. The client option adds to that list:
init("lc_pk_...", { apiHost, urlPrivacy: { maskParams: ["invite"], maskCampaignParams: true, stripHash: true } });maskCampaignParams also masks UTM and ad click-id parameters; stripHash drops the #fragment (not for hash routers).
Policy keys (PUT /v1/projects/{pid}/settings/sdk)
Key | Applies to | Effect |
|---|---|---|
| browser, worker | mask text / replace the subtree |
| browser |
|
| iOS, Android, Flutter, React Native | screen / view-controller names ( |
| mobile SDKs, worker | at most 20 regexes (200 chars each, must not match the empty string): matching text is masked on the device and again by lc-worker's scrubber |
| iOS, Android (auto), Flutter, RN ( | field ids captured encrypted (controlled exposure, below) |
| browser | managed through |
URL rules are enforced by the browser SDK only: the worker cannot tell which page a DOM mutation belongs to. Use replay_mask_selectors for anything that must also be masked server side.
PII audit
POST /v1/projects/{pid}/replay-privacy/scan {sessions?} (admin) reads the stored chunks of the most recent replays (default 50, max 200) and records a finding per element selector whose visible text or attributes still show emails, card or phone numbers, or hinted names. Values are never stored. The AI pass (POST /v1/ai/replays/pii-audit {project_id, sessions?}, lc-ai, the project's own model through the AI providers settings) sends masked text samples (emails and digit runs replaced) to the model, which picks names, addresses and ID numbers by sample id. It can never invent a selector. GET /replay-privacy/text-samples requires admin and PII access.
Accepting a finding (PATCH /replay-privacy/findings/{id} {status: "accepted"}) appends its selector to replay_mask_selectors; dismissed findings stay dismissed when later scans see them again.
Controlled exposure (mobile)
Some fields must be recoverable (support, chargebacks) but never visible in a replay. For those:
An admin creates a key:
POST /v1/projects/{pid}/sensitive-keys. lc-api generates an RSA-2048 key pair. The private key is sealed with the server keyring (LC_MASTER_KEY, envelope encryption, AAD bound to project and key id) and never leaves lc-api. The public key is published asreplay_exposure_key {kid, n, e, pkcs1}in the SDK config. Creating another key rotates: new captures use it, and old values stay revealable until their key is destroyed.List the field ids in
replay_exposure_fields. The SDK masks those fields in the replay as usual. It also encrypts the value (RSA-OAEP-SHA-256, UTF-8 truncated to 190 bytes) and sends$sensitive_capture {$exposure_field, $exposure_kid, $exposure_ciphertext, $screen_name, $exposure_truncated}once per distinct value.In the replay, Sensitive fields lists the captures (never the ciphertext). An admin with PII access reveals one value at a time with a reason of 10 to 500 characters:
POST /replays/{sid}/sensitive/reveal {uuid, reason}. Each reveal writesreplay.sensitive_revealto the audit log with the reason, and the response isCache-Control: no-store.DELETE /sensitive-keys/{kid}destroys the private key. Values encrypted to it can never be revealed again (410).
The API never returns the ciphertext (player markers drop it), and shared replay links never show event properties, so a value is readable only through the audited reveal.
Related
Comment search:
GET /v1/projects/{pid}/replays/comments/search?q=(Postgres full-text, newest first).Experiment markers:
GET /replays/{sid}/experiment-markers(exposure and metric events of experiments whose flag the session evaluated).Agent-driven sessions: the WebMCP module (
@lucida-analytics/browser/webmcp) emits$agent_action. Filter replays on that event ("Agent-driven sessions" in the filter builder); the timeline marks those events.