Hi All,
I am using the twitter_ads library for Python to download spend data on campaign level, and noticed that there are some discrepancies in the data.
It would be great if you could help us out with this issue:
Data used for retrieval:
I ran two asynchronous queries, one with segmentation by locations and one without and they resulted in different numbers (the one without segmentation resulted in numbers matching Twitter Ads portal).
With segmentation:
Campaign.queue_async_stats_job(tw_account,
[‘b2o9e’],
[METRIC_GROUP.ENGAGEMENT, METRIC_GROUP.BILLING],
**{'granularity':'DAY',
'start_time': d,
'end_time': (d + timedelta(days = 1)),
'segmentation_type': 'LOCATIONS',
'placement': 'ALL_ON_TWITTER'})
With d being the date.
This resulted in:
{'data': [{'id': 'b2o9e',
'id_data': [{'metrics': {'app_clicks': [40],
'billed_charge_local_micro': [7880196],
'billed_engagements': [39],
'card_engagements': [40],
'carousel_swipes': None,
'clicks': [32],
'engagements': [118],
'follows': [1],
'impressions': [3352],
'likes': [4],
'poll_card_vote': None,
'qualified_impressions': None,
'replies': None,
'retweets': None,
'tweets_send': None,
'unfollows': None,
'url_clicks': None},
'segment': {'segment_name': 'Austria',
'segment_value': '30410557050f13a5'}},
{'metrics': {'app_clicks': [372],
'billed_charge_local_micro': [102828051],
'billed_engagements': [358],
'card_engagements': [372],
'carousel_swipes': None,
'clicks': [171],
'engagements': [926],
'follows': None,
'impressions': [24547],
'likes': [8],
'poll_card_vote': None,
'qualified_impressions': None,
'replies': None,
'retweets': None,
'tweets_send': None,
'unfollows': None,
'url_clicks': None},
'segment': {'segment_name': 'Germany',
'segment_value': 'fdcd221ac44fa326'}}]}],
'data_type': 'stats',
'request': {'params': {'country': None,
'end_time': '2018-07-01T22:00:00Z',
'entity': 'CAMPAIGN',
'entity_ids': ['b2o9e'],
'granularity': 'DAY',
'metric_groups': ['ENGAGEMENT', 'BILLING'],
'placement': 'ALL_ON_TWITTER',
'platform': None,
'segmentation_type': 'LOCATIONS',
'start_time': '2018-06-30T22:00:00Z'}},
'time_series_length': 1}
Without segmentation:
Campaign.queue_async_stats_job(tw_account,
[‘b2o9e’],
[METRIC_GROUP.ENGAGEMENT, METRIC_GROUP.BILLING],
**{'granularity':'DAY',
'start_time': d,
'end_time': (d + timedelta(days = 1)),
'placement': 'ALL_ON_TWITTER'})
With the result
{'data': [{'id': 'b2o9e',
'id_data': [{'metrics': {'app_clicks': [412],
'billed_charge_local_micro': [110989197],
'billed_engagements': [399],
'card_engagements': [412],
'carousel_swipes': None,
'clicks': [203],
'engagements': [1044],
'follows': [1],
'impressions': [27899],
'likes': [12],
'poll_card_vote': None,
'qualified_impressions': None,
'replies': None,
'retweets': None,
'tweets_send': None,
'unfollows': None,
'url_clicks': None},
'segment': None}]}],
'data_type': 'stats',
'request': {'params': {'country': None,
'end_time': '2018-07-01T22:00:00Z',
'entity': 'CAMPAIGN',
'entity_ids': ['b2o9e'],
'granularity': 'DAY',
'metric_groups': ['ENGAGEMENT', 'BILLING'],
'placement': 'ALL_ON_TWITTER',
'platform': None,
'segmentation_type': None,
'start_time': '2018-06-30T22:00:00Z'}},
'time_series_length': 1}
Any help would be appreciated! 