Query click map

このページはまだあなたの言語に翻訳されていません。 現在取り組んでいますので、後でもう一度確認してください。

Returns click counts for one page URL, grouped by the CSS selector of the
clicked element or by page coordinate, ranked by count. Filter by device
viewport band and date range. Results reflect the authenticated caller's
project access and data access controls.

This POST computes a result and does not mutate state. It is therefore a
read operation and does not require an Idempotency-Key.

Omitting time_range uses the last 30 days in the project timezone. The
span of time_range cannot exceed 90 days.

post/v1/projects/{project_id}/heatmaps/click-map

Authorizations

Authorizationstringrequired

http

Path parameters

project_idstringrequired

Amplitude project identifier, backed by the canonical app ID.

Example:12345
Constraints:pattern: ^[0-9]+$

Body

application/json
page_urlstringrequired

Page URL to analyze. Accepts http and https URLs; a URL without a scheme is treated as https. The query string and fragment are removed before matching, so https://example.com/pricing?utm=x and https://example.com/pricing are the same page.

Example:https://example.com/pricing
Constraints:min length: 1max length: 2048
url_matchstring

How page_url is matched against the page URL recorded on each event. is matches the exact URL, contains matches any URL containing it, has_prefix matches URLs starting with it, and glob treats * as a wildcard.

Allowed values:iscontainshas_prefixglob
Default:is
device_typestring

Viewport band to include, matching the device selector in the product: desktop is at least 1440 px wide, laptop is 900 to 1440 px, tablet is 500 to 900 px, mobile is at most 500 px. Use custom with viewport_width to match one exact width.

Allowed values:desktoplaptoptabletmobilecustom
Default:desktop
viewport_widthinteger

Exact viewport width in pixels. Required when device_type is custom and not accepted otherwise.

Constraints:min: 1max: 20000
time_rangeobject
Show child attributes
startstringrequired

Inclusive start date (project timezone unless timezone is set on query).

Constraints:format: date
endstringrequired

Inclusive end date.

Constraints:format: date
group_bystring

selector groups clicks by the CSS selector of the clicked element; pixel groups them by page coordinate.

Allowed values:selectorpixel
Default:selector
metricstring

totals counts every click; uniques counts distinct users who clicked.

Allowed values:totalsuniques
Default:totals
limitinteger

Maximum number of rows returned after ranking by count.

Default:50
Constraints:min: 1max: 200

Response

application/json
200· Click map computed successfully.
dataobjectrequired

Ranked click counts for one page. Exactly one of selectors and pixels is populated, chosen by group_by; the other is null. Rows are sorted by count descending. Results reflect the caller's data access.

Show child attributes
idstringrequired

Identifier for this computation.

objectstringrequired

Resource-type discriminator. Always click_map.

project_idstringrequired
Constraints:pattern: ^[0-9]+$
page_urlstringrequired

The page URL after normalization.

url_matchstringrequired

How page_url is matched against the page URL recorded on each event. is matches the exact URL, contains matches any URL containing it, has_prefix matches URLs starting with it, and glob treats * as a wildcard.

Allowed values:iscontainshas_prefixglob
Default:is
device_typestringrequired

Viewport band to include, matching the device selector in the product: desktop is at least 1440 px wide, laptop is 900 to 1440 px, tablet is 500 to 900 px, mobile is at most 500 px. Use custom with viewport_width to match one exact width.

Allowed values:desktoplaptoptabletmobilecustom
Default:desktop
viewport_widthintegerrequired

Exact viewport width used when device_type is custom; otherwise null.

Constraints:nullable
group_bystringrequired
Allowed values:selectorpixel
metricstringrequired
Allowed values:totalsuniques
time_rangeobjectrequired
startstringrequired

Inclusive start date (project timezone unless timezone is set on query).

Constraints:format: date
endstringrequired

Inclusive end date.

Constraints:format: date
timezonestringrequired

IANA timezone used to resolve time_range day boundaries (the project timezone).

result_countintegerrequired

Number of rows returned.

Constraints:min: 0
truncatedbooleanrequired

true when more rows were available than limit allowed. The underlying query is itself bounded, so false does not guarantee that every clicked element on the page is listed.

selectorsobject[]required
Constraints:nullable
pixelsobject[]required
Constraints:nullable
warningsstring[]required

Non-fatal conditions, such as an empty result for the range.

これは役に立ちましたか?

For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.