Skip to content

Privacy & Security

Privacy Controls, Input Masking, and Consent Mode in Session Replay

Practical guide to configuring browser-side input masking, element blocking, Do Not Track, and explicit consent mode before rolling out session recording.

Why no analytics tool makes a site compliant automatically

Recording visitor interactions on a website can involve processing personal data under regulations such as the GDPR, UK GDPR, and similar privacy frameworks. No software tool makes a website compliant on its own. As the website owner, you decide what to record, how to explain that processing in your privacy policy, and when to request visitor consent in your jurisdiction.

SessionLens is built to give store owners clear technical controls over what the browser script collects, how visitor and session identifiers are stored, and when recording is permitted to run.

Browser-side input masking and element blocking

The most important safeguard in session replay privacy is preventing sensitive characters from ever leaving the visitor’s browser. SessionLens masks form inputs by default: text typed into input fields is converted to asterisks in the browser before events are queued for /api/ingest.

Because online stores often render sensitive customer details outside standard form inputs—such as saved shipping addresses, order history tables, or account profile headers—you can control DOM serialization using two CSS classes in your HTML templates:

  • class="sl-mask": Replaces the text content inside the element and its children with asterisks while preserving the layout box in the replay.
  • class="sl-block": Excludes the element and its subtree from DOM serialization entirely, rendering a solid neutral placeholder block of the same dimensions.
  • Pre-launch review: Always record a test session on your staging or live checkout and watch it in the player to verify that custom components, address summaries, and third-party widgets are properly masked or blocked.

Storage architecture, Do Not Track, and consent mode

Unlike cross-site advertising scripts, the SessionLens storefront tracker does not set tracking cookies. To connect pageviews within a visit and recognize returning visitors on the same site, the tracker keeps a visitor identifier in the browser’s localStorage and maintains active session continuity in sessionStorage (expiring after 30 minutes of inactivity).

For store owners who need explicit recording gates or regional restrictions, SessionLens supports both HTML script attributes and dashboard privacy controls:

  • Consent mode: Enable GDPR consent mode in your site settings so the tracker waits for explicit visitor consent before recording DOM events.
  • Do Not Track (DNT): Add data-respect-dnt="true" to the script tag (or toggle it in Settings) so browsers sending the DNT: 1 header are ignored automatically.
  • IP exclusion and instant pause: Add office or developer IP addresses to your exclusion list in Settings, or pause recording across the entire site with a single switch without editing your theme files.
  • Automated retention cleanup: The server automatically deletes recordings older than your plan’s retention window (7 days on Free, 30 days on Pro, 90 days on Business) using the immutable server admission timestamp (recorded_at).

Role-based team access and data ownership

Controlling who can view recordings inside your organization is just as important as masking inputs in the browser. SessionLens uses verified Gmail accounts for authentication and lets site owners invite teammates with explicit admin or member roles per site.

Service administrators managing the deployment can view high-level account and plan metadata, but the admin panel does not expose customer visitor recordings, carts, or chat messages. Removing a site or letting recordings reach their retention window permanently removes the underlying session chunks from the database.

If you self-host SessionLens on your own virtual private server with PostgreSQL and Docker Compose, your recorded session chunks, heatmaps, and visitor profiles remain entirely on your own infrastructure under your direct operational control.

See your store through your visitors’ eyes

Install the asynchronous SessionLens script in about two minutes. Start on the permanent Free plan with 1,000 monthly recorded sessions—no credit card required.