A heatmap shows where people interact with a page, using color to mark the areas that get the most and least attention. Mixpanel’s Heatmaps sit on top of its Session Replay data, so you can go from “this button gets almost no clicks” straight to watching recordings of people who visited that page.
This guide covers what Mixpanel Heatmaps are, the requirements, how to enable them in code and in GTM, how to read them, and the limits to know.
What Mixpanel Heatmaps are
In general, heatmaps can show where users click, how far they scroll, and which areas they ignore. Mixpanel’s Heatmaps for Web are powered by Session Replay data and capture click interactions. Mixpanel offers two views:
- Heatmap (traditional): a color overlay showing click density across the page.
- Click map: highlights the exact elements people clicked, with counts.
Mixpanel recommends click maps for precision and traditional heatmaps for broad patterns. Click maps are especially useful on dynamic pages with modals, dropdowns or changing layouts, where a color overlay can land in the wrong place.
Mixpanel’s docs describe Heatmaps as web only (not mobile) and part of the Session Replay offering. Check the docs for current plan availability, as the feature has been labeled beta.
Requirements
- The Mixpanel JavaScript SDK installed directly on your site (post 21). Mixpanel’s community answers note that routing data through Segment alone doesn’t capture the replay and heatmap data; the SDK must run on the page.
- Session Replay enabled with
record_sessions_percentgreater than 0 (post 12). - Either
record_heatmap_data: true, or Autocapture with click tracking on (post 24).
Heatmaps only collect data during sessions that are being recorded. If you record 1% of sessions, your heatmap is built from that 1%.
Option A: Enable with record_heatmap_data
mixpanel.init('YOUR_PROJECT_TOKEN', {
record_sessions_percent: 10, // Session Replay must be on
record_heatmap_data: true // Heatmap click collection
});
According to Mixpanel’s docs, this option captures clicks during recorded sessions and sends them as $mp_click events. Mixpanel’s documentation updates also describe it as collecting rage clicks and dead clicks. These events don’t count against your plan’s data allowance.
If you use TypeScript and get a type error saying record_heatmap_data doesn’t exist on the config type, update mixpanel-browser and its type definitions; older versions don’t include the option.
Option B: Use Autocapture clicks
If you already use Autocapture with click: true, those clicks can populate Heatmaps too:
mixpanel.init('YOUR_PROJECT_TOKEN', {
autocapture: {
pageview: 'full-url',
click: true,
scroll: true,
submit: true,
capture_text_content: false
},
record_sessions_percent: 10
});
The difference: Autocapture clicks are billable events, while record_heatmap_data clicks aren’t. If you only want clicks for heatmaps, Option A is cheaper. If you want clicks for analysis in Insights and Funnels too, Autocapture gives you both.
Option C: Enable through Google Tag Manager
Mixpanel’s GTM template supports custom initialization options (post 22). In the Mixpanel init tag:
- Set Initialization to set options manually.
- Add
record_sessions_percentwith your sampling rate. - Add
record_heatmap_datawith the valuetrue. - Publish after testing in Preview.
Choosing a sampling rate
Heatmaps are only as good as the number of recorded sessions behind them. As a rule of thumb:
- High-traffic sites: a low percentage (1-10%) already yields thousands of sessions per week.
- Low-traffic sites or key pages: a higher rate, or targeted recording with
mixpanel.start_session_recording()on the pages you want to study.
Balance this against your Session Replay quota.
Privacy
Heatmaps inherit Session Replay’s privacy controls: masking and blocking configured for replay also apply here. Review masking settings before enabling, and follow Mixpanel’s advice to check your privacy notice before rolling out replay-based features.
How to view a heatmap
- In Mixpanel, open Heatmaps (from the Home page or the Session Replay area).
- Enter the URL of the page you want. Use wildcards to group pages with the same template, such as all product pages (
/products/*). - Choose the date range and any filters (device type, country, cohort).
- Toggle between Heatmap and Click Map views.
- Click an element to see the clicks, the users who clicked, and links to their session replays.
What to look for
- Clicks on non-clickable elements: images, headings or icons people expect to be links.
- Low engagement on primary CTAs: your main button gets fewer clicks than secondary links.
- Rage and dead clicks: repeated clicks or clicks with no response, often broken buttons or slow loads.
- Navigation patterns: which menu items get used and which get ignored.
- Differences by device: filter to mobile and desktop separately, since layouts differ.
Then use Session Replay to watch a few sessions and understand the “why”, and confirm the pattern at scale with events in Insights or Funnels.
Verifying your setup
- Use the Mixpanel Data Inspector extension or debug mode to confirm
$mp_click(or Autocapture click) events fire while a recording is active. - Force a recording on yourself with
mixpanel.start_session_recording()while testing, so you don’t depend on sampling. - Open the Heatmap for your test page and check your clicks appear.
Limitations
- Web only. Mobile apps aren’t supported.
- Recorded sessions only. No replay, no heatmap data.
- Clicks, not hover. Mixpanel’s heatmap is currently a click map; scroll depth comes from Autocapture scroll events in reports rather than a scroll heatmap.
- Dynamic pages can make traditional heatmaps imprecise; use the click map.
Summary
To use Mixpanel Heatmaps, install the JavaScript SDK, turn on Session Replay, and either set record_heatmap_data: true (free clicks during recordings) or use Autocapture clicks (billable, but usable in other reports). Then open Heatmaps, pick a URL or wildcard, and move between the heatmap, click map and replays to find friction.
Sources
- Mixpanel: Heatmaps for Web
- Mixpanel: Using Heatmaps and Session Replay together
- Mixpanel docs on GitHub: record_heatmap_data details
- Mixpanel blog: What is a heatmap?
- Microsoft Clarity: Click maps (general reference on click map types)
