Asset Customization Rules

Use this solution to define which creative assets you want to display in your ads. At the time of ad creation, you can pick the combination of assets you want to display, based on your asset custom rules. Examples of creative assets are images, videos, text and body of an ad.

We offer three APIs that use asset customization rules:

Recommended Steps

  1. Create ad campaign and ad set.
  2. Provide the ad creative.
  3. Create your ad.
  4. Get insights and analyze your results.

Create Campaign and Ad Set

You can create a standard ad campaign for Asset Custom Rules, but there are limitations:

API Supported campaign objectives

Placement Asset Customization,

Segment Asset Customization

APP_INSTALLS, BRAND_AWARENESS, CONVERSIONS, LEAD_GENERATION, LINK_CLICKS, REACH, VIDEO_VIEWS.

Multi-Language Ads

APP_INSTALLS, BRAND_AWARENESS, CONVERSIONS, LINK_CLICKS, REACH, VIDEO_VIEWS.

For the Ad Set, use the standard ad set endpoint and set is_dynamic_creative to false.

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, Multi-Language Ads, and Segment Asset Customization. The spec's format is different for each solution.

Provide the ad creative

Provide your creative through asset_feed_spec. An asset feed is a collection of different creative elements, such as image, titles, bodies, and so on. You can specify multiple creative assets for each asset type.

Create an asset_feed_spec at /adcreative. To apply customization options, set asset_customization_rules inside your asset_feed_spec.

After setup, verify your asset_feed_spec:

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

When you create your ad, provide a reference to the creative ID. You can create multiple ads per ad set.

curl 
  -F 'name=Asset Custom Rule 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: