Quickstart for Ads based on Asset Feeds

This a step-by-step guide for ads based on asset feeds.

We have following use cases for asset feeds and each of them require a different type of asset feed:

High-Level Steps

  1. Create an ad campaign.
  2. Create an ad set.
  3. Provide ad creative and specify an asset_feed_spec. The asset_feed_spec refers to all the different creative assets you will deliver.
  4. Reference the ad creative ID in your ad.

Create a Campaign

Create an ad campaign the same way as a standard campaign.

Asset feed based ads supports seven different objectives:

  • objective — Must be either CONVERSIONS, APP_INSTALLS, LINK_CLICKS, BRAND_AWARENESS, LEAD_GENERATION, REACH, or VIDEO_VIEWS.
  • buying_type — Must be the default, which is AUCTION, or left blank.

For example, to create an ad campaign with the objective of CONVERSIONS:

curl \
  -F 'name=Dynamic Creative Sample Campaign'
  -F 'objective=CONVERSIONS'
  -F 'status=PAUSED'
  -F access_token=<ACCESS_TOKEN>
  https://graph.facebook.com/v3.2/act_<AD_ACCOUNT_ID>/campaigns   

Create an Ad Set

Create an ad set at the same endpoint you use to create a standard ad set. You can use all optimization_goals, billing_events, targeting, and promoted_objects which work with the parent ad campaign's objective as you would with a standard ad set. For more information see Validation

  • To enable Dynamic Creative Optimization, set is_dynamic_creative to true.
  • For Placement Asset Customization, set is_dynamic_creative to false.
  • For Segment Asset Customization, set is_dynamic_creative to false.

For example, to create an ad set in a campaign with the optimization_goal set to conversions:

curl \
  -F 'status=PAUSED'
  -F 'name=Dynamic Creative Ad Set'
  -F 'campaign_id=<CAMPAIGN_ID>'
  -F 'optimization_goal=OFFSITE_CONVERSIONS'
  -F 'is_dynamic_creative=true'
  -F 'lifetime_budget=1000'
  -F 'promoted_object={"pixel_id": "<PIXEL_ID>", "custom_event_type": "PURCHASE"}'
  -F 'billing_event=IMPRESSIONS'
  -F 'bid_strategy=LOWEST_COST_WITHOUT_CAP'
  -F 'targeting={"geo_locations": {"countries": ["US"]}}'
  -F 'start_time=2019-04-02'
  -F 'end_time=2019-04-09'
  -F access_token=<ACCESS_TOKEN>
  https://graph.facebook.com/v3.2/act_<AD_ACCOUNT_ID>/adsets

Note that if you are using asset feeds with an ad set optimized for APP_INSTALLS, you should specify link_url in asset_feed_spec, such as http://www.abc.com, and link_url should be the same as object_store_url in promoted_object. You should provide only one link_url parameter in asset_feed_spec.

Provide Ad Creative

When you provide your ad creative, specify asset_feed_spec, page_id, and instagram_actor_id if applicable. With asset_feed_spec, you can specify multiple assets per type in the ad creative.

Based on the type of ad you will need to define different variants of asset_feed_spec:

When you create your ad, the ad set must be empty, and you can only create one ad. You can however create additional Dynamic Creative ads in another, new ad set. Once you create an ad for Dynamic Creative, you cannot delete or archive it. Instead, you should delete or archive the parent ad set.

curl 
  -F 'name=Dynamic Creative Ad' 
  -F 'adset_id=ADSET_ID' 
  -F 'access_token=<ACCESS_TOKEN>' 
  -F 'creative={
      "creative_id": CREATIVE_ID,
   }' 
https://graph.facebook.com/API_VERSION/act_AD_ACCOUNT_ID/ads

On success:

Check Review Status

After you create your campaign, ad set, and ad, check your ad review status:

curl -G 
-d "access_token=ACCESS_TOKEN" 
-d 'fields=review_feedback' 
https://graph.facebook.com/API_VERSION/ADSET_ID

The result includes Dynamic Creative ad review feedback:

{
  "review_feedback":"[]",
  "id":"ADSET_ID"
}

An empty array means your ad passed review and displays when your ad set reaches its start date. Otherwise, if one of your creative assets does not meet review, you see:

{
  "review_feedback": {
    {"id":23842500258220001,"text":"Body 1","reason":["ALCOHOL"]},
    {"id":23842500258160001,"text":"Title 1","reason":["ALCOHOL"]},
    {"id":23842500258170001,"text":"Title 2","reason":["ALCOHOL"]}
  }",
  "id": "AD_ID"  
}