You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Heatmaps, Rage Clicks, and Dead Clicks (Web Only)
176
176
177
-
To supplement your Session Replay data, enable [Heatmaps](/docs/session-replay/heatmaps) data collection. The current Heatmap functions as a click map, tracking user interactions with individual site elements.
177
+
The `record_heatmap_data` option (Web only; not available on mobile) enables three types of interaction tracking during replay sessions:
178
178
179
-
Enable Heatmap data collection by setting `record_heatmap_data` to `true` during library initialization.
179
+
1.**Click events** - Captures user clicks to populate click heatmaps
180
+
2.**Rage clicks** - Captures multiple rapid clicks on the same element (`$mp_rage_click`)
181
+
3.**Dead clicks** - Captures clicks on unresponsive elements (`$mp_dead_click`)
180
182
181
-
Ensure Session Replay is enabled, as Heatmaps only collect data during sessions with recorded replays. If a page has limited replay coverage, the resulting Heatmap may provide limited or less meaningful insights.
183
+
These events are only captured when a session recording is in progress, and they are exempt from your plan data allowance.
182
184
183
-
Clicks recorded using `record_heatmap_data`will only capture clicks while an a session recording is in progress. These clicks are sent as `$mp_click` and will not be counted against your plan data allowance.
185
+
**Important:** Session Replay must be enabled for `record_heatmap_data`to work. Heatmaps only collect data during sessions with recorded replays. If a page has limited replay coverage, the resulting Heatmap may provide limited or less meaningful insights.
184
186
185
187
**Example Usage**
186
188
187
189
```javascript Javascript
188
190
mixpanel.init('YOUR_PROJECT_TOKEN', {
189
191
record_sessions_percent:1, // Session Replay must be enabled for Heatmap
190
-
record_heatmap_data:true// Enable Heatmap data collection
192
+
record_heatmap_data:true// Enable Heatmap, Rage Click, and Dead Click collection
191
193
});
192
194
```
193
195
194
-
If you use [Autocapture](/docs/tracking-methods/autocapture) to track clicks, you can leverage these clicks to populate the Heatmaps without setting the `record_heatmap_data` option during library initialization.
196
+
<Callouttype="info">
197
+
Events generated by `record_heatmap_data` (clicks, rage clicks, dead clicks) are exempt from your plan data allowance.
198
+
</Callout>
195
199
196
-
Clicks captured by Autocapture are billable events that are counted against your plan data allowance.
200
+
### Alternative: Using Autocapture for Heatmaps
201
+
202
+
If you use [Autocapture](/docs/tracking-methods/autocapture) to track clicks, you can leverage these clicks to populate Heatmaps without enabling `record_heatmap_data`. Autocapture also supports rage and dead click detection.
Clicks generated by `record_heatmap_data` are exempt from your plan data allowance. Clicks generated by [Autocapture](/docs/tracking-methods/autocapture) are billable events.
216
-
</Callout>
220
+
Clicks captured by Autocapture are billable events that are counted against your plan data allowance.
0 commit comments