facebookfacebook-graph-apifacebook-marketing-apifacebook-insights

Retrieving field `conversions` from fb marketing API


I am using fb marketing api to retrieve the insights.

request format

v8.0/{account_id}/insights?level=ad&date_preset=last_30d&action_attribution_windows=['28d_click','28d_view']&fields=account_id,account_name,ad_id,ad_name,conversions,conversion_values,cost_per_conversion,cost_per_action_type,actions&breakdowns=age,gender

here i am requesting conversions field but not getting it. I have tried all the breakdown combinations listed in fb marketing api breakdowns doc

I want to retrieve the conversions field from the API. Is there anything that i am missing ?

Appreciate all your feedbacks. Thanks


Solution

  • I was able to retrieve the data using same API call. Turns out fb will return the conversions data only when there is any data to return. what is counted as conversion - somebody subscribed after clicking on the ad, that will be counted as conversion. Viewing the post is not counted in conversions. also api call should have the param action_report_time=conversion to retrieve the conversions(mixed/conversions both works here).