Dynamic Language Optimization

Dynamic language optimization (DLO) enables you to reach a multilingual population by experimenting with creatives in different languages. DLO automatically detects the language from each asset in your ad creative and finds the best creative for each ad impression. It then learns how these combinations perform across audiences to drive outcomes.

This helps improve your ROI by automatically finding the best creative across multiple languages. To create a campaign:

  1. Create Asset Feed
  2. Create a campaign
  3. Create an adset
  4. Create an ad in the adset with the asset feed in creative spec

For example, create an asset feed with different images and text fields grouped together by language, sharing the same link_url.

curl \
-F "images=[{'hash':'1cd8e1b5de5a76c24f989d94160bfb06'},{'hash':'2597fcfeab45e01d9393ce3fefd074e5'}]" \
-F "bodies=[{'text':'Begin Your Adventure', 'language_label': 'english'}, {'text':'Commencez votre aventure', 'language_label': 'french'}]" \
-F "titles=[{'text':'Pokemon', 'language_label': 'english'}, {'text':'Pokémon', 'language_label': 'french'}]" \
-F "descriptions=[{'text':'Play now'}]" \
-F "link_urls=[{'website_url':'<WEBSITE_URL>'}]" \
-F "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adlanguage_assets

On success, you get a new Asset Feed ID:

{"asset_feed_id":"<ID>"}

If it fails, you get an error. This means the asset feed does not meet the restrictions.

Restrictions

  • Asset Feed:
    • Maximum number of assets per type is 5
    • Title, description, and body text max length 255
    • No two assets of the same type can have the same language_label
    • Provide at least two types assets per group defined by a language_label
    • Define at least one group with a language_label
  • Images:
    • Recommended image specs: 1.9:1
    • Recommended image size: 1,200 x 628 pixels
  • Available Ad Objectives:
    • LINK_CLICKS
    • MOBILE_APP_INSTALLS

Asset Feed

This contains different creative elements like images, titles, and bodies. Manage asset feed for language optimization at:

POST https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adlanguage_assets

Parameters

Each of asset can have an optional language_label field. We group assets of different types are based on this label and they always appear together in the ad impression. Assets without language_label are free-form and Facebook combines them with any other assets.

Property NameDescriptionTypeRequired

images

Array of eligible images. Images provided in this array should be in the ad account's image library

array with list of {"url": "<IMAGE_URL>", "hash": "<IMAGE_HASH>", "url_tags": "<TAG>", "language_label": "<LABEL>"} where either url or hash required

Yes

bodies

Array of bodies containing primary message of ad.

array of list of {"text": "<BODY_TEXT>", "url_tags": "<TAG>", "language_label": "<LABEL>"}

Yes

titles

Array of titles. A short headline in the ad, generally shown next to a link, image or video.

array of list of "text": "<TITLE>", "url_tags": "<TAG>", "language_label": "<LABEL>"}

Yes

descriptions

Array of secondary description text, displayed less prominently than bodies or titles. Generally appears next to a link, image or video. If not specified, Facebook scrapes the link you provide to generate a description as we do for link ads.

array of list of {"text": "<DESCRIPTION>", "url_tags": "<TAG>", "language_label": "<LABEL>"}

Yes. Use empty string with single space for blank description.

link_urls

Array of link URLs

array of list of {"website_url": "<URL>", "language_label": "<LABEL>"}

Required for LINK_CLICKS

call_to_action_type

Call-to-action-type

"<CALL_TO_ACTION>"

No

Reading Asset Feeds

To verify you can use your Asset Feed, read it:

curl -G \
-d "access_token=<ACCESS_TOKEN>" \
-d 'fields=images,titles,bodies,descriptions,ad_formats' \
https://graph.facebook.com/<API_VERSION>/<ASSET_FEED_ID>

Create Campaigns

After you create an assset feed, create a campaign. This example is a LINK_CLICKS campaign.

curl \
-F "name=DLO Sample Campaign" \
-F "objective=LINK_CLICKS" \
-F "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/campaigns

This returns a campaign ID.

{"id":"23842500259110001"}

Create Ad Sets

Select targeting and create an ad set in your campaign. We recommend an audience size of at least 2 million for best performance:

curl \
-F 'billing_event=IMPRESSIONS' \
-F 'campaign_id=<code>23842500259110001</code>' \
-F 'lifetime_budget=500000' \
-F 'is_autobid=true' \
-F 'name="DLO Adset"' \
-F 'promoted_object={"page_id":<PAGE_ID>}' \
-F 'status=PAUSED' \
-F 'optimization_goal=LINK_CLICKS' \
-F 'targeting={
     "publisher_platforms":["facebook"],
     "geo_locations":{"countries":["US"]},
     "age_min":18,
     "age_max":65
   }'
-F 'end_time=1485618778' \
-F "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adsets

This returns a new adset ID

{"id":"23842500259260001"}

Restrictions for ad sets:

  • Supported placements:
    • publisher_platform=[“facebook”], facebook_positions=[“feed”] (desktop/mobile)
  • Budget recommendations:
    • lifetime_budget recommended to be at least 500 cents x (number of age_gender_bucket) x (max number of assets in one asset type).
    • Age buckets are 13-17, 18-24, 25-34, 35-44, 45-54, 55-64, 65+. Count thenumber of buckets your targeting covers.
    • When you bid daily_budget, apply the same limit divided by number of days.

Create Ads

Use the adset ID and asset feed ID:

curl \
-F 'adset_id=<ADSET_ID>' \
-F 'creative={
     "asset_feed_id":<ASSET_FEED_ID>,
     "object_story_spec":{"page_id":<PAGE_ID>}
   }' \
-F 'name="DLO Ad"' \
-F 'status=ACTIVE' \
-F "access_token=<ACCESS_TOKEN>" \
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/ads

You can view your campaign and ad sets in Power Editor and Ads Manager. Your ad is in Facebook Ad Review before it runs. Facebook checks that your ad meets Facebook Advertising Policies.