viakite
Dashboard

API/Reports/A page's click heatmap

A page's click heatmap

GET/v1/projects/{project}/analytics/heatmaps/clicks

The clicks on one page for one device width (desktop when not given), counted in a grid: columns columns across the page's width (a click's x is a share of the width) and rows of row_height pixels from the top, max_rows rows at most (clicks further down are left out). Only cells with clicks are listed. With the page's clicks, page views, median height in pixels, and its 20 most clicked elements by CSS selector.

Secret keyNeeds analytics.viewus.api.vk.viabio.me

Path parameters

projectstringrequired
The project's id (prj_…).

Query parameters

pagestringrequiredup to 2000 chars
The page's path, such as /pricing.
devicestring
The device width the clicks were made at, from the viewport (mobile under 768 px, tablet under 1,024, desktop from there).
desktoptabletmobile
presetstring
todayyesterday7d30d90dthis_monthlast_monththis_yearall
fromstring
A date (2026-11-01) or an RFC 3339 time.
tostring
A date (included) or an RFC 3339 time (excluded).

Responses

The click heatmap.

pagestringrequired
devicestringrequired
desktoptabletmobile
clicksintegerrequired
viewsintegerrequired
page_heightintegerrequired
The page's median height in pixels; 0 when unknown.
columnsintegerrequired
row_heightintegerrequired
A row's height in pixels.
max_rowsintegerrequired
cellsHeatmapCell[]required
Show 3 fields
colintegerrequired
From 0 (left) to columns − 1.
rowintegerrequired
From 0 (top); the row starts at row × row_height pixels.
clicksintegerrequired
elementsHeatmapElement[]required
Show 2 fields
selectorstringrequired
The clicked element as a short CSS selector.
clicksintegerrequired
date_rangeobjectrequired
A resolved range [from, to) in UTC.
Show 2 fields
fromstring · date-timerequired
A time in UTC, ISO 8601.
tostring · date-timerequired
A time in UTC, ISO 8601.
Example response
1{
2 "page": "/pricing",
3 "device": "desktop",
4 "clicks": 1,
5 "views": 1,
6 "page_height": 1,
7 "columns": 1,
8 "row_height": 1,
9 "max_rows": 1,
10 "cells": [
11 {
12 "col": 1,
13 "row": 1,
14 "clicks": 1
15 }
16 ],
17 "elements": [
18 {
19 "selector": "string",
20 "clicks": 1
21 }
22 ],
23 "date_range": {
24 "from": "2026-11-21T09:30:00Z",
25 "to": "2026-11-21T09:30:00Z"
26 }
27}

Errors

Every error has the same shape: error.code, a message for people and details.

StatusCode
422validation_error
503clickhouse_not_configured