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.
- Visitor landsPage loads in the EU or UK
- Banner shownVisitor has not chosen yet
- Replay script loadsStarts recording before any choice
- Form typed intoFields may be captured
- Data stored by vendorNo valid consent behind it
The replay script loads on page view, so the banner choice never gets a say.
A correct setup holds the recorder back until the visitor accepts analytics.
How to check if your site has it
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.
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.
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.
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.
Reject, then reload
Click Reject all, reload and repeat the check. Recorder requests after a rejection are a clear fail.
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.
| Tool | Typical script host | Typical cookie |
|---|---|---|
| Hotjar | static.hotjar.com, script.hotjar.com | _hjSessionUser_*, _hjSession_* |
| Microsoft Clarity | clarity.ms | _clck, _clsk |
| FullStory | fullstory.com, edge.fullstory.com | fs_uid |
| Mouseflow | mouseflow.com | mf_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.
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).
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.
Use the right trigger
Trigger on All Pages only if consent is enforced as above. Otherwise trigger on the CMP's consent-updated event.
Preview and test
Use Tag Assistant preview. The recorder tag should show as not fired until you accept.
Find where the script is added
It may come from a plugin (Hotjar or Clarity plugin), a header and footer plugin, or the theme. Locate every place that outputs it.
Use your consent plugin's blocking
In your consent plugin (for example Complianz, CookieYes or Cookiebot), assign the recorder to the Statistics or Analytics category so it is blocked until accepted. Exact menu names vary by plugin.
Remove duplicates
If the script is also pasted into the theme, delete that copy or it will keep loading.
Check how the tool is installed
Look in Online Store, Themes, Edit code (theme.liquid) and in Settings, Apps and sales channels for the recorder's app.
Use Customer Privacy settings
In Settings, Customer privacy, set up the cookie banner. Apps installed as web pixels respect the customer's consent choices; hard-coded theme scripts do not.
Gate theme scripts
For a theme snippet, load it only after the Shopify Customer Privacy API reports that analytics is allowed, or move it into a consent-aware app.
Find the embed
Check Project settings, Custom code (head and footer) and any Embed elements.
Remove the direct snippet
Take the recorder out of Custom code and load it through your consent tool or a GTM container that respects consent.
Republish
Publish the site and retest in a private window.
Use Wix's consent tools
Set up the cookie banner under Settings, Cookie Consent Banner.
Add the recorder as a categorised tool
In Settings, Custom Code (or Marketing Integrations), add the script and set its category to Analytics so it loads only after consent. Menu names can differ by Wix version.
Find the code
Check Settings, Developer Tools, Code Injection and any Code Blocks.
Use the cookie banner categories
Enable the Cookie Banner under Settings, Cookies and Visitor Data. Scripts in Code Injection are not blocked automatically, so move the recorder behind a consent-aware loader such as GTM.
Locate tracking code
Check Sites, Funnels or Websites, then Settings, Tracking Code (header and footer) and any Custom Code elements.
Load it conditionally
Remove the direct snippet and load it from GTM with consent required, or use a consent script as shown in the Custom code tab.
Wrap the loader
Do not include the recorder in your HTML. Inject it from a function that only runs after your consent tool says analytics is allowed.
Stop on withdrawal
If a visitor withdraws consent, stop recording and, where the tool supports it, call its opt-out or stop method.
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.
<div data-hj-suppress>
Order for: Jane Doe, jane@example.com
</div>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
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
- 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.
- 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.
Related issues
- OPS-320Tracking fires before consentFix guide
- OPS-324Consent not honoured after reject (pixels still fire)Fix guide
- OPS-319No cookie banner for EU/UK visitorsFix guide
- OPS-336Personal data in URLs or analyticsFix guide
- OPS-339Third-party embeds (YouTube, Maps) setting cookies before consentFix guide
- OPS-326Cookie policy missing or outdated cookie listFix guide