Skip to main content
Version: 24.05

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 totals of the view count and scroll value over all views of an app in the 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 for the Heatmaps feature (heatmaps) in the target app.

Request Parameters​

ParameterTypeRequiredDescription
api_keyStringYes (or auth_token)API key authentication
auth_tokenStringYes (or api_key)Auth token authentication
app_idStringYesID of the app.
periodStringNoPeriod of the data, for example 30days or a date range.
segmentStringNoView segment to read the data for.
segmentValStringNoValue of segment.

Examples​

Example: Read the totals​

curl "https://your-server.com/o/heatmaps/metrics?api_key=YOUR_API_KEY&app_id=YOUR_APP_ID&period=30days"

Response​

Success Response​

{
"_id": null,
"t": 1200,
"scr": 550
}

Response Fields​

FieldTypeDescription
_idNullAlways null.
tNumberTotal view count.
scrNumberTotal scroll value.

Behavior​

  • When there is no data in the period, t and scr are 0.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.app_viewdata{sha1(segment+appId)}Aggregated view metricsSums the view counts and scroll values.