In Facebook ad manager, I can see different categories of conversions against each campaign i.e.
Website Purchases 9
Website Adds to Cart 724
Website Registrations Completed 6
Website Checkouts Initiated 24
Website Searches 272
I am using graph API to extract this data from Facebook Marketing API(insights, attribution)
Firstly I tried to extract campaign level conversions from insights using
act_ad_Account_ID/insights?date_preset=this_month&action_attribution_windows=7d_click&level=campaign&fields=campaign_name,conversions,conversion_values,cost_per_conversion
But I could not see the categories i.e. website purchases, adds to cart etc. in the retrieved data.
Then I tried using attribution with query
<Business Unit ID>/conversion_events?fields=name,id,cost_per_1k_impressions
as a result, I retrieved these categories associated with business unit ID overall.
"data": [
{
"name": "Website Searches",
"id": "11*******772",
"cost_per_1k_impressions": 11388.238
},
{
"name": "Website Adds to Cart",
"id": "1121******775",
"cost_per_1k_impressions": 188.238
},
{
"name": "Website Purchases",
"id": "11***********7874",
"cost_per_1k_impressions": 7088.238
},
{
"name": "Website Checkouts Initiated",
"id": "11212**********",
"cost_per_1k_impressions": 17088.238
},
{
"name": "Website Subscriptions",
"id": "1********80141",
"cost_per_1k_impressions": 1137088.238
}
But these are overall stats, I want to retrieve these stats at campaign level. Where to put down a campaign filter. Just using these API first time.
answering my own Question here. We can get conversion data from insights here:
act_ad_Account_ID/insights?date_preset=this_month&level=campaign&fields=campaign_name,actions
actions return a json, that contain
Website Purchases 9
Website Adds to Cart 724
Website Registrations Completed 6
Website Checkouts Initiated 24
Website Searches 272
all these conversions data that we can see on facebook ad manager against each campaign.