Skip to main content
Version: 26.01

Journey Engine - Stats Content

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/journey-engine/stats/content

Overview​

Return interaction stats for each in-app content block used in a journey: how many times it was shown, how many times users interacted with it, and the clicks per button.

Authentication​

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

Permissions​

  • Required permission: Read on the journey_engine feature

Request Parameters​

  • app_id (required for non-global-admin users): App ID
  • journeyDefinitionId (required): Journey definition ID, a 24-character hexadecimal string
  • journeyVersionId (optional): Filter by journey version
  • period (optional): Time period (e.g., "7days", "30days"). Use "0days" or omit for all-time

Examples​

GET /o/journey-engine/stats/content?app_id=6991c75b024cb89cdc04efd2&journeyDefinitionId=67164f4a1f1bd90d6354430a&period=30days

Response​

Success Response​

{
"content": [
{
"contentId": "67164f4a1f1bd90d6354430c",
"contentName": "Welcome message",
"shown": 900,
"interacted": 320,
"buttons": [
{ "id": "Get started", "clicks": 250 },
{ "id": "Later", "clicks": 70 }
]
}
]
}

Response Fields​

FieldTypeDescription
contentArrayOne entry per content block, most shown first.
content[].contentIdStringContent block ID.
content[].contentNameStringContent block title. Empty when not found.
content[].shownNumberNumber of times the content was shown.
content[].interactedNumberNumber of interactions.
content[].buttonsArrayClicks per button, sorted by button identifier.
content[].buttons[].idStringButton label, or its identifier when it has no label.
content[].buttons[].clicksNumberNumber of clicks.

Error Responses​

  • HTTP 400
{
"result": "Error: Missing journeyDefinitionId"
}
  • HTTP 400
{
"result": "Error: Invalid journeyDefinitionId"
}
  • HTTP 403
{
"result": "Error: Journey does not belong to this app"
}
  • HTTP 500
{
"result": "Error: Failed to retrieve content stats"
}

Behavior​

  • The journey must belong to the given app.
  • Daily stats are added up into one entry per content block.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.journey_definitionOwnership checkReads the journey to confirm it belongs to the app.
countly.journey_content_statsEndpoint data sourceReads daily content stats.
countly.content_blocksContent titlesReads content block titles.