Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Session recording without consent: how to find and fix it

OPS-337Medium impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

Session recording tools rebuild a visit as a replay: mouse moves, clicks, scrolls, page views and, if not masked, what people type. Heatmap tools collect similar data in aggregate. They usually work by setting cookies or local storage and sending behaviour data to a third party.

Under the ePrivacy rules (the law behind cookie banners in the EU and UK), storing or reading data on a visitor's device generally needs prior consent unless it is strictly necessary. Analytics-style recording rarely counts as strictly necessary. The issue is that the recording script runs on page load, regardless of the banner choice.

Why it costs you leads or sales

The direct cost is risk, not lost traffic. Recording people who did not agree can lead to complaints, regulator attention and awkward questions from larger customers during security or privacy reviews. Replays that capture form input may also store names, emails or addresses you never meant to collect.

There is a quieter cost too. If you later add a proper consent setup, tools that were wired in by hand may break or keep recording, leaving you with data you cannot safely use. Clean, consented data is more useful for improving your funnel than a large pile of data with a doubtful legal basis.

Where recording slips past consent
  1. Visitor landsPage loads in the EU or UK
  2. Banner shownVisitor has not chosen yet
  3. Replay script loadsStarts recording before any choice
  4. Form typed intoFields may be captured
  5. Data stored by vendorNo valid consent behind it

The replay script loads on page view, so the banner choice never gets a say.

Consent choice versus the recording script

A correct setup holds the recorder back until the visitor accepts analytics.

How to check if your site has it

Test in a clean browser session
  1. Open a private window

    Use a fresh private or incognito window so no earlier consent choice is stored. If you serve different banners by country, test from an EU or UK location or with a VPN.

  2. Open DevTools before the page loads

    Press F12, go to the Network tab, tick Preserve log, then load your site. Do not click anything on the banner.

  3. Look for recorder requests

    Filter by hotjar, clarity, fullstory, logrocket, mouseflow, smartlook or hotjar.io. Any request before you accept means recording is not gated.

  4. Check cookies and storage

    In the Application tab, look under Cookies and Local Storage for names such as _hjSessionUser, _clck, _clsk or similar set before consent.

  5. Reject, then reload

    Click Reject all, reload and repeat the check. Recorder requests after a rejection are a clear fail.

  6. Test a form

    After accepting, type a fake name and email into a form, then view the replay in your tool. If you can read the text, masking is off.

Common recorders and what to look for in DevTools
ToolTypical script hostTypical cookie
Hotjarstatic.hotjar.com, script.hotjar.com_hjSessionUser_*, _hjSession_*
Microsoft Clarityclarity.ms_clck, _clsk
FullStoryfullstory.com, edge.fullstory.comfs_uid
Mouseflowmouseflow.commf_user, mf_*

How to fix it

The fix has two parts: only load the recorder after the visitor accepts the right consent category, and mask personal data so a replay never contains what people type.

Gate the recorder behind consent
  1. Move the script into GTM

    Remove the hard-coded recorder snippet from your theme or site. Add it as a tag in GTM (Hotjar and Microsoft Clarity both have tag templates, or use a Custom HTML tag).

  2. Require consent on the tag

    Open the tag, go to Advanced Settings, Consent Settings, choose Require additional consent for tag to fire and add analytics_storage. Alternatively use your CMP's trigger, such as a custom event fired when analytics consent is given.

  3. Use the right trigger

    Trigger on All Pages only if consent is enforced as above. Otherwise trigger on the CMP's consent-updated event.

  4. Preview and test

    Use Tag Assistant preview. The recorder tag should show as not fired until you accept.

Load a recorder only after analytics consent (generic pattern)javascript
function loadRecorder() {
  if (window.__recorderLoaded) return;
  window.__recorderLoaded = true;
  var s = document.createElement('script');
  s.async = true;
  s.src = 'https://example.com/recorder.js'; // replace with your tool's real script URL
  document.head.appendChild(s);
}

// Call this from your consent tool's callback when analytics is accepted.
// The callback name depends on your CMP.
window.onAnalyticsConsentGranted = loadRecorder;

Then reduce what is captured. Most tools let you mask by default. In Microsoft Clarity this is under Settings, Masking, where you can choose Strict. In Hotjar, keyboard input is suppressed by default, and you can add data-hj-suppress to any element that shows personal data. Check your own tool's current documentation for exact settings.

Hide a personal-data element from Hotjar replayshtml
<div data-hj-suppress>
  Order for: Jane Doe, jane@example.com
</div>
Recorder behaviour before and after the fix

Before

  • Recorder script loads on every page view
  • Cookies set before any banner choice
  • Form fields readable in replays
  • Recording continues after Reject

After

  • Recorder loads only after analytics consent
  • No recorder cookies for rejecting visitors
  • Form fields and personal data masked
  • Recording stops if consent is withdrawn
Try it: consent and the recorderInteractive
Recorder ignores consent

Consent: blocked / denied

  • GA4no hit
  • Google Adsno hit
  • Meta Pixelno hit

Visitor rejects analytics, yet the replay tool still loads and records the whole visit.

Toggle the cause to see how the same visitor choice leads to different results.

How to confirm it's fixed

Confirmation checks
  • In a fresh private window, no recorder requests appear in the Network tab before you choose on the banner
  • No recorder cookies or local storage keys exist before consent
  • After Reject all and a reload, there are still no recorder requests
  • After Accept, the recorder loads and a new session appears in your tool
  • A fake name and email typed into a form show as masked in the replay
  • Withdrawing consent through the banner settings stops new recordings
  • GTM Tag Assistant preview shows the recorder tag as not fired until consent

How to prevent it happening again

Recorders return when someone pastes a fresh snippet from a vendor's onboarding page, installs a plugin or a marketing agency adds a test tool. Put a few simple habits in place.

Habits that keep recording compliant
  • Keep one list of every script on the site and who owns it
  • Require that new tools go through GTM or your CMP, never pasted into the theme
  • Add the recorder to your cookie policy under analytics, with its vendor name
  • Retest in a private window after every theme, plugin or container change
  • Set masking to strict by default and review replays for personal data
  • Set a short retention period in the recorder's settings
  • Review the setup every quarter

How FunnelGuard handles this

FunnelGuard does not check for session recording without consent yet. It is a possible future check, not something the service covers today.

What FunnelGuard does do nearby: it runs your real journeys, such as lead forms and checkouts, on a schedule and checks each step and the tracking hits sent to ad and analytics platforms. If a consent banner change breaks a form or stops a tag from firing, that kind of failure can show up in a run. It does not look at whether a replay tool loads before consent.

To watch for this yourself, repeat the private-window DevTools check above after each release, and use your consent platform's scanner if it has one. FunnelGuard's free read-only website audit is a separate option, but it is not a consent check for session recording.

Questions people ask

Do I need consent for session recording?

In the EU and UK, session recording tools usually set cookies or storage and send behaviour data to a third party, which generally needs prior consent under ePrivacy rules. Some tools can be configured to avoid this, but check with your privacy adviser. Do not assume the default setup is exempt.

Why is my Hotjar or Clarity still recording after I clicked Reject?

The script is probably hard-coded in your theme or Custom code, so your consent banner cannot block it. Move it into Google Tag Manager with consent required, or assign it to the Analytics category in your consent tool, then retest in a private window.

How do I stop Hotjar from loading until a visitor accepts cookies?

Remove the pasted Hotjar snippet and add it as a tag in Google Tag Manager. In Advanced Settings, Consent Settings, require analytics_storage, or trigger it from your consent tool's analytics-accepted event. Confirm in Tag Assistant that it does not fire before consent.

Does masking form fields make session recording GDPR compliant?

No. Masking reduces the personal data captured, which is good practice, but the recorder may still set identifiers and need consent. You need both: consent before recording starts and masking of sensitive fields.

How can I check if session replay runs before consent?

Open a private window, open DevTools, go to the Network tab, load your site and do not touch the banner. Look for requests to your recorder's domain and for its cookies in the Application tab. Any activity before you accept means it is not gated.

Does Microsoft Clarity respect cookie consent?

Clarity has a consent API, and you can load it only after consent or pass the consent signal to it. It does not decide for you, so check that your setup actually sends the signal. Verify with the Network tab test.

Can FunnelGuard detect session recording without consent?

Not at the moment. It is a possible future check. FunnelGuard currently monitors journeys, tracking hits and test-lead delivery, so use a manual DevTools check or your consent platform's scanner for this issue.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.