Skip to main content
Version: 25.03

Heatmaps - Metrics

Enterprise

This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.

Endpoint​

/o/heatmaps/metrics

Overview​

Returns the total visits and the total scroll value of all views of an app in the selected period.

Authentication​

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

Permissions​

Requires Read permission on the heatmaps feature.

Request Parameters​

ParameterTypeRequiredDescription
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.
app_idStringYesApp ID.
periodStringNoStandard Countly period value, for example 30days.
segmentStringNoSegment key to read segmented view data.
segmentValStringNoSegment value for segment.

Examples​

Read totals for 30 days​

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

Response​

Success Response​

{
"_id": null,
"t": 15200,
"scr": 620
}

Response Fields​

FieldTypeDescription
_idNullAlways null.
tNumberTotal visits of all views in the period.
scrNumberTotal scroll value of all views in the period.

When there is no data, t and scr are 0.

Error Responses​

  • 400
{
"result": "Missing parameter \"api_key\" or \"auth_token\""
}
  • 401
{
"result": "User does not have right"
}

Behavior​

  • Read-only. Nothing is modified.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.membersAuthentication and permission checkReads the member and permissions.
countly.app_viewdata{sha1(segment+appId)}View metricsSums visit and scroll values.