通过此解决方案,您可以根据地理位置定位类型来定制广告素材。如要为不同版位定制素材,请参阅版位素材定制。
我们提供了 3 种使用素材定制规则的 API,受众细分素材定制便是其中之一。请参阅素材定制规则。
市场营销 API V8.0 发布后,与地理位置无关的所有用例均已停用,您无法再将这些用例用于受众细分素材定制。现在,所有定位规则都必须在其定制参数中包含地理位置信息。但默认规则除外,此类规则无需包含地理位置信息。
您可根据地理位置定制广告。如要实现此操作,您可以创建包含定制参数的规则。支持的定制类型如下:
用于指定定制参数的格式与核心定位格式类似,详情请参阅定位。
通过素材定制规则,您可以将同时出现在特定地理位置的素材分为一组。每条规则都包含 1 个 customization_spec
,用于定义哪些地理位置的受众可在广告投放时查看这些素材。
您可在创建规则期间,为每条规则指定优先级序号。否则,我们将根据各条规则在您提供的规则列表中的位置,为这些规则指定优先级序号。例如,我们会为规则列表中的第 1 条规则指定优先级序号 1
。
为避免向不匹配任何规则的受众投放随机组合的素材,您应该设置默认规则。设置步骤如下:
customization_spec
。在规则末尾使用大括号的左端和右端,即 {}
。默认规则可为不符合任何一条优先级在其之前的规则的受众匹配创意素材。
在您的规则设置中,非默认规则应匹配大部分目标受众。
创建 asset_feed_spec
,然后将定制规则添加到 asset_customization_rules
字段。您最多可以添加 50 条定制规则。
您必须为每条规则指定 customization_spec
、priority
和素材标签。对于单条规则,customization_spec
所包含的条件不能超过 50 个。
素材信息库设置示例:
curl \ -F 'object_story_spec={ "page_id": "<YOUR_PAGE_ID>", "instagram_actor_id" : "<INSTAGRAM_ACTOR_ID>" }' \ -F 'asset_feed_spec={ "images": [ {"hash":"<IMAGE_HASH>", "adlabels":[{"name":"image1"}]}, {"hash":"<IMAGE_HASH>", "adlabels":[{"name":"image2"}]} ], "bodies": [ {"text":"Motor City Mission Corps", "adlabels":[{"name":"body1"}]} ], "titles": [ {"text":"Link title 1 goes here", "adlabels":[{"name":"title1"}]}, {"text":"Link title 2 goes here", "adlabels":[{"name":"title2"}]}, {"text":"Link title 3 goes here", "adlabels":[{"name":"title3"}]} ], "call_to_action_types":[ "LEARN_MORE" ], "descriptions": [ {"text":"Begin Your Adventure"} ], "ad_formats": [ "SINGLE_IMAGE" ], "link_urls": [ {"website_url":"https://www.example.com/"} ], "asset_customization_rules": [ { "customization_spec": { "geo_locations": { "countries": ["US"] } }, "image_label": {"name": "image1"}, "title_label": {"name": "title1"}, "priority": 1 }, { "customization_spec": { "geo_locations": { "countries": ["GB"] } }, "image_label": {"name": "image1"}, "title_label": {"name": "title2"}, "priority": 2 }, { "customization_spec": { "geo_locations": { "cities": [ {"key": "2481714"}, {"key": "2481868"} ] } }, "image_label": {"name": "image1"}, "title_label": {"name": "title3"}, "priority": 4 }, { "customization_spec": {}, "image_label": {"name":"image2"}, "title_label": {"name":"title1"}, "priority": 5 }]}' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives
查看素材信息库参数的所有可用选项。如需了解后续步骤,请参阅素材定制规则。
使用 /generatepreview
端点预览不同定位规则版本的广告。您还可以添加包含规则优先级序号的 dynamic_asset_label
字段,以查看特定语言版本的广告。
例如,如要预览优先级序号为 1 的规则,您可以使用以下代码:
curl -G --data-urlencode 'creative={ "object_story_spec": { "page_id": "<PAGE_ID>" }, "asset_feed_spec": { ... "asset_customization_rules": [ { "customization_spec": { "geo_locations": { "countries": ["US"] } }, "image_label": { "name": "image1" }, "title_label": { "name": "title1" }, "priority": 1 }, ... ] } }' -d 'ad_format=DESKTOP_FEED_STANDARD' -d 'dynamic_asset_label=1' -d 'access_token=<ACCESS_TOKEN>' https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/generatepreviews
特殊广告类别:投放住房、招聘和信贷广告的美国广告主,以及向美国定向投放广告的广告主,会受到不同限制。这些广告主必须遵守针对 asset_feed_spec
的特殊广告类别限制。详细了解特殊广告类别。
广告系列 > 目标验证:不支持 APP_ENGAGEMENT
。
支持的版位:支持所有版位。
版位定制:如果有任何一条规则使用了版位定制,则所有规则都应包含版位定制。
针对 asset_feed_spec
的限制与基于素材信息库且没有定制规则的广告的限制相同。但以下限制除外:
asset_customization_rule
只能显示一张图像或一个视频。ad_formats
:SINGLE_IMAGE
和 SINGLE_VIDEO
。每个素材信息库中只允许有 1 种 ad_format
。call_to_actions_types
中提供 1 种商品。asset_customization_rule
。