Our team at Gupta Media is trying to build a report based on the url that the creatives are driving to.
For instance it would be nice to see the cost, clicks, and impressions for each url a campaign is trying to drive traffic towards.
Our current plan to achieve something like this is as follows:
- call accounts/:account_id/line_items to get all of the line items in the account.
a. Filter these line items by their campaign_id in order to find the line items in these campaigns (additionally you can provide up to 50 campaign ids in the parameters of the line items call)
- call accounts/:account_id/promoted_tweets to get the promoted tweets in the account
be sure to add the parameter with_deleted=true to retrieve the previously deleted tweets
a. Filter these promoted tweets by their line_item_id in (additionally you can provide a single line_item_id in the parameters of the promoted tweets call to get promoted tweets in that line item)
- with the promoted tweets that you now have, you have to call the public twitter api (not ads, api.twitter.com) to get the tweet information
a. twurl -t /1.1/statuses/show.json?id=693960543493816322
b. the id is the tweet_id on the promoted tweet object
c. the url of this tweet is under entities → urls → expanded_url
- call stats/accounts/:account_id/promoted_tweets to get the stats for each of these urls
you can only provide 20 promoted_tweet_ids to this call
The problem where this method will fail is that a promoted tweet can have multiple urls. So we will not be able to breakdown the stats from the promoted tweet level to the individual url
Is there a better way to obtain this information?