Missing Metrics for Newer Promoted Tweets

promoted-tweets

#1

We use the stats endpoint to determine metrics for promoted tweets and their parents (line items and campaigns). Recently, a few promoted tweets that we have run are not returning metrics results despite having results on the business manager. I do not believe anything is different about how these promoted tweets are categorized in the API and information about them can be queried though the API normally.

These ads were run on 3/23 and are still active.

Any insight into why these ads are not associated with metrics would be great.

Details about the request are as follows:

Request

https://ads-api.twitter.com/2/stats/accounts/xxxxxxx

Params

    {
        'entity': 'PROMOTED_TWEET',
	'placement': 'ALL_ON_TWITTER',
	'end_time': '2018-03-27T04:00:00Z',
	'start_time': '2018-03-22T04:00:00Z',
	'granularity': 'DAY',
	'entity_ids': ['1tmyp0', '1tup7c'],
	'metric_groups': ['BILLING', 'ENGAGEMENT', 'MEDIA', 'MOBILE_CONVERSION', 'VIDEO', 'WEB_CONVERSION']
    }

Response

{
	'request': {
		'params': {
			'entity': 'PROMOTED_TWEET',
			'placement': 'ALL_ON_TWITTER',
			'granularity': 'DAY',
			'start_time': '2018-03-22T04:00:00Z',
			'end_time': '2018-03-27T04:00:00Z',
			'platform': None,
			'country': None,
			'segmentation_type': None,
			'metric_groups': ['BILLING', 'ENGAGEMENT', 'MEDIA', 'MOBILE_CONVERSION', 'VIDEO', 'WEB_CONVERSION'],
			'entity_ids': ['1tup7c', '1tup7c']
		}
	},
	'data': [{
		'id_data': [{
			'metrics': {
				'mobile_conversion_key_page_views': {
					'post_view': None,
					'post_engagement': None
				},
				'mobile_conversion_installs': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'mobile_conversion_searches': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'auto_created_conversion_purchase': None,
				'billed_charge_local_micro': None,
				'billed_engagements': None,
				'auto_created_conversion_added_payment_info': None,
				'conversion_purchases': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount_engagement': None,
					'order_quantity_engagement': None,
					'assisted': None,
					'sale_amount_view': None,
					'metric': None,
					'order_quantity_view': None,
					'sale_amount': None,
					'order_quantity': None
				},
				'clicks': None,
				'mobile_conversion_add_to_wishlists': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'mobile_conversion_tutorials_completed': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'auto_created_conversion_sign_up_initiated': None,
				'video_views_25': None,
				'mobile_conversion_add_to_carts': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'mobile_conversion_re_engages': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'auto_created_conversion_page_view': None,
				'media_engagements': None,
				'auto_created_conversion_search': None,
				'conversion_downloads': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount_engagement': None,
					'order_quantity_engagement': None,
					'sale_amount_view': None,
					'metric': None,
					'order_quantity_view': None,
					'sale_amount': None,
					'order_quantity': None
				},
				'mobile_conversion_checkouts_initiated': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'auto_created_conversion_complete_registration': None,
				'mobile_conversion_reservations': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'video_cta_clicks': None,
				'follows': None,
				'conversion_sign_ups': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount_engagement': None,
					'order_quantity_engagement': None,
					'assisted': None,
					'sale_amount_view': None,
					'metric': None,
					'order_quantity_view': None,
					'sale_amount': None,
					'order_quantity': None
				},
				'auto_created_conversion_add_to_cart': None,
				'media_views': None,
				'mobile_conversion_shares': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'poll_card_vote': None,
				'mobile_conversion_levels_achieved': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'carousel_swipes': None,
				'mobile_conversion_spent_credits': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'video_views_50': None,
				'tweets_send': None,
				'mobile_conversion_logins': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'mobile_conversion_payment_info_additions': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'mobile_conversion_rates': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'mobile_conversion_content_views': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'mobile_conversion_purchases': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'engagements': None,
				'auto_created_conversion_checkout_initiated': None,
				'replies': None,
				'video_total_views': None,
				'auto_created_conversion_add_to_wish_list': None,
				'conversion_site_visits': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount_engagement': None,
					'order_quantity_engagement': None,
					'sale_amount_view': None,
					'metric': None,
					'order_quantity_view': None,
					'sale_amount': None,
					'order_quantity': None
				},
				'qualified_impressions': None,
				'mobile_conversion_achievements_unlocked': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'mobile_conversion_updates': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'auto_created_conversion_download': None,
				'video_3s100pct_views': None,
				'likes': None,
				'mobile_conversion_sign_ups': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'app_clicks': None,
				'card_engagements': None,
				'mobile_conversion_invites': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'assisted': None,
					'order_quantity': None
				},
				'mobile_conversion_downloads': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'order_quantity': None
				},
				'video_mrc_views': None,
				'impressions': None,
				'video_content_starts': None,
				'conversion_custom': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount_engagement': None,
					'order_quantity_engagement': None,
					'sale_amount_view': None,
					'metric': None,
					'order_quantity_view': None,
					'sale_amount': None,
					'order_quantity': None
				},
				'url_clicks': None,
				'video_views_100': None,
				'auto_created_conversion_content_view': None,
				'mobile_conversion_site_visits': {
					'post_view': None,
					'post_engagement': None,
					'sale_amount': None,
					'order_quantity': None
				},
				'retweets': None,
				'video_views_75': None
			},
			'segment': None
		}],
		'id': '1tup7c'
	}],
	'time_series_length': 2,
	'data_type': 'stats'
}

These same two ads in the business manager


#2

Followup on this issue

Since this we have run additional ads on the same account and those ads are coming back with stats. The difference was the type of campaign that we ran.

The ads with missing stats were ran with the “Website clicks or conversions” campaign. Does this campaign type not produce stats through the API?

Additionally, of the below types, are there any others that do not produce stats?


#3

Thanks for the question, @theKetsuN.

It wasn’t clear which specific metrics you were looking for, so I worked backward from the screenshot you provided. In this case, you’re looking for impressions, spend, and results (link clicks, in this case). Results rate and cost per result are derived from these.

Note: Please remember to check the placements (found on the line item) to determine whether you need to fetch data for both ALL_ON_TWITTER and PUBLISHER_NETWORK (the Twitter Audience Platform).

Here is an updated screenshot for these two specific ads:

I’m going to make two separate requests for clarity—one for engagements and one for billing. I’ve also increased the time window, am request data with TOTAL granularity, and at looking at PUBLISHER_NETWORK.

$ twurl -H ads-api.twitter.com "/3/stats/accounts/18ce54jsz3i?entity=PROMOTED_TWEET&entity_ids=1tmyp0,1tup7c&start_time=2018-03-23&end_time=2018-03-29&placement=PUBLISHER_NETWORK&granularity=TOTAL&metric_groups=ENGAGEMENT"
{
  "data_type": "stats",
  "time_series_length": 1,
  "data": [
    {
      "id": "1tmyp0",
      "id_data": [
        {
          "segment": null,
          "metrics": {
            "impressions": [
              1301
            ],
            "tweets_send": null,
            "qualified_impressions": null,
            "follows": null,
            "app_clicks": null,
            "retweets": null,
            "likes": null,
            "engagements": [
              67
            ],
            "clicks": [
              67
            ],
            "card_engagements": null,
            "poll_card_vote": null,
            "replies": null,
            "url_clicks": [
              67
            ],
            "carousel_swipes": null
          }
        }
      ]
    },
    {
      "id": "1tup7c",
      "id_data": [
        {
          "segment": null,
          "metrics": {
            "impressions": [
              163
            ],
            "tweets_send": null,
            "qualified_impressions": null,
            "follows": null,
            "app_clicks": null,
            "retweets": null,
            "likes": null,
            "engagements": [
              9
            ],
            "clicks": [
              9
            ],
            "card_engagements": null,
            "poll_card_vote": null,
            "replies": null,
            "url_clicks": [
              9
            ],
            "carousel_swipes": null
          }
        }
      ]
    }
  ],
  "request": {
    "params": {
      "start_time": "2018-03-23T04:00:00Z",
      "segmentation_type": null,
      "entity_ids": [
        "1tmyp0",
        "1tup7c"
      ],
      "end_time": "2018-03-29T04:00:00Z",
      "country": null,
      "placement": "PUBLISHER_NETWORK",
      "granularity": "TOTAL",
      "entity": "PROMOTED_TWEET",
      "platform": null,
      "metric_groups": [
        "ENGAGEMENT"
      ]
    }
  }
}

The impressions here match what’s in ads manager: 163 and 1,301. The number of clicks matches, too.

$ twurl -H ads-api.twitter.com "/3/stats/accounts/18ce54jsz3i?entity=PROMOTED_TWEET&entity_ids=1tmyp0,1tup7c&start_time=2018-03-23&end_time=2018-03-29&placement=PUBLISHER_NETWORK&granularity=TOTAL&metric_groups=BILLING"
{
  "data_type": "stats",
  "time_series_length": 1,
  "data": [
    {
      "id": "1tmyp0",
      "id_data": [
        {
          "segment": null,
          "metrics": {
            "billed_charge_local_micro": [
              4361427
            ],
            "billed_engagements": [
              37
            ]
          }
        }
      ]
    },
    {
      "id": "1tup7c",
      "id_data": [
        {
          "segment": null,
          "metrics": {
            "billed_charge_local_micro": [
              638573
            ],
            "billed_engagements": [
              1
            ]
          }
        }
      ]
    }
  ],
  "request": {
    "params": {
      "start_time": "2018-03-23T04:00:00Z",
      "segmentation_type": null,
      "entity_ids": [
        "1tmyp0",
        "1tup7c"
      ],
      "end_time": "2018-03-29T04:00:00Z",
      "country": null,
      "placement": "PUBLISHER_NETWORK",
      "granularity": "TOTAL",
      "entity": "PROMOTED_TWEET",
      "platform": null,
      "metric_groups": [
        "BILLING"
      ]
    }
  }
}

Here, the billing corresponds to the data in ads manager, too. Remember that these values are in micros. So, 4361427 => $4.36.

The issue here seems to be that you only requested data for ALL_ON_TWITTER.


The ads with missing stats were ran with the “Website clicks or conversions” campaign. Does this campaign type not produce stats through the API?

Additionally, of the below types, are there any others that do not produce stats?

You should be able to pull stats for all campaign types (objectives).

Thanks!


#4

This makes sense - I must have missed the point about PUBLISHER_NETWORK. Thank you for the response!