Graph API Version

Ad Account, Custom Conversions

Data on custom conversion events from event sources, such as pixels. You can query this data to measure the effectiveness of our ads. Or use it to optimize ad delivery to target people who converted as defined by your customization and rules.

Reading

AdAccountCustomConversions

Example

Graph API Explorer
GET /v19.0/{ad-account-id}/customconversions 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(
    '/{ad-account-id}/customconversions',
    '{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(
    "/{ad-account-id}/customconversions",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{ad-account-id}/customconversions",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{ad-account-id}/customconversions"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {} }

data

A list of CustomConversion nodes.

paging

For more details about pagination, see the Graph API guide.

Error Codes

ErrorDescription
100Invalid parameter
80004There have been too many calls to this ad-account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting#ads-management.
190Invalid OAuth 2.0 Access Token
200Permissions error
2635You are calling a deprecated version of the Ads API. Please update to the latest version.

Creating

You can make a POST request to customconversions edge from the following paths:
When posting to this edge, a CustomConversion will be created.

Parameters

ParameterDescription
action_source_type
enum{app, chat, email, other, phone_call, physical_store, system_generated, website, business_messaging}

action source type the custom conversion is created from

advanced_rule
string

Advanced ruleset for the custom conversion being created allowing multiple sources.

custom_event_type
enum {ADD_PAYMENT_INFO, ADD_TO_CART, ADD_TO_WISHLIST, COMPLETE_REGISTRATION, CONTENT_VIEW, INITIATED_CHECKOUT, LEAD, PURCHASE, SEARCH, CONTACT, CUSTOMIZE_PRODUCT, DONATE, FIND_LOCATION, SCHEDULE, START_TRIAL, SUBMIT_APPLICATION, SUBSCRIBE, LISTING_INTERACTION, FACEBOOK_SELECTED, OTHER}

The custom event type of the conversion being created

default_conversion_value
float
Default value: 0

The default conversion value of the conversion being created

description
string

The description of the conversion being created

event_source_id
numeric string or integer

Event source ID, where event sources are pixel, offline event sets and so on. Aggregate custom conversion data from these sources.

name
string

The name of the conversion being created

Required
rule
string

Only count an event as a custom conversion if it fulfills this rule.

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: numeric string,
is_custom_event_type_predicted: numeric string,
}

Error Codes

ErrorDescription
100Invalid parameter
200Permissions error
2635You are calling a deprecated version of the Ads API. Please update to the latest version.
457The session has an invalid origin

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.