Hotjar

Hotjar records sessions, builds heatmaps, and runs on-site polls and funnels. Those features depend on a script running in the browser and observing the DOM, so Hotjar is delivered by Datafly Signal as a consent-gated client-side tag rather than a server-to-server destination.

Signal owns the lifecycle of that tag. The Hotjar snippet is never hard-coded into your site: Signal’s SDK loader injects it only once consent permits, forwards identity when you call datafly.identify(), and tears the tag down completely if consent is later revoked.

Why route Hotjar through Signal

  • Consent is enforced, not just recorded. The tag is not injected at all until your CMP signals permission, so there is no window in which Hotjar loads ahead of a decision.
  • Revocation actually removes the tag. On consent withdrawal Signal calls Hotjar’s teardown path and stops the recorder, rather than leaving a loaded script idle in the page.
  • One place to change the Site ID. The Hotjar Site ID lives in Signal’s pipeline configuration, so rotating or re-pointing it is a configuration change, not a site release.
  • Identity stays consistent with the rest of your stack. The same datafly.identify() call that feeds your server-side destinations also attributes the Hotjar session.

Prerequisites

  • A Hotjar account with an active site.
  • Your Hotjar Site ID — find it under Settings → Sites & Organisations, or in the tracking-code snippet as hjid.
  • Datafly.js deployed on the site, with the client-SDK loader module enabled.
  • A consent signal reaching Signal (from your CMP, or via Signal’s own consent API).

Configure in Signal

  1. In the management UI, open the pipeline that serves the site.
  2. Add the Hotjar integration and select the Default preset.
  3. Enter your Hotjar Site ID.
  4. Confirm which consent category gates the tag — analytics in most CMP configurations.
  5. Save and deploy the pipeline.

Delivery

PropertyValue
Delivery modeClient-side (SDK loader)
Events forwardedNone — Hotjar observes the page directly
IdentityForwarded on datafly.identify()
ConsentLoad gated; teardown on revocation

Because Hotjar observes the browser directly, Signal does not forward your server-side event stream to it. No event mappings are required, and the blueprint ships with none.

Verify it’s working

  1. Load the site with consent denied. Confirm in DevTools → Network that no request to static.hotjar.com is made.
  2. Grant consent. The Hotjar script should load, and a new recording should appear in your Hotjar dashboard within a few minutes.
  3. Call datafly.identify() with a user ID and confirm the session is attributed to that user in Hotjar.
  4. Revoke consent and confirm the recorder stops and the tag is removed.

Troubleshooting

Hotjar never loads. The consent category gating the tag has not been granted. Check the consent state Signal received in the LiveFlow dashboard.

Recordings appear but users are anonymous. datafly.identify() is either not being called, or is called before the Hotjar tag has loaded. Identity is forwarded on the next identify call after load.

The tag persists after consent is revoked. Confirm the SDK loader module is included in your Datafly.js bundle — teardown is handled by the loader, not by the base collector.

See also