AdStats doesn't match UI and API

ads
stats
promoted-tweets

#1

Hi,

I’m using Twitter4j-ads (Java) library to generate stats reports, and generating a report I found some discrepancies between report generated via API and a report generated via UI.

I found the discrepancies in three promoted tweets (26ak7q,26ak7r,26ak7s), that are located in the same campaign (be376) and the same funding source (st6uk), the other promoted tweets in the report match with UI.

I’m making the following request:

GET https://ads-api.twitter.com/3/stats/accounts/18ce543kord

sending the parameters:

[granularity=DAY]
[start_time=2018-09-04T22:00:00Z]
[entity=PROMOTED_TWEET]
[end_time=2018-09-10T22:00:00Z]
[metric_groups=BILLING,VIDEO,MOBILE_CONVERSION,ENGAGEMENT,MEDIA,WEB_CONVERSION]
[with_deleted=true]
[entity_ids=26ak7q,26ak7r,26ak7s]
[placement=ALL_ON_TWITTER]

(The request only contains data for non match items)

Can you help me to explain why is not matching the data?.


#2

Hi @NestorSigiSilva,

This may be due to how the API and the UI use dates. This thread may be useful to you.


#3

Another possibility is that you need to request the placement for ‘off Twitter’ stats because those are combined in UI but in API you have to request them separately: [placement=ALL_ON_TWITTER] + [placement=PUBLISHER_NETWORK] = total in UI


#4

hi @JBabichJapan / @joncipriano .

I did changes in my code to make the request two times, one for each placement, and now the results on API is matching with results on UI.

Thank you!