Returns the break down metrics of the FB Conversion Event
GET /v9.0/{atlas-fb-conversion-event-id}/metrics_breakdown HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get(
'/{atlas-fb-conversion-event-id}/metrics_breakdown',
'{access-token}'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
"/{atlas-fb-conversion-event-id}/metrics_breakdown",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{atlas-fb-conversion-event-id}/metrics_breakdown",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{atlas-fb-conversion-event-id}/metrics_breakdown"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
Parameter | Description |
---|---|
dimensions list<enum {AD_ID, AD_SET_ID, CAMPAIGN_ID, DEVICE_TYPE, SOURCE_CHANNEL}> | Default value: [] Dimensions that can be used to further break down metrics - only device type and source channel are supported. |
granularity enum {HOUR, DAY, WEEK_SUNDAY, MONTH, YEAR} | Granularity to be used when breaking down by time. |
metric_scope JSON object | Filters that scope the time period for which metrics are returned. Defined as a shape with the properties "filters", "should_include_prior_period", and "time_period". |
order_by list<JSON object> | Default value: [] Field to order results by |
Reading from this edge will return a JSON formatted result:
{ "
data
": [], "paging
": {}, "summary
": {} }
data
paging
summary
Aggregated information about the edge, such as counts. Specify the fields to fetch in the summary param (like summary=metric_date_range
).
Field | Description |
---|---|
metric_date_range AtlasMetricDateRange | The calculated date range for the requested time period and prior time period |
Error | Description |
---|---|
100 | Invalid parameter |