DEV Community

Cover image for Hotjar and Clarity are trackers too: wiring session replay into consent
Bannerproof Team
Bannerproof Team

Posted on Originally published at bannerproof.app AI-assisted

Hotjar and Clarity are trackers too: wiring session replay into consent

Someone on the product or design side asks for "a quick Hotjar snippet so we can see where people get stuck". It gets pasted into the theme header, it works, and everyone moves on. Months later someone configures the cookie banner, and that snippet is never mentioned, because whoever set up the banner was thinking about marketing pixels, not UX research.

That gap is how session replay and heatmap tools such as Hotjar, Microsoft Clarity and FullStory end up running before consent. From a consent point of view they are trackers like a Facebook Pixel. They just usually come from a different team.

Check it first: four tests

1. Is it loading before consent? Open a private window, then DevTools → Network, and load the site without touching the banner. Filter for the tool's domain:

hotjar.com   clarity.ms   fullstory.com
Enter fullscreen mode Exit fullscreen mode

Any request here was sent before the visitor made a choice. You can also check whether the tool's global object (under its default name) exists yet:

({ hotjar: typeof window.hj, clarity: typeof window.clarity, fullstory: typeof window.FS })
Enter fullscreen mode Exit fullscreen mode

Before consent you want "undefined" for every tool you use.

2. Does it stop after Reject? Clear the log, click "Reject", and keep moving around the page and opening other pages. The banner closing tells you nothing. What matters is whether recording requests keep going out. This is the same Reject check that applies to every other tracker (see our piece on Reject buttons that don't actually reject).

3. How was it installed? Find where the snippet lives. If it is pasted directly into a template, it bypasses the banner entirely, which is a common shortcut during initial setup. It should go through your consent platform's script-blocking mechanism instead.

4. What do your forms leak? Open a recording of a session that used a form and look at what the tool captured. This is the step most often skipped, and it gets its own section below.

What these tools actually collect

"Session replay" sounds lighter than it is:

  • Mouse movement, clicks and scrolling for the whole session, not just aggregate numbers.
  • Form interaction, and depending on configuration, sometimes the values typed. Most tools mask password fields by default, but not necessarily every sensitive field (an email field, a name field, a search box) unless configured to.
  • A visual recording of the page, in effect a screen recording of what the visitor saw and did.
  • Device, browser and often approximate location, as with most analytics tools.

Behavioural input combined with a visual recording makes these tools considerably more data-heavy than a standard analytics pageview.

Masking is a per-site job

Every major session replay tool masks some fields automatically. The defaults differ a lot between tools, though, and what the default treats as "sensitive" is often narrower than what a particular site actually collects.

The usual weak spot is free text. A support form with a "describe your issue" box isn't masked by most defaults, and visitors do paste sensitive things into fields like that: an account number, a health detail, a password typed in the wrong place. Each tool has its own setting for marking extra elements as masked. Go through every free-text field on the site and decide one by one, rather than assuming the defaults cover them.

Yes, it needs consent

Session replay tools use cookies or similar storage to keep track of a session, and they collect far more than is strictly necessary for the site to work. That puts them under the same ePrivacy/GDPR consent requirement as analytics and advertising trackers. In practice few people dispute this. The usual failure is organisational: the team that installs the tool and the team that manages the banner never compare notes, so the tool runs unconditionally before consent, like any other forgotten script.

A note for whoever owns the site

These tools solve a real problem, and the people installing them are right to care about where visitors struggle. That doesn't replace a compliance check. Put session replay on the same list as every other tracker in your audit, and give it the same tests: nothing before consent, nothing after Reject, and forms masked for the fields your site actually has.


This article first appeared on the Bannerproof blog. Bannerproof checks whether tools like these fire before, or after, a visitor's consent choice: you can scan a site for free at bannerproof.app.

Written with AI assistance.

Top comments (1)

Collapse
 
dosaygo profile image
dosaygo •

When you run those four pre-consent and post-Reject checks on a site whose consent banner only appears for EU visitor IPs, how do you verify the session-replay scripts across different regions?