Graph API Version

Ad Study Objective

Reading

A lift study objective object

Example

Graph API Explorer
GET /v5.0/{ad-study-objective-id} 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-study-objective-id}',
    '{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-study-objective-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{ad-study-objective-id}",
    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:@"/{ad-study-objective-id}"
                                      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

ParameterDescription
breakdowns
list<enum {age, cell_id, gender, country}>
Default value: Vector

The set of breakdowns desired in the results

Fields

FieldDescription
id
numeric string

ID of the study objective

custom_attributes
list<string>

Detected custom attributes for this objective

is_primary
bool

Is this the primary objective of the study

last_updated_results
string

Latest updated date of the results

name
string

Name of the study objective

results
list<string>

Results of the study for this objective

type
string

The type of the objective

Edges

EdgeDescription

The set of pages to which this objective is measuring store visits

The ads pixels this objective is measuring

The applications that is objective is measuring

The custom conversions this objective is measuring

The offline conversion data sets associated with the lift study

The pixels that this objective is measuring

The partner study associated with the lift study

Validation Rules

ErrorDescription
100Invalid parameter

Creating

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

Parameters

ParameterDescription
adspixels
list<JSON or object-like arrays>

Ads pixels used for sales or converion tracking. Be sure to include the event_names that you want to measure.

id
numeric string or integer

Required
event_names
list<enum{AddPaymentInfo, AddToCart, AddToWishlist, CompleteRegistration, InitiateCheckout, Lead, Purchase, Search, ViewContent, Contact, CustomizeProduct, Donate, FindLocation, Schedule, StartTrial, SubmitApplication, Subscribe}>

applications
list<JSON or object-like arrays>

Applications that you wish to track mobile app installs or events from. Be sure to include the event_names that you want to measure.

id
numeric string or integer

Required
event_names
list<string>

customconversions
list<JSON or object-like arrays>

Custom conversions used for sales or converion tracking.

id
numeric string or integer

Required
event_names
list<string>

is_primary
boolean

A boolean to decide if this is the primary objective. Used for dashboarding.

name
string

A human readable string to help identify the objective.

offline_conversion_data_sets
list<JSON or object-like arrays>

The offline conversion data sets associated with the lift study

id
numeric string or integer

Required
event_names
list<string>

offsitepixels
list<JSON or object-like arrays>

Old conversion pixel for tracking online conversions.

id
numeric string or integer

Required
event_names
list<string>

product_sets
list<JSON or object-like arrays>

The product sets associated with the lift study

id
numeric string or integer

Required
event_names
list<string>

type
enum {SALES, NONSALES, MAE, TELCO, FTL, MAI, PARTNER, BRANDLIFT, BRAND}

An enum for the type of objective this is.

Return Type

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

Validation Rules

ErrorDescription
100Invalid parameter

Updating

You can update an AdStudyObjective by making a POST request to /{ad_study_objective_id}.

Parameters

ParameterDescription
adspixels
list<JSON or object-like arrays>

Ads pixels used for sales or converion tracking. Be sure to include the event_names that you want to measure.

id
numeric string or integer

Required
event_names
list<enum{AddPaymentInfo, AddToCart, AddToWishlist, CompleteRegistration, InitiateCheckout, Lead, Purchase, Search, ViewContent, Contact, CustomizeProduct, Donate, FindLocation, Schedule, StartTrial, SubmitApplication, Subscribe}>

applications
list<JSON or object-like arrays>

Applications that you wish to track mobile app installs or events from. Be sure to include the event_names that you want to measure.

id
numeric string or integer

Required
event_names
list<string>

customconversions
list<JSON or object-like arrays>

Custom conversions used for sales or converion tracking.

id
numeric string or integer

Required
event_names
list<string>

is_primary
boolean

A boolean to decide if this is the primary objective. Used for dashboarding.

name
string

A human readable string to help identify the objective.

offline_conversion_data_sets
list<JSON or object-like arrays>

The offline conversion data sets associated with the lift study

id
numeric string or integer

Required
event_names
list<string>

offsitepixels
list<JSON or object-like arrays>

Old conversion pixel for tracking online conversions.

id
numeric string or integer

Required
event_names
list<string>

product_sets
list<JSON or object-like arrays>

The product set associated with the lift study

id
numeric string or integer

Required
event_names
list<string>

type
enum {SALES, NONSALES, MAE, TELCO, FTL, MAI, PARTNER, BRANDLIFT, BRAND}

An enum for the type of objective this is. Different types of objectives generate different types of reports.

Return Type

This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
success: bool,
}

Validation Rules

ErrorDescription
100Invalid parameter

Deleting

You can delete an AdStudyObjective by making a DELETE request to /{ad_study_objective_id}.

Parameters

This endpoint doesn't have any parameters.

Return Type

Struct {
success: bool,
}

Validation Rules

ErrorDescription
100Invalid parameter