Consent mode

Consent mode is the practice of gating session recording on the user's consent state: recording starts, stops, or degrades to a minimal mode depending on what the visitor agreed to, usually via the site's consent management platform. Under EU rules, replay for analytics purposes generally requires opt-in consent before capture begins.

How it works

The integration is event-driven: the consent platform exposes the visitor's choices, and the recording layer subscribes. On consent granted, call record(); on withdrawal, call the stop function and cease transmission. The recording guide shows the basic recording lifecycle. Two details carry the compliance weight: nothing may be captured before consent resolves (a buffer-then-discard approach still counts as processing), and withdrawal must also address already-collected data per your retention and deletion design. Some teams operate a layered model, such as recording with maximal masking under legitimate interest for fraud or security purposes while gating full replay on consent; that split needs documented legal analysis per purpose.

Where you encounter it

Any EU-facing deployment, CMP integration work, and cookie-banner audits, where an unconsented recording script is a standard finding.