Analytics

Session replay and GDPR: what to record and what to mask

A session replay checklist for EU and UK privacy rules: consent first, mask by default, know what masking misses, limit viewers.

On this page 10 sections

Session replay is easiest to defend when nothing is recorded until the visitor agrees, everything that looks personal is hidden before it leaves the browser, and few people can watch. Masking lowers the risk but does not remove it. Lundot's defaults serve as the worked example. This is not legal advice: whether you need consent depends on your law and audience, so ask your own adviser.

Swipe sideways to see the whole diagram.

Consent first, masking in the browser, a second clean on the server, then limited access.
The diagram as a list
  1. A visitor opens a page and your consent tool asks about replay.
  2. No replay consent: nothing is recorded.
  3. Replay consent given: the recorder starts and masks inputs and personal details in the browser.
  4. The server cleans every event again at the site's level.
  5. Replays are stored for 30 days, up to 1 GB per site.
  6. Only roles with the Replays switch can watch.

There is no single answer for every country. The European Data Protection Board's guidelines on the technical scope of Article 5(3) of the ePrivacy Directive (final Version 2.0, adopted 7 October 2024 and published 16 October 2024) read the rule as covering more than cookies, including tracking pixels and scripts that read information from a visitor's device. A replay recorder is a script that reads what a visitor sees and does, so assume the consent question applies even if your site sets no cookies.

Separately, by reasoning rather than from a rule, a masked replay can still be personal data: it is one person's session, with their path, timing and clicks. Masking reduces the harm but does not change what the recording is.

Treat replay as a separate purpose with its own consent, apart from cookieless analytics.

The checklist

  1. Get consent before the recorder starts. Not after the first page, not on a default.
  2. Keep replay consent separate from analytics consent. A visitor can accept one and refuse the other.
  3. Make it as easy to withdraw as to give. Withdrawal must stop the recorder.
  4. Mask by default. All typed input, plus anything that looks like personal details.
  5. Add masking for what your pages show. Account pages, invoices and messages need more than the defaults.
  6. Know what masking cannot catch, and block those parts instead.
  7. Limit who can watch. Not every colleague needs replays.
  8. Set a retention limit and a size limit.
  9. Say what is recorded in your consent text and privacy notice, including that replays record page text.

The CNIL, the French regulator, adopted its recommendation on session replay tools on 8 October 2026 and published it on 5 November 2026. It says these tools need prior consent, because their reading and writing is not strictly necessary for the service, so no exemption applies. It also asks that the tool be explained at the first level of your consent interface, with its purposes set before deployment.

In Lundot the recorder does not start until your consent tool runs one line:

(window.lundot ??= { consented: [] }).consented.push("replay");

Consent is held in memory only, so your consent tool calls the line on each page once it knows the choice. To withdraw, call window.lundot?.revoke?.("replay"): recording stops and anything waiting to start is dropped. Withdrawal does not delete recordings already sent. Heatmaps wait for the same consent.

  • Analytics consent never grants replay, including a grant read from Google Consent Mode.
  • A browser that sends Global Privacy Control is recorded only when the visitor switched replay on themselves. "Accept all" does not count.
  • Sites on the Strict privacy profile do not accept recordings.

Recipes for consent managers and your own banner are in cookies and consent.

What to mask

What to mask Why How (generic) Lundot default
Typed input and form state People type passwords, names, addresses and card details Mask every input and editable region in the recorder All inputs masked; typed text and the checked state of boxes dropped. No setting relaxes this
Emails, phone and card numbers in page text Personal data appears in profiles, receipts and tables Pattern-match common formats Commonly formatted emails, phones, card numbers and any number of 7 or more digits are masked
Page addresses Query strings carry tokens, emails and search terms Strip query and fragment before sending Query strings and fragments removed from addresses; mailto: and tel: links keep only their scheme
Video, audio, canvas, frames Embedded content may show private material Replace with placeholders Media blocked; canvas and cross-origin iframes not recorded
Attributes holding text alt, title and placeholder often hold names Mask a list of attributes title, alt, aria-label, placeholder, value and every data-* attribute masked (a short list of theme keywords is kept)
Whole sensitive areas Billing, messages, profiles Block the element data-lundot-mask, the class rr-block, or CSS selectors under Hide from replays in Site settings (up to 20)
All page text Pages that show private data throughout A stricter mode All text shows layout and movement only

Lundot's default for new sites is Typed input and personal details: page text and images are visible, and the rest above is hidden. Choose All text under Site settings, Replays, What replays hide for pages that show private data. You cannot unmask: no setting shows typed input, video, audio, canvas or frames.

The server does not trust the browser: each event is cleaned again on arrival, so an edited recorder cannot send typed input or a commonly formatted email, phone or card number.

What masking cannot catch

Pattern-based masking finds only what looks like personal data:

  • Free text that does not look like an email. A support message reading "my name is Jane Doe and I live on High Street" is not a format a pattern can find.
  • Names in headings and page copy. "Welcome back, Jane" is ordinary text.
  • Unusual spellings. An address written as "jane at example dot com" is not recognised. Mark such parts with data-lundot-mask.
  • Element names, ids and classes. Lundot keeps them, so do not put personal data in them. A class such as user-jane-doe shows in the recording.

Mask or block these parts: a blocked element is not recorded and appears as a placeholder. Audit by opening a few recordings of your account, checkout and messaging pages and looking for anything you would not want a colleague to read.

Who can watch, and for how long

Treat watching as a permission for the few people who need it. In Lundot, watching is a separate Replays switch on each role, and it also needs Behaviour at View or above. Someone without it sees "Replays are off for your role". When an admin opens a person's access with replays on, a warning reads "They can contain personal data that masking missed." Signed links to a recording expire after 60 seconds. See roles and teams.

Replays are kept for 30 days, and each site keeps at most 1 GB: past that, its oldest recordings are deleted first. There is no retention setting in the app today, so the periods are fixed. Deleting a site deletes its replays, and a deletion request for one visitor covers that visitor's replays. See data retention and deletion.

What to tell visitors

Say that replays record page text. With Lundot's default, a recording shows the text and images a visitor sees, plus network timings, page errors and page speed measures, while typed input and personal details are hidden. A line you can adapt: "Replays record how you use this site, including the text and images you see, request timings, page errors and page speed. What you type and personal details are hidden." Put the same facts in your privacy notice.

Turning replay off

Replays and heatmaps come with the tracking script and are on by default. To opt out, add data-replays="off" or data-heatmaps="off" to the script tag. Page-level analytics need no recordings.

How Lundot handles this

Replays start only after the separate replay consent, mask inputs and commonly formatted personal details in the browser, and are cleaned again by the server. Who can watch is a per-role switch, and recordings are kept for 30 days. See session replay privacy, cookies and consent and replays and heatmaps.

Sources

Put it into practice

  • DocsInstall the tracking script

    Add one script tag to your site's head, with notes for HTML, Next.js, WordPress, Shopify, Webflow and tag managers, then check it works.

  • DocsThe page report

    One row per path: AI requests, search, visits and conversions.

  • ProductWeb analytics that counts visits from AI assistants

    Visitors, sources, pages, events, funnels and replays, with an AI channel that counts ChatGPT and other assistants, even when only a utm_source tag shows them.

Read your site one page at a time

The page report puts AI requests, search clicks, visits and conversions on one row per page.