[Possible api bug] Returned replies and retweets are null even though there were some in given timeframe

bug
ads
analytics
api

#1

According to ads analytics best practices: https://dev.twitter.com/ads/analytics/best-practices the data is gathered real-time and should be available within secconds.

I have created a post on 30-05-2016 18:03 and few minutes later another user replied to that tweet and retweeted it.
ads.twitter.com has shown those:

Total engagements	2
Replies	                1
Retweets	        1 

I used twurl to try gathering the same statistics using:
twurl -H ads-api.twitter.com “/1/stats/accounts/18ce54bg7zc?granularity=TOTAL&entity=ORGANIC_TWEET&entity_ids=11111111111111111&start_time=2016-05-28T15:00:00Z&end_time=2016-06-01T16:00:00Z&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT”

Which returned null for all values except for impressions (8). Using granularity of HOUR or DAY had similar results(at first I used HOUR aiming just for the last hour, but I thought I might be not getting correct timeframe, so to made sure I used total with start/end time far exceeding the one I was aiming for).

About 18:43, so around 30 minutes after the post was made using exactly the same twurl command returned:

"impressions":[10],
"qualified_impressions":null,
"follows":null,
"app_clicks":null,
"retweets":[1],
"likes":null,
"engagements":[2],
"clicks":[1],
"card_engagements":null,
"replies":null,
"url_clicks":null,
"carousel_swipes":null

Which included the reply from before, but was still missing replies(how come?).

What is more, now, (18:55) I ran exactly the same twurl again, which returned:

"retweets":[2],
"engagements":[3],
"clicks":[1]

But there were no new retweets since then. Both twitter.com and ads.twitter.com show that there was only single retweet. Obviously the analytics are wrong.

What is going on? How to avoid wrong data? Changing granuality to daily doesn’t help:
twurl -H ads-api.twitter.com “/1/stats/accounts/18ce54bg7zc?granularity=HOUR&entity=ORGANIC_TWEET&entity_ids=111111111111111&start_time=2016-05-30T16:00:00Z&end_time=2016-05-30T17:00:00Z&placement=ALL_ON_TWITTER&metric_groups=ENGAGEMENT”

 {"data_type":"stats","time_series_length":1,"data":[{"id":"11111111111111","id_data":[{"segment":null,"metrics":{"impressions":[13],"qualified_impressions":null,"follows":null,"app_clicks":null,"retweets":[2],"likes":null,"engagements":[3],"clicks":[1],"card_engagements":null,"replies":null,"url_clicks":null,"carousel_swipes":null}}]}],"request":{"params":{"start_time":"2016-05-30T16:00:00Z","segmentation_type":null,"entity_ids":[737313523202699264],"end_time":"2016-05-30T17:00:00Z","country":null,"placement":"ALL_ON_TWITTER","granularity":"HOUR","entity":"ORGANIC_TWEET","platform":null,"metric_groups":["ENGAGEMENT"]}}}

Still no replies and retweets count is wrong. 16-17 is used instead 18-19 because of timezone difference.


#2

I made some more investigation, which made me almost sure this is some API bug. For example I have analytics for one post created on May 11th, which has ~1500 engagement, 1 reply and 1 retweet. Engagement is reported properly with sum of all hours since it was published being exactly the same as reported trough ads.api.com. Meanwhile retweets and responses are null since the beginning till now.


#3

I also identified this problem.

this request covers the whole lifetime for the tweet.
twurl -H ads-api.twitter.com "/1/stats/accounts/18ce545gmtk?entity=ORGANIC_TWEET&entity_ids=737260702881157120&start_time=2016-05-30T02:00:00Z&end_time=2016-06-05T02:00:00Z&metric_groups=ENGAGEMENT&granularity=TOTAL&placement=ALL_ON_TWITTER"
the response states that there are only 2 replies and but 5 likes
{"data_type":"stats","time_series_length":1,"data":[{"id":"737260702881157120","id_data":[{"segment":null,"metrics":{"impressions":[104],"qualified_impressions":null,"follows":null,"app_clicks":null,"retweets":null,"likes":[5],"engagements":[9],"clicks":[7],"card_engagements":null,"replies":[2],"url_clicks":null,"carousel_swipes":null}}]}],"request":{"params":{"start_time":"2016-05-30T02:00:00Z","segmentation_type":null,"entity_ids":[737260702881157120],"end_time":"2016-06-05T02:00:00Z","country":null,"placement":"ALL_ON_TWITTER","granularity":"TOTAL","entity":"ORGANIC_TWEET","platform":null,"metric_groups":["ENGAGEMENT"]}}}

the twitter analytics UI in contrast says that there are 4 replies and 4 likes


#4

Thanks for reporting these issues. I could repro the gap in ORGANIC_TWEET data and will follow up to see what’s going on.


#5

Any news on the issue yet?


#6

Hi, I checked and the same results are actually given via v0 version of the API as well (e.g. with a query like twurl -H ads-api.twitter.com ‘/0/stats/accounts/18ce545gmtk/organic_tweets/?granularity=TOTAL&start_time=2016-05-30T02:00:00Z&end_time=2016-06-05T02:00:00Z&tweet_ids=:tweet_id’)

We have a guess that the difference is because 2 of the replies are from when the tweet was promoted and the analytics.twitter.com is counting those as part of the organic data (whereas Ads API separates them) - I will have to do investigation to confirm whether this is really what’s happening so for the meantime I would ask to repro the stats calls upon a tweet that has definitely never been promoted and check to see if you see the same difference or not.


#7

I don’t think this is related to promotion, because at least my tweet that is mentioned above was never promoted.


#8

Maybe some of the differences have to do with analytics not being “final” for the last 24 hours?

I’m talking about this from the documentation:
“Timelines
As soon as stats are available, you are able to retrieve them. The feedback on stats is real-time. These early results are estimates, the stats are finalized after 24 hours, except for spend metrics.”

By the way, is the above true both for organic tweet and promoted tweet?


#9

The wrong data is still returned after 24h for my posts and they are not promoted.


#10

Unfortunately we have not had a chance to do a deeper dive into this issue, but one thing to note is that the same numbers are returned from v0 so it isn’t a specific problem with v1 and can basically confirm that it is a bug we will have to investigate further. I would be curious to know if it happens across other tweets or only is this single repro (since I haven’t heard this reported from other sources).

Thanks,

John