Campaign call for stats doesen't return all possible metric

ads
analytics

#1

Concerning Campaign Analytics GET stats/accounts/:account_id/campaigns/:id

From the docs:
metrics
A comma-separated list of the specific metrics to return in this request. Defaults to all possible metrics associated with the data type. Valid options for this field include can be found in our Metrics and Segmentation in Analytics docs.

When I do the call, ie

.../campaigns/3uore?start_time=2015-12-22T00:00:00+00:00&granularity=TOTAL&segmentation_type=PLATFORMS

It doesn’t return all possible metrics used in the campaign. For example, above returns various metrics, but not the promoted_video_total_views - even if I know there are entries for that one.

I was assuming from the Defaults to all possible metrics associated with the data type refers to all data available in the stats for the campaign, but that appears not to be true?

Instead, I must explicitly ask for it …?metric=promoted_video_total_views


#2

Hi @Nennad! Take a look at Video Metrics not being delivered within stats, and at the comment below that:

A Twitter Staff person said:

We do not provide a list of default metrics. That decision because we want to encourage developers to fetch the metrics that are useful to them, not just a generic long list of metrics.


#3

Hi @majoritasdev, I suspected that it is that way, pitty that there is no more options (get by objective type, etc). It seems that we need to do some metrics mapping before call to get desired result. That metrics doc page is annoying, though. Thanks!


#4

Indeed, @Nennad, some metrics mapping is required ( https://dev.twitter.com/ads/analytics/metrics-derived ), that’s what I did too. You’re welcome! :slightly_smiling: