Ad Level Cost, Impressions & Clicks

ads

#1

Hello we need to get Billing(cost/spend) and Engagement(clicks, impressions etc. ) stats at the creative level. Currently we understand how to accomplish this at the campaign level but we require further granularity for our cost reporting purposes.

We referred to this link, https://developer.twitter.com/en/docs/ads/analytics/api-reference/synchronous.html

and currently understand that the possible values for an entity are : ACCOUNT, CAMPAIGN, FUNDING_INSTRUMENT, LINE_ITEM, ORGANIC_TWEET, PROMOTED_TWEET

We understand Line_Item to be analogous to AdGroup, so Ad should be analogous to Organic_Tweet or Promoted_Tweet?

We’re using the following end points:
stats/accounts/:account_id/campaigns
stats/accounts/:account_id/campaigns/:id .

But we need to go two levels deeper to Campaign > Adgroup > Ad

We referred to these posts:

  1. How to get Imp,click,mobie_app_conversion by CAMPAIGN and Creatives
  2. API to access analytics data (engagements, impressions, clicks, retweets likes etc)
  3. Ads API - Which Campaign REST endpoint to use to get Clicks, Impressions, Cost,

But they do not directly answer our question.

Our desired output is a response containing the following columns:

  • Date
  • Ad Account Name
  • Ad Account ID
  • Campaign Name
  • Campaign ID
  • Ad Group Name
  • Ad Group ID
  • Creative Name
  • Creative ID
  • Cost
  • Clicks
  • Impressions

Let us know if we can give you more details, thanks!


#2

Thanks for looking into historical posts before posting a question!

If you’re looking for data about an ad, that will always be entity=PROMOTED_TWEET in the analytics request.

We’re using the following end points:
stats/accounts/:account_id/campaigns
stats/accounts/:account_id/campaigns/:id

These resource paths are not supported.


That’s a lot that you’re trying to do. You’ll need to make multiple requests to get that information. For example, to get the account ID and name you should refer to GET accounts. For the campaign ID and name, use GET accounts/:account_id/campaigns. For line item ID and name use GET accounts/:account_id/line_items (scoping by the specific campaign ID). The “creative” ID—I’ll assume you mean the promoted_tweets ID—should be found by using GET accounts/:account_id/promoted_tweets (scoping by the specific line item ID). Not sure what you mean by creative name. For cost, clicks, and impressions, use one of our analytics endpoints (e.g., GET stats/accounts/:account_id) and specify the line item IDs as the entity_ids values and specify metric_groups=ENGAGEMENT,BILLING.