그래프 API 버전

Ads Pixel Stats

읽기

AdsPixelStats

Graph API Explorer
GET /v19.0/{ads-pixel-id}/stats 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(
    '/{ads-pixel-id}/stats',
    '{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(
    "/{ads-pixel-id}/stats",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{ads-pixel-id}/stats",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{ads-pixel-id}/stats"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
그래프 API를 사용하는 방법을 알아보려면 그래프 API 사용 가이드를 읽어보세요.

매개변수

매개변수설명
aggregation
enum{browser_type, custom_data_field, device_os, device_type, event, host, match_keys, had_pii, pixel_fire, event_detection_method, url, event_value_count, url_by_rule, event_total_counts, event_source, event_processing_results}
기본 값: event

The aggregation to use for the stats. Default: event.
browser_type: Get the number of pixel fires per browser type, broken down by hour.
custom_data_field: Get the number of pixel fires for the top 100 custom data fields of an event broken down by hour.
device_os: Get the number of pixel fires per mobile device OS, broken down by hour.
device_type: Get the number of pixel fires per mobile device type, broken down by hour.
event: Get the number of pixel fires for the top 100 events broken down by hour.
host: Get the number of pixel fires for the top 10,000 hosts broken down by hour.
url: Get the number of pixel fires for the top 10,000 URLs broken down by hour. Please note that query parameters are stripped from the URLs.
pixel_fire: Get the number of pixel fires by hour.
event_total_counts: Get the number of pixel fires for all events over the entire time span.

end_time
datetime/timestamp
기본 값: 1715926594

The end time of the stats, in the format of Unix or ISO 8601 timestamp. You can get the data up to seven days from the request time.

event
string

Specify which event to aggregate on, when the aggregation is custom_data_field

event_source
string

Specify WEB_ONLY or SERVER_ONLY to filter the pixel events and stats

start_time
datetime/timestamp

The start time of the stats, in the format of Unix or ISO 8601 timestamp.

필드

이 에지로부터 읽는 경우 JSON 형식의 결과를 반환합니다:

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

data

AdsPixelStatsResult 노드 리스트.

paging

페이지 매김에 대한 자세한 정보는 그래프 API 가이드를 확인하세요.

오류 코드

오류설명
100Invalid parameter
368The action attempted has been deemed abusive or is otherwise disallowed
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

만들기

이 엔드포인트에서 수행할 수 없는 작업입니다.

업데이트 중

이 엔드포인트에서 수행할 수 없는 작업입니다.

삭제 중

이 엔드포인트에서 수행할 수 없는 작업입니다.