heatmaps

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-heatmaps"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/91572aed-cba5-4511-ab05-efc511525882/social-card.svg?v=3e7ae33eec8b" alt="heatmaps" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/compareScope insight:read

Parameters

project_idstringpathrequired
urlstringqueryrequired
astringqueryrequired
base day
bstringqueryrequired
day compared to it
viewportstringquery
compare one viewport bucket

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/compare?url=<url>&a=<a>&b=<b>"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "a": {
    "clicks": 0,
    "day": "string",
    "sessions": 0
  },
  "b": {
    "clicks": 0,
    "day": "string",
    "sessions": 0
  },
  "bins": [
    {
      "count_a": 0,
      "count_b": 0,
      "delta": 0,
      "share_a": 0,
      "share_b": 0,
      "share_delta": 0,
      "x": 0,
      "y": 0
    }
  ],
  "scroll": [
    {
      "depth_pct": 0,
      "rate_a": 0,
      "rate_b": 0,
      "sessions_a": 0,
      "sessions_b": 0
    }
  ],
  "url": "string",
  "x_bins": 0,
  "y_bin_px": 0
}
Schema
aobjectrequired
Show child parameters
clicksintegerrequired
daystringrequired
sessionsintegerrequired
bobjectrequired
Show child parameters
clicksintegerrequired
daystringrequired
sessionsintegerrequired
binsBinDelta[]required
Bins with clicks on either day, largest absolute share change first.
Show child parameters
count_aintegerrequired
count_bintegerrequired
deltaintegerrequired
count_b - count_a.
share_anumberrequired
Share of the day's clicks, so busier days do not drown the comparison.
share_bnumberrequired
share_deltanumberrequired
share_b - share_a.
xintegerrequired
yintegerrequired
scrollReachDelta[]required
Show child parameters
depth_pctintegerrequired
rate_anumber
Share of the day's scrolling sessions that reached this depth.
rate_bnumber
sessions_aintegerrequired
sessions_bintegerrequired
urlstringrequired
x_binsintegerrequired
y_bin_pxintegerrequired
400 The snapshots use different bin sizes
404 No snapshot for one of the days
GEThttps://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/pagesScope insight:read

Parameters

project_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/pages"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 At most 50, so one page with no cursor
Example
{
  "data": [
    {
      "auto": true,
      "created_at": "2024-01-01T00:00:00Z",
      "id": "string",
      "url": "string",
      "x_bins": 0,
      "y_bin_px": 0
    }
  ],
  "next_cursor": "string"
}
Schema
dataobject[]required
Show child parameters
autobooleanrequired
Registered by the busiest-pages option rather than by a person.
created_atstringrequired
idstringrequired
urlstringrequired
x_binsintegerrequired
y_bin_pxintegerrequired
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/pagesScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
urlstringrequired
Page path or URL; stored normalized like the heatmap points.
x_binsinteger
Columns across the page width (1 to 200, default 50).
y_bin_pxinteger
Pixels per row (1 to 1000, default 20).
{
  "url": "string",
  "x_bins": 0,
  "y_bin_px": 0
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/pages" \
  -H "Content-Type: application/json" \
  -d '{"url":"string","x_bins":0,"y_bin_px":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Snapshots start with the next completed UTC day (and backfill the last 7 days still held)
Example
{
  "auto": true,
  "created_at": "2024-01-01T00:00:00Z",
  "id": "string",
  "url": "string",
  "x_bins": 0,
  "y_bin_px": 0
}
Schema
autobooleanrequired
Registered by the busiest-pages option rather than by a person.
created_atstringrequired
idstringrequired
urlstringrequired
x_binsintegerrequired
y_bin_pxintegerrequired
400
403
404
409 Already registered
DELETEhttps://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/pages/{id}Scope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/pages/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204 Stops new snapshots; stored ones stay
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/settingsScope insight:read

Parameters

project_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/settings"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "auto_top_n": 0,
  "refold_days": 0,
  "viewports": [
    "string"
  ]
}
Schema
auto_top_nintegerrequired
Register the this-many busiest pages by clicks over the last 7 days (0 to 50; 0 = off).
refold_daysintegerrequired
The newest this many days are recomputed on every run so late events are folded in (0 to 7).
viewportsstring[]required
Viewport buckets that also get their own bins (data.viewports.<bucket>), at most 5.
404
PUThttps://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/settingsScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
auto_top_ninteger
Register this many busiest pages automatically (0 to 50; 0 = off).
refold_daysinteger
Recompute and replace the newest this many days on every run (0 to 7).
viewportsstring[]
Viewport buckets (as the SDK reports viewport_bucket) that also get their own bins, at most 5.
{
  "auto_top_n": 0,
  "refold_days": 0,
  "viewports": [
    "string"
  ]
}

Code samples

cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/settings" \
  -H "Content-Type: application/json" \
  -d '{"auto_top_n":0,"refold_days":0,"viewports":["string"]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Used from the next snapshot run

Same as 200 · GET /v1/projects/{project_id}/heatmaps/snapshots/settings

400
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/{day}Scope insight:read

Parameters

project_idstringpathrequired
daystringpathrequired
urlstringqueryrequired
viewportstringquery
one viewport bucket's bins (when the project stores it)

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/heatmaps/snapshots/{day}?url=<url>"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "clicks": 0,
  "created_at": "2024-01-01T00:00:00Z",
  "day": "string",
  "sessions": 0,
  "url": "string",
  "x_bins": 0,
  "y_bin_px": 0,
  "data": {}
}
Schema
clicksintegerrequired
created_atstringrequired
daystringrequired
UTC day the snapshot covers.
sessionsintegerrequired
Sessions that clicked.
urlstringrequired
x_binsintegerrequired
y_bin_pxintegerrequired
dataobjectrequired
{bins: [[x, y, count, sessions]], scroll: {sessions, reach: [sessions reaching 10..100 %]}}.
400
404
GEThttps://lucidace.com/v1/projects/{project_id}/heatmaps/zonesScope insight:read

Parameters

project_idstringpathrequired
urlstringquery
limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/heatmaps/zones"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "data": [
    {
      "created_at": "2024-01-01T00:00:00Z",
      "created_by": "string",
      "id": "string",
      "name": "string",
      "updated_at": "2024-01-01T00:00:00Z",
      "url": "string",
      "x0": 0,
      "x1": 0,
      "y0": 0,
      "y1": 0
    }
  ],
  "next_cursor": "string"
}
Schema
dataobject[]required
Show child parameters
created_atstringrequired
created_bystring
idstringrequired
namestringrequired
updated_atstringrequired
urlstringrequired
Normalized page path the zone belongs to.
x0numberrequired
Left edge as a ratio of the page width.
x1numberrequired
y0integerrequired
Top and bottom edge in document pixels.
y1integerrequired
next_cursorstring
400
404

Updated