Integrate Hotjar for Heatmaps & Session Recordings
Your online store is live, but conversion is lower than expected. According to Baymard Institute, 70% of users abandon carts due to poor interface. Without behavior analytics, you’re left guessing why they leave. Hotjar solves this by recording sessions and building heatmaps—visualizations of clicks, scrolls, and mouse movements. We, a team with 7+ years in web analytics, integrate Hotjar into your project within a day. A heatmap is key for UX understanding. Our clients save up to 40% analysis time, and post-optimization conversion grows 20–30% based on Hotjar data. Request a free consultation to assess your site.
Why Hotjar Outperforms Log Analyzers
Log analyzers show what users clicked, but not why. Hotjar records the full session: cursor movement, gaze dwell. Research indicates that UX issues are discovered twice as fast with Hotjar. Click heatmaps reveal up to 30% of clicks on non-clickable elements—actionable data for targeted fixes.
How Hotjar Unveils UX Issues
Hotjar generates three heatmap types: click maps, move maps, and scroll maps. Click maps show exactly where users click—often on non-clickable elements. Move maps track cursor movement, correlating with attention. Scroll maps indicate how far users scroll. Combined, they provide a complete picture. For instance, on one project we detected 70% of clicks landing on an empty area right of a form—solved by widening the input field.
Data from Session Recordings
Session recordings are videos of each visitor’s actions. You see how users fill forms, where they hesitate, which validation errors appear. Funnels show drop-off at each step. Surveys allow on-site polling. All this data drives pinpoint UX improvements.
Installing Hotjar in 30 Minutes
We install Hotjar via Google Tag Manager or direct code in <head>. Below is the GTM snippet:
<!-- Hotjar Tracking Code --> <script> (function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid:YOUR_SITE_ID,hjsv:6}; a=o.getElementsByTagName('head')[0]; r=o.createElement('script');r.async=1; r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; a.appendChild(r); })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv='); </script> Trigger: "All Pages". Publish the container. Next, configure user identification and events:
// User identification window.hj('identify', userId, { plan: 'pro', email: userEmail, country: 'US', }); // Events window.hj('event', 'form_opened'); window.hj('event', 'add_to_cart'); window.hj('event', 'form_validation_error'); window.hj('event', 'form_submitted'); In the Hotjar interface → "Recordings", filter sessions by attributes or events.
Data Privacy
Hotjar blurs password inputs by default. For other personal fields, explicitly add classes:
<input type="text" name="card_number" class="data-hj-suppress"> <div class="data-hj-suppress"> <p>SSN: 123-45-6789</p> </div> <input data-hj-suppress type="text" name="passport"> You can also set global CSS selectors in the site settings—no code changes needed.
Configuring Hotjar for SPAs
In SPAs, the router changes URL without full reload. Hotjar by default creates heatmaps based on URL—if URL doesn't change, all events merge into one map. The solution: manually notify Hotjar of page changes:
// React Router v6 import { useEffect } from 'react'; import { useLocation } from 'react-router-dom'; export function HotjarPageTracker() { const location = useLocation(); useEffect(() => { window.hj?.('stateChange', location.pathname + location.search); }, [location.pathname]); return null; } For Next.js, use the routeChangeComplete event.
Common Integration Mistakes
Frequent issues: wrong Site ID (counter not verified), empty heatmaps due to missing data (wait 1-2 hours), non-recording sessions (enable Recordings), and events not firing due to typos. All errors are easily diagnosed via browser console and Hotjar dashboard.
What Our Integration Service Includes
| Step | What We Do | Timeline |
|---|---|---|
| Counter installation | Place code on all pages via GTM or directly | 30 minutes |
| User identification | Pass user attributes (email, plan, registration date) | 2-3 hours |
| Event setup | Tag key actions (form, cart, error) | 1-2 hours |
| Data masking | Configure hiding of sensitive fields | 1 hour |
| Testing | Verify recordings and heatmaps | 1 hour |
| Documentation | Provide setup description and instructions | included |
Timelines and Cost
Counter installation: 30 minutes. Full cycle (identification, events, masking, tests): 2 to 5 days. Cost is determined individually. Request a free estimate—we’ll analyze your site and propose an optimal plan.
Optimize your site based on Hotjar data. Our engineers help you get the most from heatmaps and session recordings; contact us for a consultation on Hotjar integration.
Feature information sourced from official documentation: Hotjar Help Center







