Severity: HighOwner: MarketingTime to fix: 15-45 min
Hotjar before consent
Stop Hotjar from loading session replay or heatmap scripts before the visitor has granted analytics or marketing consent.
Covers: hotjar_before_consent, pre_consent_hotjar
Why this matters
Hotjar can capture behavioral telemetry and session data that should not start before the visitor has made a valid consent choice.
How to verify manually
- Inspect the Network panel for Hotjar script and telemetry requests on first load.
- Check whether Hotjar cookies appear before consent.
- Confirm whether Hotjar loads through GTM, plugin injection, or hardcoded snippets.
Typical root causes
- Hotjar is configured as always-on analytics.
- A direct theme snippet duplicates GTM-managed Hotjar logic.
- The CMP category mapping treats Hotjar as functional instead of optional.
GTM fix
- Move Hotjar tags behind analytics or marketing consent as appropriate.
- Remove unconditional triggers from Hotjar tags.
- Verify in preview mode that no Hotjar request fires pre-consent.
WordPress fix
- Check plugins and theme options for built-in Hotjar injection.
- Disable duplicate snippets outside your CMP-controlled setup.
- Retest after cache invalidation.
Generic fix
- Load Hotjar only after explicit consent is granted.
- Keep one source of truth for Hotjar initialization.
- Audit templates and tag manager to ensure there is no parallel fallback loader.
How to confirm the fix worked
- Confirm Hotjar does not load before consent.
- Confirm Hotjar cookies are absent pre-consent.
- Run a fresh scan and verify Hotjar is no longer flagged.
Next step
Re-scan after deployment to confirm that the runtime behavior changed, not just the banner copy.