HeatmapsClick cells for one page

Click cells for one page

Interaction counts per grid cell, hottest first. Cells are quantized server-side: x_precision decimals of relative x (default 2, i.e. 1% columns) and y_bucket pixels vertically (default 10). The response echoes both so a renderer knows the grid it received.

truncated: true means the page has more distinct cells than limit — the coldest cells were dropped, never the hotspots.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/data/heatmap?location_id=example_string&url=acme.com%2Fpricing&type=click&date_from=2024-12-25T10%3A00%3A00Z&date_to=2024-12-25T10%3A00%3A00Z&viewport_min=1200&viewport_max=20000&x_precision=2&y_bucket=10&device_type=mobile&utm_source=facebook&utm_medium=cpc&utm_campaign=example_string&country=USA&segment_id=example_string&limit=20000" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": {
    "page": "acme.com/pricing",
    "type": "click",
    "total_clicks": 4821,
    "x_precision": 2,
    "y_bucket": 10,
    "truncated": false,
    "points": [
      {
        "x_rel": 0.5,
        "y_px": 940,
        "target_fixed": 42,
        "clicks": 42,
        "visitors": 31
      }
    ]
  }
}
GET
/client/v1/data/heatmap
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need heatmaps:read. See Using an mcp_ key over HTTP.

Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need heatmaps:read. See Using an mcp_ key over HTTP.
query
location_idstring

Required with an agency key (ak_); ignored with a location key (sk_). Can also be sent as the X-Location-Id header.

query
urlstring
Required

Full URL or bare host/path. Normalized the same way the SDK normalized it on capture: scheme, www., query string, hash and trailing slash removed, lowercased. https://www.acme.com/Pricing?utm_source=meta and acme.com/pricing are the same page.

query
typestring

Point type. Only click is captured today.

Options: click
query
date_fromstring

ISO 8601 or YYYY-MM-DD. Defaults to 30 days ago.

Format: date-time
query
date_tostring
Format: date-time
query
viewport_mininteger

Narrow to a viewport-width window, in px. This is the precision-versus-volume trade-off: one window per breakpoint (e.g. 0–767, 768–1199, 1200+) gives positions that are true for that layout, while the default all-widths view mixes layouts.

query
x_precisioninteger

Decimal places of relative x. 2 = 1% columns, 3 = 0.1%.

query
y_bucketinteger

Vertical bucket size in px.

query
device_typestring

Session device — mobile, desktop, tablet. Resolved against the same session data /data/sessions reports, so the two agree.

query
utm_sourcestring

Session source. Includes the referrer fallback: an untagged but referred session reads as google.com, not blank.

query
segment_idstring

Stored segment. Scopes to sessions whose visitor is a member; membership resolves through the identity graph, so a person-level segment catches rows captured under any identity they used.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Agency key (ak_) or location secret key (sk_). Scoped keys (mcp_) are accepted too and need heatmaps:read. See Using an mcp_ key over HTTP.

Query Parameters

location_idstring

Required with an agency key (ak_); ignored with a location key (sk_). Can also be sent as the X-Location-Id header.

urlstring
Required

Full URL or bare host/path. Normalized the same way the SDK normalized it on capture: scheme, www., query string, hash and trailing slash removed, lowercased. https://www.acme.com/Pricing?utm_source=meta and acme.com/pricing are the same page.

Example:
acme.com/pricing
typestring

Point type. Only click is captured today.

Allowed values:click
date_fromstring

ISO 8601 or YYYY-MM-DD. Defaults to 30 days ago.

viewport_mininteger

Narrow to a viewport-width window, in px. This is the precision-versus-volume trade-off: one window per breakpoint (e.g. 0–767, 768–1199, 1200+) gives positions that are true for that layout, while the default all-widths view mixes layouts.

Example:
1200
viewport_maxinteger
Example:
20000
x_precisioninteger

Decimal places of relative x. 2 = 1% columns, 3 = 0.1%.

y_bucketinteger

Vertical bucket size in px.

device_typestring

Session device — mobile, desktop, tablet. Resolved against the same session data /data/sessions reports, so the two agree.

Example:
mobile
utm_sourcestring

Session source. Includes the referrer fallback: an untagged but referred session reads as google.com, not blank.

Example:
facebook
utm_mediumstring
Example:
cpc
segment_idstring

Stored segment. Scopes to sessions whose visitor is a member; membership resolves through the identity graph, so a person-level segment catches rows captured under any identity they used.

Responses

successboolean
dataobject