Heatmaps Setup for User Behavior Analysis
Heatmaps visualize click zones, mouse movements, and scroll depth across pages. Unlike numeric metrics, heatmaps instantly show where users focus and where attention drops.
Types of Heatmaps
Click maps—record every click. Show whether users click on decorative elements mistaken for buttons ("rage clicks").
Scroll maps—display the percentage of users who scroll to each point on a page. If 70% leave before the CTA button, content above it needs trimming.
Move maps—track cursor movement as a proxy for eye gaze (desktop). Less accurate but don't require eye-tracking equipment.
Tools
| Tool | Features |
|---|---|
| Hotjar | Click/scroll/move + surveys, session recordings |
| Microsoft Clarity | Free, unlimited, GA4 integration |
| Mouseflow | 6 map types + funnels |
| Crazy Egg | Built-in A/B tests |
Microsoft Clarity—optimal choice for most projects: free, doesn't slow your site (async loading), integrates into Google Analytics 4 with one click.
Clarity Installation
<script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "PROJECT_ID");
</script>
Via GTM this takes 5 minutes without deployment.
Heatmap Segmentation
Viewing aggregate maps across all users is a rough mistake. Segment by:
- New users vs. returning
- Mobile vs. desktop (different layouts = different maps)
- Traffic source (ads, organic, email)
- A/B test variant
Practical Example
An e-commerce store notices 60% of mobile clicks on a product card go to the image, not the "Buy" button. Solution: move the button higher, under the image, and add a sticky bar at screen bottom. Mobile conversion increases 12–18%.
Timeline
Setup and basic configuration—1 day. Segment/filter configuration and initial map analysis with recommendations—2–3 days.







