圖形 API 版本

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.

閱讀中

AdAccountCustomConversions

範例

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
}];
如果想瞭解如何使用圖形 API,請參閱我們的使用圖形 API 指南

參數

這個端點沒有任何參數。

欄位

由此關係連線進行的閱讀將回傳 JSON 格式結果:

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

data

CustomConversion 節點的清單。

paging

如需更多有關分頁的詳細資料,請參閱圖形 API 指南

Error Codes

錯誤說明
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.
2635You are calling a deprecated version of the Ads API. Please update to the latest version.
190Invalid OAuth 2.0 Access Token
200Permissions error

建立中

You can make a POST request to customconversions edge from the following paths:
發佈到此關係連線時,會建立 a CustomConversion

參數

參數說明
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
預設值: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

必填
rule
string

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

傳回類型

此端點支援寫入後讀取功能,並將讀取傳回類型表示為 id 的節點。
Struct {
id: numeric string,
is_custom_event_type_predicted: numeric string,
}

Error Codes

錯誤說明
100Invalid parameter
200Permissions error
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.

更新中

你無法在此端點執行此操作。

刪除中

你無法在此端點執行此操作。