Placement Asset Customization

This solution allows you to customize the creative assets displayed in different ad placements. You can maintain control over the creative, while using several different placements. Examples of assets are images and videos.

Create Ad Campaign and Set

Create a campaign following the same rules used to create a Dynamic Creative campaign. For the Ad Set, use the standard ad set endpoint and set is_dynamic_creative to false. This setup can also be used for Segment Asset Customization.

To create an ad set in a campaign with optimization_goal set to conversions:

curl \
  -F 'status=PAUSED'
  -F 'name=Sample Ad Set'
  -F 'campaign_id=<CAMPAIGN_ID>'
  -F 'optimization_goal=OFFSITE_CONVERSIONS'
  -F 'is_dynamic_creative=false'
  -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/<API_VERSION>/act_<AD_ACCOUNT_ID>/adsets

If you use asset_feed_spec with an ad set optimized for APP_INSTALLS, you should specify link_url, such as http://www.abc.com. The 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.

asset_feed_spec provides creative for Dynamic Creative, Placement Asset Customization and Segment Asset Customization. The spec's format is different for each solution.

Provide the Creative

Provide your creative through the asset_feed_spec. You can specify multiple creative assets for each asset type, including images, videos, headlines and link descriptions. To apply customization, set asset_customization_rules inside your asset_feed_spec. For each rule, add customization_spec and asset labels.

Property Name Description

customization_spec

type: see table below

Required

Placements where you want to display the assets.

image_label

format: {"name": "{LABEL_NAME}"}`

Optional, but required for SINGLE_IMAGE format.

Label of the image you want to display. It is attached to the image assets in asset_feed_spec.

video_label

format: {"name": "{LABEL_NAME}"}`

Optional, but required for SINGLE_VIDEO format.

Label of the video you want to display. It is attached to the video assets in asset_feed_spec.

Fields allowed in customization_spec:

Property Name Options

publisher_platforms

Required.

Facebook, Instagram, Audience_network, Messenger.

facebook_positions

Optional.

Feed.

instagram_positions

Optional.

Stream, Story.

audience_network_positions

Optional.

Classic.

device_platforms

Optional.

Mobile, Desktop.

messenger_positions

Optional.

Messenger_home, Story.

Example feed setup code:

curl 
  -F 'object_story_spec={
       "page_id": "<PAGE-ID>",
       "instagram_actor_id": "<INSTAGRAM-ID>",
     }' 
  -F 'asset_feed_spec={
    "videos": [
      {
        "adlabels": [
          {
            "name": "labelfb",
          }
        ],
        "video_id": "10154618295707554"
      },
      {
        "adlabels": [
          {
            "name": "labelig",
          }
        ],
        "video_id": "10154618298562554"
      }
    ],
    "bodies": [
      {
        "text": "Begin Your Adventure"
      }
    ],
    "link_urls": [
      {
        "website_url": "<WEBSITE_URL>",
        "display_url": "<DISPLAY_URL>"
      }
    ],
    "titles": [
      {
        "text": "Level Up"
      }
    ],
    "ad_formats": [
      "SINGLE_VIDEO"
    ],
    "call_to_action_types": [
      "WATCH_MORE"
    ],
    "descriptions": [
      {
        "text": ""
      }
    ],
    "asset_customization_rules": [
      {
        "customization_spec": {          
          "publisher_platforms": [
            "facebook"
          ],          
          "facebook_positions": [
            "feed",
            "instream_video"
          ]
        },
        "video_label": {
          "name": "labelfb",
        }
      },
      {
        "customization_spec": {          
          "publisher_platforms": [
            "instagram"
          ],          
          "instagram_positions": [
            "stream"           
          ]
        },
        "video_label": {
          "name": "labelig",
        }
      }
    ]
  }' 
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives

To verify, read asset_feed_spec from ad creative:

curl -G 
-d "access_token=<ACCESS_TOKEN>"
-d "fields=asset_feed_spec" 
https://graph.facebook.com/<API_VERSION>/<AD_CREATIVE_ID>

See all available options for Asset Feed Spec.

Create your Ad

When you create your ad, provide a reference to the creative ID. You can create multiple ads per 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

After creation:

This setup can also be used for Segment Asset Customization.