Get campaign journey metrics
Returns a list of Journey Metrics for your campaign. These metrics show how many people triggered your campaign, were messaged, etc for the time period and "resolution" you set. You must provide the start, end, and resolution parameters or your request will return 400.
Metrics in the response are arrays, and each index in the array corresponds to the resolution in your request. If you request metrics in days, the first result in each metric array is the first day of results and each successive increment represents another day.
Each increment represents the number of journeys that started within a time period and eventually achieved a particular metric. For example, array index 0 for the converted metric represents the number of journeys that started on the first day/month of results that achieved a conversion.
- Type: integercampaign
_id requiredThe ID of the campaign that you want to trigger or return information about.
- Type: integerFormat: unix timestampstartrequired
The unix timestamp for the beginning of your journey metrics report.
- Type: integerFormat: unix timestampendrequired
The unix timestamp for the end of your journey metrics report.
- Type: stringenumresolutionrequired
Determines the increment for journey metrics—hourly, daily, weekly, or monthly.
values- hours
- hourly
- days
- daily
- weeks
- weekly
- months
- monthly
- application/json
- 400
You may have omitted query parameters or the
starttime occurred after theendtime. ThecampaignIDoractionIDmay also be invalid. - 404
The campaign and/or action do not exist.
- 429
Your request is over the 10-per-second limit.
curl 'https://api.customer.io/v1/campaigns/3/journey_metrics?start=1652718066&end=1&resolution=hours' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"journey_metric": {
"started": [
1
],
"activated": [
1
],
"exited_early": [
1
],
"finished": [
1
],
"converted": [
1
],
"never_activated": [
1
],
"messaged": [
1
]
}
}Each journey_metric item in the response is an array. Each item in a metric array represents the number of journeys that started within the time increment ("resolution"—day or month) and eventually achieved that metric.