I’m trying to fetch ads (promoted_tweets)'s stats per day, for an account and date range that show lots of data in the ads manager, however the data coming from the API comes without any number in the stats, all values are None.
This is the account id: 18ce54lpp19
Date range: 2019-03-21 - 2019-04-30
metric_groups = [METRIC_GROUP.ENGAGEMENT,
METRIC_GROUP.MOBILE_CONVERSION,
METRIC_GROUP.WEB_CONVERSION,
METRIC_GROUP.MEDIA,
METRIC_GROUP.VIDEO]
We get all the promoted tweets for the account,
then we iterate over campaigns and get their line_items_ids in order to match exactly which promoted_tweets correspond to each campaign (as we didn’t find any way to ask it directly through the sdk)…
Then we iterate over chunks of 20 promoted_tweet_ids and queue jobs for asking stats like this:
for chunk in chunks_ptw_ids_list:
queued_job = PromotedTweet.queue_async_stats_job(account=account,
ids=chunk,
metric_groups=metric_groups,
start_time=start_time,
end_time=end_time,
granularity='DAY')
After getting the results, everything has a None on it.
Ie:
('video_views_50', None),
('impressions', None),
('mobile_conversion_spent_credits',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('mobile_conversion_installs',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('mobile_conversion_content_views',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('mobile_conversion_add_to_wishlists',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('mobile_conversion_checkouts_initiated',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('tweets_send', None),
('conversion_purchases',
{'assisted': None,
'metric': None,
'order_quantity': None,
'order_quantity_engagement': None,
'order_quantity_view': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None,
'sale_amount_engagement': None,
'sale_amount_view': None}),
('mobile_conversion_reservations',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('auto_created_conversion_add_to_wish_list', None),
('mobile_conversion_tutorials_completed',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('qualified_impressions', None),
('video_views_75', None),
('conversion_sign_ups',
{'assisted': None,
'metric': None,
'order_quantity': None,
'order_quantity_engagement': None,
'order_quantity_view': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None,
'sale_amount_engagement': None,
'sale_amount_view': None}),
('media_engagements', None),
('auto_created_conversion_sign_up_initiated', None),
('follows', None),
('auto_created_conversion_download', None),
('mobile_conversion_achievements_unlocked',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('video_3s100pct_views', None),
('auto_created_conversion_content_view', None),
('app_clicks', None),
('mobile_conversion_searches',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('auto_created_conversion_checkout_initiated', None),
('mobile_conversion_site_visits',
{'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('retweets', None),
('mobile_conversion_key_page_views',
{'post_engagement': None, 'post_view': None}),
('auto_created_conversion_added_payment_info', None),
('video_cta_clicks', None),
('unfollows', None),
('likes', None),
('mobile_conversion_add_to_carts',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('mobile_conversion_payment_info_additions',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('auto_created_conversion_complete_registration', None),
('mobile_conversion_re_engages',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('video_content_starts', None),
('video_views_25', None),
('mobile_conversion_shares',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('conversion_site_visits',
{'metric': None,
'order_quantity': None,
'order_quantity_engagement': None,
'order_quantity_view': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None,
'sale_amount_engagement': None,
'sale_amount_view': None}),
('engagements', None),
('conversion_custom',
{'metric': None,
'order_quantity': None,
'order_quantity_engagement': None,
'order_quantity_view': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None,
'sale_amount_engagement': None,
'sale_amount_view': None}),
('auto_created_conversion_add_to_cart', None),
('video_views_100', None),
('clicks', None),
('mobile_conversion_sign_ups',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('auto_created_conversion_purchase', None),
('media_views', None),
('card_engagements', None),
('video_6s_views', None),
('auto_created_conversion_page_view', None),
('poll_card_vote', None),
('auto_created_conversion_search', None),
('replies', None),
('url_clicks', None),
('video_mrc_views', None),
('mobile_conversion_purchases',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('mobile_conversion_rates',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('mobile_conversion_logins',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('mobile_conversion_updates',
{'assisted': None,
'order_quantity': None,
'post_engagement': None,
'post_view': None,
'sale_amount': None}),
('conversion_downloads',
{'metric': None,
'order_quantity': None,
A Specific case to check:
Line item id: ethft
Promoted tweet id: 2yzy78
3/21/2019 to 4/30/2019
I’d appreciate any help with this.
Thanks in advance