In this document:
Conversion stats can be retrieved at Ad group, Ad campaign and Ad account levels. For the data that gets returned, conversions are broken down by the action_type and object_id. Each conversion stat returns six attribution values for each conversion that is being tracked. These attributions are defined as follow.
| Attribution Value | Description |
|---|---|
post_imp_1d |
Number of conversions within 1 day after viewing an ad |
post_imp_7d |
Number of conversions within 7 days after viewing an ad |
post_imp_28d |
Number of conversions within 28 days after viewing an ad |
post_click_1d |
Number of conversions within 1 day after clicking on an ad |
post_click_7d |
Number of conversions within 7 days after clicking on an ad |
post_click_28d |
Number of conversions within 28 days after clicking on an ad |
There are an additional 6 attributions for credit_spend stats, defined as follows.
| Attribution Value | Description |
|---|---|
post_imp_value_1d |
The value of the credits used within 1 day as the result of viewing (or clicking) an ad |
post_imp_value_7d |
The value of the credits used within 7 days as the result of viewing (or clicking) an ad |
post_imp_value_28d |
The value of the credits used within 28 days as the result of viewing (or clicking) an ad |
post_click_value_1d |
The value of the credits used within 1 day as the result of viewing (or clicking) an ad |
post_click_value_7d |
The value of the credits used within 7 days as the result of viewing (or clicking) an ad |
post_click_value_28d |
The value of the credits used within 28 days as the result of viewing (or clicking) an ad |
To retrieve conversion stats for an Ad account make an HTTP GET request to:
https://graph.facebook.com/act_{ad_account_id}/conversions
This will return conversion data aggregated from all adgroups, including deleted.
Note: If a conversion spec specifies likes of a post, i.e., {'action.type':'like', 'post':POST_ID}, the conversion stats shows the action as 'post_like' (see above). This is mainly to enable differentiating likes on a post from likes on a page quickly in the conversion stats response.
To retrieve conversion stats for all Ad campaigns under an Ad account make an HTTP GET request to:
https://graph.facebook.com/act_{ad_account_id}/adcampaignconversions
You can choose to filter the response by specifying the following optional fields:
| name | type | description |
|---|---|---|
| campaign_ids | array | Array of campaign ID's to query stats for |
https://graph.facebook.com/act_{ad_account_id}/adcampaignconversions?campaign_ids=[123456,1258998]&access_token=__
Alternatively to retrieve stats for a single Ad campaign by ad campaign ID, make an HTTP GET request to:
https://graph.facebook.com/{ad_campaign_id}/conversions
To retrieve conversion stats for all Ad groups in an Ad account make an HTTP GET request to:
https://graph.facebook.com/act_{ad_account_id}/adgroupconversions
You can choose to filter the response by specifying the following optional fields:
| name | type | description |
|---|---|---|
| adgroup_ids | array | Array of adgroup ID's to query stats for |
https://graph.facebook.com/act_{ad_account_id}/adgroupconversions?adgroup_ids=[22113345,980987]&access_token=__
Note: You can only retrieve up to 50 adgroup_ids
Alternatively to retrieve stats for a single Ad group, make an HTTP GET call to:
https://graph.facebook.com/{adgroup_id}/conversions
The following additional parameters are available on any of the conversion stats requests.
| name | type | description |
|---|---|---|
start_time |
UNIX timestamp format or parseable date | Specify the start date when filtering by a time range |
end_time |
UNIX timestamp format or parseable date | Specify the end date when filtering by a time range |
aggregate_days |
integer | When you specify an aggregation window, your conversion stats will be aggregated in the specified day windows ending on the end_time specified. Max is 90 days |
by_impression_time |
boolean | When you set to true, your conversion stats will be reported based on the impression or click time. false by default, which means your conversion stats will be reported based on the time the conversion action occurred. |
Limiting to a date range using a parseable date format
https://graph.facebook.com/act_{ad_account_id}/adcampaignconversions?start_time=2012-01-20&end_time=2012-02-05&campaign_ids=[666666]&access_token=__
Limiting to a date range using a UNIX timestamp
https://graph.facebook.com/act_21002924/adcampaignconversions?start_time=1327045120&end_time=1328427520&campaign_ids=[666666]&access_token=_
Limiting to a date range and setting an aggregation window
https://graph.facebook.com/act_21002924/adcampaignconversions?aggregate_days=5&start_time=2012-01-20&end_time=2012-02-05&campaign_ids=[666666]&access_token=__
Aggregating conversion stats based on impression or click time.
https://graph.facebook.com/act_21002924/adcampaignconversions?by_impression_time=true&campaign_ids=[666666]&access_token=__