高级定位包括:
在自己的自定义受众和类似受众中可使用以上任意组合的高级定位选项。默认情况下,Facebook ORs 可用于将这些选项组合在一起。了解有关核心或基本定位的更多信息。
如果使用 flexible_spec,还必须在 targeting 下提供以下参数之一:
geo_locations(地理位置定位字段,可包括国家/地区、区域、城市和邮政编码)custom_audiencesproduct_audience_specsdynamic_audience_ids此定位适用于移动应用安装广告。
curl -X POST \
-F 'name=My AdSet' \
-F 'optimization_goal=REACH' \
-F 'billing_event=IMPRESSIONS' \
-F 'bid_amount=2' \
-F 'daily_budget=1000' \
-F 'campaign_id=<CAMPAIGN_ID>' \
-F 'targeting={
"geo_locations": {"countries":["US"]},
"user_device": ["Galaxy S6","One m9"],
"user_os": ["android"]
}' \
-F 'status=ACTIVE' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v24.0/act_<AD_ACCOUNT_ID>/adsets
可以组合不同类别,例如 iPod、iPad 或 iPhone。
这些类别不会互相排斥。如果选择 iOS,则不指定 user_device 即可定位所有运行 iOS 的设备,包括 iPhone 和 iPod。
对于品牌知名度目标广告,无法根据移动设备类型(如非智能手机或 Samsung)或 iOS 版本号定位,只能选择 Android、iOS 或所有手机。
| 字段 | 描述 |
|---|---|
类型:数组 | 必要。 以下 OS 选项表中的一个或多个值。可通过 有效值: |
类型:数组 | 非必要。 设备必须与 |
类型:数组 | 非必要。 要排除的设备。设备必须与 |
类型:数组 | 非必要。 允许输入的值为 |
| 字段 | 描述 |
|---|---|
类型:字符串 | iOS 设备,包括 iPhone、iPad 和 iPod |
类型:字符串 | 运行 OS x.x 和更高版本的 iOS 设备。 选项:2.0、3.0、4.0、4.3、5.0、6.0、7.0、8.0、9.0。示例: 对于 Meta 应用广告:
|
类型:字符串 | 运行 OS x.x 至 y.y 版本的 iOS 设备。 选项:2.0、3.0、4.0、4.3、5.0、6.0、7.0、8.0、9.0。 示例: |
类型:字符串 | Android 设备 |
类型:字符串 | 运行 x.x 和更高版本的 Android 设备。 选项:2.0、2.1、2.2、2.3、3.0、3.1、3.2、4.0、4.1、4.2、4.3、4.4、5.0、5.1、6.0、7.0、7.1 和 8.0。 示例: |
类型:字符串 | 运行 x.x 至 y.y 版本的 Android 设备。 选项:2.0、2.1、2.2、2.3、3.0、3.1、3.2、4.0、4.1、4.2、4.3、4.4、5.0、5.1、6.0、7.0、7.1 和 8.0。 示例: |
根据感情状况、教育状况、财务状况及生活纪事定位。
首先查询 life_events:
curl -G \
-d 'type=adTargetingCategory' \
-d 'class=life_events' \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v24.0/search
将以下代码添加到 targeting_spec 中:
curl -X POST \
-F 'name="My First AdSet"' \
-F 'daily_budget=10000' \
-F 'bid_amount=300' \
-F 'billing_event="IMPRESSIONS"' \
-F 'optimization_goal="REACH"' \
-F 'campaign_id="<AD_CAMPAIGN_ID>"' \
-F 'promoted_object={
"page_id": "<PAGE_ID>"
}' \
-F 'targeting={
"facebook_positions": [
"feed"
],
"age_max": 24,
"age_min": 20,
"behaviors": [
{
"id": 6002714895372,
"name": "All travelers"
}
],
"device_platforms": [
"mobile"
],
"genders": [
1
],
"geo_locations": {
"countries": [
"US"
],
"regions": [
{
"key": "4081"
}
],
"cities": [
{
"key": 777934,
"radius": 10,
"distance_unit": "mile"
}
]
},
"interests": [
{
"id": "<INTEREST_ID>",
"name": "<INTEREST_NAME>"
}
],
"life_events": [
{
"id": 6002714398172,
"name": "Newlywed (1 year)"
}
],
"publisher_platforms": [
"facebook",
"audience_network"
]
}' \
-F 'status="PAUSED"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v24.0/act_<AD_ACCOUNT_ID>/adsets
现在定位:
根据地点、人口统计数据、感情状况和兴趣定位的另一个示例如下:
curl \
-F 'name=My AdSet' \
-F 'optimization_goal=REACH' \
-F 'billing_event=IMPRESSIONS' \
-F 'bid_amount=2' \
-F 'daily_budget=1000' \
-F 'campaign_id=<CAMPAIGN_ID>' \
-F 'targeting={
"age_max": 43,
"age_min": 18,
"genders": [1],
"geo_locations": {
"regions": [{"key":"3847"}],
"cities": [
{
"key": "2430536",
"radius": 12,
"distance_unit": "mile"
}
]
},
"interests": [{"id":6003139266461,"name":"Movies"}],
"relationship_statuses": [
2,
3,
4
]
}' \
-F 'status=ACTIVE' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v24.0/act_<AD_ACCOUNT_ID>/adsets
| 名称 | 描述 |
|---|---|
类型:数组 | 代表感情状况的整数数组。
默认值: 限制:不能使用 |
类型:数组 | 带有“id”和可选“name”字段的对象数组: |
类型:数组 | 具有选填“编号”和“名称”字段的对象数组 |
类型:数组 | 带有“id”和可选“name”字段的对象数组 |
类型:数组 | 带有“id”和选填“name”字段的对象数组 |
可以使用定位搜索 API 获取所有选项。
| 名称 | 描述 |
|---|---|
类型:数组 | 学校、大学和学术机构。 限制:200 所学校。 示例: |
类型:数组 | 用于根据教育程度定位的整数数组。
|
类型:数组 | 整数数组。大学毕业时间 限制:允许输入的最早年份为 1980 年 |
类型:数组 | 专业。 示例: 限制:200 |
类型:数组 | 公司、组织或工作场所 示例: 限制:200 |
类型:数组 | 工作职位。 示例: 限制:200 |
可以创建自定义受众并添加用户。在加入或排除型定位中均可以使用此受众。在 custom_audiences 和 excluded_custom_audiences 中,均可最多加入 500 个自定义受众。
targeting_specs 中的 excluded_custom_audiences 与 APP_COMBINATION 自定义受众中的 excluded_custom_audiences 不同。
| 字段 | 描述 |
|---|---|
类型:数组 | 受众编号或受众对象的数组。 |
类型:数组 | 受众编号或受众对象的数组。 |
targeting:{
"geo_locations":{
"countries":["US"],
},
"age_min":25,
"age_max":40,
"custom_audiences":[{"id":6004192254512}]}
"excluded_custom_audiences":
[{"id":6004192252847}],
}此功能扩展了现有的位置定位功能,使广告主能够覆盖对同一国家/地区您所选的城市和地区具有旅游意向、购买意向或一般兴趣的用户。
targeting_automation 中 individual_setting 下的 geo 参数设置为 1。targeting_automation 中 individual_setting 下的 geo 参数设置为 0。"targeting": { "age_range": [25, 35], "geo_locations": { "countries": ["GB"], "cities": [{"key":"2430536", "radius":12, "distance_unit":"mile"}] }, "targeting_automation": { "individual_setting": { "geo": 1 } } }
在位置定位(例如 geo_locations 字段)中选择了城市或地区时,才能使用此功能。
curl -X POST \ -F 'name="advantage audience test"' \ -F 'is_autobid="true"' \ -F 'daily_budget="100"' \ -F 'billing_event="IMPRESSIONS"' \ -F 'campaign_id="<CAMPAIGN_ID>"' \ -F 'targeting={ "age_range": [25,35], "geo_locations": { "cities": [{"key":"2430536","radius":12,"distance_unit":"mile"}] }, "targeting_automation": {"individual_setting": {"geo": 1 } }}' \ -F 'access_token="<ACCESS_TOKEN>"' \ https://facebook.com/v24.0/act_<AD_ACCOUNT_ID>/adsets
如需详细了解此功能,请参阅如何覆盖对您选择的城市和地区感兴趣的用户。
目前,此功能仅向选定的广告主开放使用,但在未来几个月将逐步向所有广告主推出。
如要将年龄或性别用作建议,只需在 targeting_automation 字段中配置 individual_setting 参数即可。如果为此广告组定义了此设置,在检索此广告组时,系统也会返回此设置。
OUTCOME_SALES 和 APP_INSTALLS 目标。将 targeting_automation 中 individual_setting 下的 age 参数设置为 1。然后,在受众规范中添加 age_range 字段。
{ "geo_locations": { "countries": [ "US" ] }, "age_min": 18, "age_range": [25, 35], "targeting_automation": { "individual_setting": { "age": 1 } } }
将 targeting_automation 中 individual_setting 下的 gender 参数设置为 1。
{ "geo_locations": { "countries": [ "US" ] }, "age_min": 21, "genders":[1], "targeting_automation": { "individual_setting": { "gender": 1 } } }
curl -X POST \ -F 'name="advantage audience test"' \ -F 'is_autobid="true"' \ -F 'daily_budget="100"' \ -F 'billing_event="IMPRESSIONS"' \ -F 'campaign_id="<CAMPAIGN_ID>"' \ -F 'promoted_object={"pixel_id": "<PIXEL_ID>","custom_event_type": "PURCHASE"}' \ -F 'targeting={ "age_min": 18, "age_range": [25,35], "genders":[1], "geo_locations": { "countries": ["US"] }, "targeting_automation": {"individual_setting": {"age": 1, "gender": 1 } }}' \ -F 'access_token="<ACCESS_TOKEN>"' \ https://facebook.com/v24.0/act_<AD_ACCOUNT_ID>/adsets
{ "id": "<AD_SET_ID>", }
curl -X GET \ -d 'fields="targeting"' \ -d 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v24.0/<AD_SET_ID>/
{ "targeting": { "age_max": 65, "age_min": 19, "age_range": [ 25, 35 ], "genders": [ 1 ], "geo_locations": { "countries": [ "US" ], "location_types": [ "home", "recent" ] }, "targeting_relaxation_types": { "lookalike": 0, "custom_audience": 0 }, "targeting_automation": { "advantage_audience": 0, "individual_setting": { "age": 1, "gender": 1 } } }, "id": "<AD_SET_ID>", }
对于专为您的账户创建或授权的自定义定位,可以使用宽泛类别。加入烹饪类别和小企业主类别:
curl \
-F 'name=My AdSet' \
-F 'optimization_goal=REACH' \
-F 'billing_event=IMPRESSIONS' \
-F 'bid_amount=2' \
-F 'daily_budget=1000' \
-F 'campaign_id=<CAMPAIGN_ID>' \
-F 'targeting={
"geo_locations": {"countries":["US"]},
"user_adclusters": [
{"id":6002714885172,"name":"Cooking"},
{"id":6002714898572,"name":"Small Business Owners"}
]
}' \
-F 'status=ACTIVE' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v24.0/act_<AD_ACCOUNT_ID>/adsets
根据 BCT 及地点和人口统计数据定位:
curl \
-F 'name=My AdSet' \
-F 'optimization_goal=REACH' \
-F 'billing_event=IMPRESSIONS' \
-F 'bid_amount=2' \
-F 'daily_budget=1000' \
-F 'campaign_id=<CAMPAIGN_ID>' \
-F 'targeting={
"geo_locations": {"countries":["US"]},
"relationship_statuses": [2],
"user_adclusters": [{"id":6002714886772,"name":"Food & Dining"}]
}' \
-F 'status=ACTIVE' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v24.0/act_<AD_ACCOUNT_ID>/adsets
选项如下:
| 名称 | 描述 |
|---|---|
类型:数组 | BCT 群集的编号-名称对数组。如需有关检索 BCT 的信息,请参阅下文。限制:50 个编号-名称对。 |
若要查询此广告账户专用定位,请发出 HTTP GET 请求:
https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/broadtargetingcategories
响应是 JSON 键值对数组:
| 名称 | 描述 |
|---|---|
类型:长整型 | 使用宽泛类别编号作为广告定位规范 |
类型:字符串 | 宽泛类别的名称 |
类型:字符串 | 宽泛类别的父类别 |
类型:整数 | 宽泛类别的受众规模下限 |
类型:整数 | 宽泛类别的受众规模上限 |
类型:整数 | 6=BCT |
类型:字符串 | BCT |