Get a click heatmap for a page
umami_get_click_heatmapBuild a click-density heatmap for any page path by extracting click coordinates from session replays. Use it to reveal where users click, identify UI engagement patterns, and spot misclicks or dead zones.
Instructions
Get a click-density heatmap for one page path, built from recorded session replays.
Umami has no dedicated heatmap endpoint. Click coordinates are captured inside session replay recordings, so this filters replays to the given path, downloads them (capped by max_replays), extracts every click's (x, y) position, normalizes it against that recording's viewport size, and buckets it into a grid.
Args:
website (string, optional): Website ID, name, or domain.
path (string, required): Exact page path to build the heatmap for, e.g. '/pricing'.
range (string): Date range, default '30d' (replay volume is usually much lower than pageview volume).
start_date / end_date (string, optional): Explicit bounds, overriding 'range'.
grid_size (number): Buckets per axis, default 10 (a 10x10 grid), max 20.
max_replays (number): Cap on replays downloaded, default 100, max 300.
response_format ('markdown' | 'json'): Output format (default: 'markdown').
Returns: JSON shape: { "path": string, "sample_replays": number, "replays_with_clicks": number, "total_clicks": number, "grid_size": number, "cells": [ { "row": number, "col": number, "x_pct_range": [number, number], "y_pct_range": [number, number], "clicks": number } ] }
Error handling:
Zero clicks usually means recording is off for this page's traffic, sampling missed it, or no one has clicked yet; check umami_list_replays for that path first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Exact page path, e.g. '/pricing'. | |
| range | No | Date range, default '30d'. | |
| website | No | Website ID (UUID), name, or domain. Optional if UMAMI_DEFAULT_WEBSITE is set. Use umami_list_websites to discover values. | |
| end_date | No | Explicit end date (YYYY-MM-DD, ISO 8601 timestamp, or epoch ms). Overrides 'range'. | |
| grid_size | No | Buckets per axis. | |
| start_date | No | Explicit start date (YYYY-MM-DD, ISO 8601 timestamp, or epoch ms). Overrides 'range'. | |
| max_replays | No | Cap on replays downloaded. | |
| response_format | No | Output format: 'markdown' for a readable summary, 'json' for raw structured data. | markdown |