Dynamic media allows advertisers to deliver video assets from their catalog in their Advantage+ catalog ads.
You will need:
See the Advantage+ catalog ads documentation to learn more about how they work.
3g2
, 3gp
, 3gpp
, asf
, avi
, dat
, divx
, dv
, f4v
, flv
, gif
, m2ts
, m4v
, mkv
, mod
, mov
, mp4
, mpe
, mpeg
, mpeg4
, mpg
, mts
, nsv
, ogm
, ogv
, qt
, tod
, ts
, vob
, or wmv
.video_fetch_status
may show as NO_STATUS
until the video is used in an ad or another event that requires the video is triggered.There are 3 ways to add videos to product items in your catalog: catalog feed file, catalog batch API, and manual upload via your Commerce Manager.
Using the catalog feed file, you can provide <= 30,000 products with product-level video URLs.
You can use one of the following processes to implement your catalog feed file.
Optional:
Instead of the video[0].url column, you can create a column called video
and add tags to the video. The video
column can contain multiple video URLs per product and multiple tags per URL encoded in a JSON format. If you choose to use a tag column for the product set filter, you’ll need to add this column to the feed file too.
[{"url": "http://www.jaspersmarket-example1.com/video-file.avi", "tag": ["Optional Tag1", "Optional Tag2"]},{"url": "http://www.jaspersmarket-example2.com/video-file.avi", "tag": ["Optional Tag1", "Optional Tag2"]}]
For an XML feed, video URLs can be added using <video>
tags like:
<video> <url>https://{URL1}</url> <tag>video_product_set1</tag> <tag>video_product_set2 </tag> </video> <video> <url>https://{URL2}</url> <tag>video_product_set1</tag> </video>
Updates to product items are supported using the /{product_catalog_id}/items_batch
endpoint. You can make a POST
API call with the video
field, which is an array of URLs.
curl \ -d @body.json \ -H "Content-Type: application/json" > cat body.json { "access_token": "<ACCESS_TOKEN>", "item_type": "PRODUCT_ITEM", "requests": [ { "method": "CREATE", "data": { "id": "retailer-2", "availability": "in stock", "brand": "BrandName", "google_product_category": "t-shirts", "description": "product description", "image_link": "http://www.images.example.com/t-shirts/1.png", "title": "product name", "price": "10.00 USD", "shipping": [ { "shipping_country": "US", "shipping_region": "CA", "shipping_service": "service", "shipping_price_value": "10", "shipping_price_currency": "USD" } ], "condition": "new", "link": "http://www.images.example.com/t-shirts/1.png", "item_group_id": "product-group-1", "video": [ {"url": "http://www.jaspersmarket-example1.com/video-file.avi", "tag": ["Optional Tag1", "Optional Tag2"]}, {"url": "http://www.jaspersmarket-example2.com/video-file.avi", "tag": ["Optional Tag1", "Optional Tag2"]} ] } }, { "method": "UPDATE", "data": { "availability": "out of stock", "id": "retailer-3", "video": [ { "url": "https://yourvideo.com/demo.mp4?q=1411" }, { "url": "https://yourvideo.com/demo.mp4?q=1421" } ] } } ] }
When creating ads, there are two types of options that leverage video from the catalog:
Note: Selecting dynamic media type with the API is similar to selecting the Dynamic Media options in Ads Manager.
When creating an ad creative object with the act_<AD_ACCOUNT_ID>/adcreatives
endpoint
media_type_automation
key to be OPT_IN
.curl \ -F 'name=Dynamic Media Ad Creative' \ -F 'object_story_spec={ ... }' \ -F 'degrees_of_freedom_spec={ "creative_features_spec": { "media_type_automation": { "enroll_status": "OPT_IN" } } }' \ -F 'product_set_id=<PRODUCT_SET_ID>' \ https://graph.facebook.com/v18.0/act_<AD_ACCOUNT_ID>/adcreatives
Or when creating an ad object with the act_<AD_ACCOUNT_ID>/ads
endpoint, set the media_type_automation
key to be OPT_IN
.
curl \
-F 'adset_id=<ADSET_ID>' \
-F 'creative={
"name": "Dynamic Media Ad Creative",
"object_story_spec": {
...
},
"degrees_of_freedom_spec": {
"creative_features_spec": {
"media_type_automation": {
"enroll_status": "OPT_IN"
}
}
},
"product_set_id": "<PRODUCT_SET_ID>"
}' \
https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/ads
Example Creative Spec for Collection with Dynamic Media
curl \
-F 'name=Dynamic Media Ad Creative' \
-F 'object_story_spec={
"template_data": {
...
"format_option": "collection_video",
"link": "https://fb.com/canvas_doc/<CANVAS_ID>",
"message": "Your Collection Ad",
...
}
}' \
-F 'degrees_of_freedom_spec={
"creative_features_spec": {
"media_type_automation": {
"enroll_status": "OPT_IN"
}
}
}' \
-F 'product_set_id=<PRODUCT_SET_ID>' \
https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/adcreatives
In the object_story_spec
, change format_option
to single_video
. This is only available for single image/video format.
curl \
-F 'adset_id=<ADSET_ID>' \
-F 'creative={
"name": "Dynamic Media Ad Creative",
"object_story_spec": {
"page_id": "<PAGE_ID>",
"template_data": {
...
"format_option": "single_video",
...
}
},
"product_set_id": "<PRODUCT_SET_ID>"
}' \
https://graph.facebook.com/v21.0
/act_<AD_ACCOUNT_ID>/ads