No stats data for promoted_tweet entity using v1 analytics api

analytics
api

#1

Hi, I’m unable to retrieve any analytics data using the promoted_tweet entity with the new v1 API. The v0 API would return data with this call:

twurl -t -H ads-api.twitter.com ‘/0/stats/accounts/:account_id/promoted_tweets/:promoted_tweet_id?start_time=2016-03-18T00:00:00-07:00Z&end_time=2016-03-19T00:00:00-07:00Z’

I tried using the new v1 API with this call but it returns 0 data:

twurl -t -H ads-api.twitter.com ‘/1/stats/accounts/:account_id?metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER&granularity=HOUR&start_time=2016-03-18T00:00:00-07:00Z&end_time=2016-03-19T00:00:00-07:00Z&entity=PROMOTED_TWEET&entity_ids=:promoted_tweet_id’


v1 Analytics API doesn't return twitter handles using SIMILAR_TO_FOLLOWERS_OF_USER
#2

experiencing the same problem. It seems this request can only return data at line item level. And v0 only returns data at account level.

I wonder if it is safe to assume that the data returned at line item level is aggregated from all the promoted tweets in it (assuming there are more that one promoted tweets in that line item)


#3

Thanks for reporting this. We’re investigating this issue now, and we’ll update this thread with more information soon.


#4

Also, I’m getting an “Internal Error” when trying to retrieve Promoted Tweet stats broken by segmentation_type. For example, the following query fails:

twurl -H ads-api.twitter.com ‘/1/stats/accounts/:account_id?metric_groups=ENGAGEMENT&placement=ALL_ON_TWITTER&granularity=HOUR&start_time=2016-03-20T00:00:00-07:00Z&end_time=2016-03-23T10:00:00-07:00Z&entity=PROMOTED_TWEET&segmentation_type=KEYWORDS&entity_ids=:promoted_tweet_id’


#5

To give everyone an update here: this issue is now fixed, and v1 stats should be returning data as normal for promoted tweet entities.


#6

Thanks, I can confirm the promoted tweets stats are working now for v1. However, I’m still unable to break by segmentation types for promoted tweet entities. It returns the data in a single segment named “Unknown”. Can your engineers help investigate. See example output below:

{
    "data": [
        {   
            "id": "q0kb3",
            "id_data": [
                {   
                    "metrics": {
                        "app_clicks": [
                            78
                        ],
                        "card_engagements": [
                            73
                        ],
                        "clicks": [
                            167
                        ],
                        "engagements": [
                            806
                        ],
                        "follows": [
                            4
                        ],
                        "impressions": [
                            128924
                        ],
                        "likes": [
                            83
                        ],
                        "qualified_impressions": null,
                        "replies": null,
                        "retweets": [
                            4
                        ],
                        "url_clicks": [
                            5
                        ]
                    },
                    "segment": {
                        "segment_name": "Unknown",
                        "segment_value": "0"
                    }
                }
            ]
        }
    ],
    "data_type": "stats",
    "request": {
        "params": {
            "country": null,
            "end_time": "2016-03-27T07:00:00Z",
            "entity": "PROMOTED_TWEET",
            "entity_ids": [
                "q0kb3"
            ],
            "granularity": "DAY",
            "metric_groups": [
                "ENGAGEMENT"
            ],
            "placement": "ALL_ON_TWITTER",
            "platform": null,
            "segmentation_type": "KEYWORDS",
            "start_time": "2016-03-26T07:00:00Z"
        }
    },
    "time_series_length": 1
}

#7

Segmented stats are now correctly returning as well. Let us know if you’re still seeing issues!


#8

Thanks, confirming that segmented stats are working now.


#9

Hello Everyone,

Im not creating new thread as this is directly related to problem above.

My situation is that Im trying to migrate v0 promoted tweets to v1 and here are my results:

v0

  • twurl -t -H “https://ads-api.twitter.com” “/0/stats/accounts/xx/promoted_tweets/yy?granularity=TOTAL&metrics=billed_charge_local_micro,conversion_order_quantity&start_time=2016-07-22&end_time=2016-07-23” [there are much more fields]

v1

  • twurl -t -H “https://ads-api.twitter.com” “/1/stats/accounts/xx?entity_ids=yy&entity=CAMPAIGN&end_time=2016-07-24T15:00:00Z&granularity=TOTAL&metric_groups=ENGAGEMENT,BILLING&placement=ALL_ON_TWITTER&start_time=2016-07-22T15:00:00Z”

And I think that I have it written correctly, but in v1 i receive empty array [] (see bellow) in data json field while in v0 I receive all the asked data.

{ "data_type": "stats", "time_series_length": 1, "data": [], "request": { "params": { "start_time": "2016-07-22T15:00:00Z", "segmentation_type": null, "entity_ids": [ "yy" ], "end_time": "2016-07-24T15:00:00Z", "country": null, "placement": "ALL_ON_TWITTER", "granularity": "TOTAL", "entity": "CAMPAIGN", "platform": null, "metric_groups": [ "ENGAGEMENT", "BILLING" ] } } }

Do you think you could hand me with that ?

Thanks in advance,

Richard