2
votes

I want to generate a report for an ad based on video post using Facebook ads api. When I try to query the statistics data for this ad (assuming 123456 is the adgroupId)

123456/stats

This is the result:

{ "id": "111111/stats/0/222222", "impressions": 38502, "clicks": 2744, "spent": 14804, "social_impressions": 15486, "social_clicks": 1136, "social_spent": 6065, "unique_impressions": 0, "social_unique_impressions": 0, "unique_clicks": 0, "social_unique_clicks": 0, "actions": { "like": 58, "photo_view": 58, "post": 52, "post_like": 288, "video_play": 1825, "video_view": 2969, "comment": 12, "link_click": 3 }, "inline_actions": { "title_clicks": 0, "like": 51, "rsvp_yes": 0, "rsvp_maybe": 0, "post_like": 250, "comment": 10, "photo_view": 0, "link_click": 0, "video_play": 1956, "question_vote": 0 }, "adgroup_id": "111111", "campaign_id": "1111111", "start_time": null, "end_time": "2014-06-10T12:11:32+0000", "newsfeed_position": null }

As you can see, I'm getting the video_play object (among with several others) both in actions and in inline_actions.

What the different between the actions and the inline_actions?

Several objects are greater in the actions (ie likes) area and some are greater in the inline_actions (ie video_play), so one of them could not contain the other.

Thanks

1

1 Answers

2
votes

inline_actions is a list of some predefined actions which take place directly on the ad unit (e.g. if it's a video ad, people who click the video, people who play the video, etc)

actions is whatever you've defined in the tracking spec or conversion spec for the ad, and applies to any time those actions took place after a user clicked or saw the ad (with a configurable view through or click through attribution)

They're tracking different things over different time periods - for those things (e.g. video_play which are in both, i'd expect actions to be a bit higher than inline actions for the same time period, but if there are other ads running with the same objectives a user might be counted as a conversion on a different ad for the tracking specs

you could also be looking at actions by impression time rather than actions by action time, which would mean you're not examining the same time period

Source: https://developers.facebook.com/docs/reference/ads-api/adstatistics/