How to aggregate stats to Video (creative) level

video
python
api

#1

I’ve had some success pulling all of the campaigns, videos, and line items for my account (using the twitter-ads python sdk) and pulling stats for line_items. I’m trying to aggregate stats like promoted_video_starts for a particular video under the assumption that each line item corresponds to one video, at least if the line item objective is video_views, but I don’t see field that ties the line_item to any particular creative. Thanks in advance for your suggestions.

*My follow up questions will be is there a way to get stats for non-promoted videos out of any of the apis?


#2

When you post promoted tweets there is a chance to store the mapping between line item ID and promoted tweet ID in your system. There can be a 1:many relationship between a single line item ID and several video tweets. I would recommend to retain a record of not only promoted tweet ID to line item ID mapping, but also which video was used to make the promoted tweet, and reference this DB table when pulling and displaying video tweet stats. The video itself, is not treated as a separate entity within the API and it’s all about the tweets.

Thanks,

John