Webflow Hotjar setup that waits for consent
Hotjar, now part of Contentsquare, shows where people click, scroll and give up. We set it up so it records the pages you care about, and only with consent.
How we set it up
The method depends on where your site is built. Here is what we use for Hotjar on each platform.
Framer
We add Hotjar as a tag in the Google Tag Manager container that runs in Framer’s custom code, triggered only when analytics consent is granted. Framer pages are client-rendered after the first load, so we check that recordings capture page changes correctly.
Framer development Via GTMWebflow
Hotjar loads from the GTM container in Webflow’s custom code, behind your consent banner. We mark form fields and any personal data with Hotjar’s suppression attributes in the Webflow Designer, so they never appear in recordings.
Webflow development Via GTMAstro
On Astro, Hotjar runs from the GTM container in the base layout under consent rules. Because Astro pages are server-rendered HTML, heatmaps line up well with the layout, and suppression attributes go straight into components.
Astro development Via GTMNext.js
We load Hotjar from GTM, which runs through @next/third-parties, with consent gating. Hotjar detects client-side route changes in single-page apps itself, so we avoid GTM history triggers that would double-count pages.
Next.js developmentWhat teams use it for
Find where people stop
Scroll and click heatmaps on pricing and landing pages show which sections get skipped.
Watch real sessions
Recordings of people who start but do not finish a form reveal confusing fields.
Ask one question
A short on-page survey asks why someone is leaving the pricing page.
What to watch out for
Recordings capture behavior on the page. Gate them on consent, mask inputs and mention Hotjar in your privacy notice.
The script records the page continuously. Run it on the pages you are studying, not every page, every day.
Recordings are a sample. Use them to form hypotheses, then confirm with analytics or a usability test.
Questions about Hotjar
Does Hotjar record what people type?
Hotjar or Microsoft Clarity?
Does Hotjar slow the site down?
Do I need Google Tag Manager for a Hotjar integration?
Thomas OldenburgerFounder, design and build leadStill deciding? A 30-minute call answers most of it.
Related integrations and services
Microsoft Clarity
Free heatmaps and session recordings from Microsoft, with rage-click and dead-click detection.
OpenPostHog
Product analytics, session replay and feature flags, with an EU cloud option.
OpenGoogle Tag Manager
One container for all your analytics and marketing tags, with consent rules and version history.
OpenProduct design
Heatmaps and recordings show us where a flow confuses people before we redesign it.
OpenUsability testing
Glossary definition.
Open