Skip to main content
Version: 26.01

Heatmaps - Metrics Read

Endpoint​

/o/heatmaps/metrics

Overview​

Returns the total number of clicks (t) and the total scrolling value (scr) recorded by heatmaps in an app for a period.

Authentication​

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

Permissions​

Requires heatmaps Read permission.

Request Parameters​

ParameterTypeRequiredDescription
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.
app_idStringYesApp id.
periodStringNoPeriod to read, for example 30days, 7days or a JSON array of two timestamps. Defaults to 30days.
segmentStringNoView segment name. Defaults to no segment.
segmentValStringNoValue of the view segment.

Examples​

Read the metrics of an app​

/o/heatmaps/metrics?api_key=YOUR_API_KEY&app_id=6991c75b024cb89cdc04efd2&period=30days

Response​

Success Response​

{
"_id": null,
"t": 120,
"scr": 45
}

Response Fields​

FieldTypeDescription
_idNullAlways null.
tNumberSum of the t values for the period.
scrNumberSum of the scr values for the period.

Behavior​

  • When there is no data for the period, t and scr are 0.