自动在 Facebook 上推广您的旅游商品库存。Facebook 的旅游广告利用消费者跨设备发出的意向信号,以独特的创意自动在 Facebook 上推广库存中的相关旅游商品。
本指南假定:
旅游广告支持多种定位策略。您可通过组合适当的受众与适当的商品系列来推动不同业务目标:
创建旅游广告时的操作过程与使用 API 设置其他任何类型的 Facebook 广告相同:
旅游广告使用 PRODUCT_CATALOG_SALES
目标。在广告系列级别的 promoted_object
中指定旅游目录:
use FacebookAds\Object\Campaign;
use FacebookAds\Object\Fields\CampaignFields;
use FacebookAds\Object\Values\CampaignObjectiveValues;
$campaign = new Campaign(null, 'act_<AD_ACCOUNT_ID>');
$campaign->setData(array(
CampaignFields::NAME => 'Product Catalog Sales Campaign',
CampaignFields::OBJECTIVE => CampaignObjectiveValues::PRODUCT_CATALOG_SALES,
CampaignFields::PROMOTED_OBJECT => array(
'product_catalog_id' => <PRODUCT_CATALOG_ID>,
),
));
$campaign->create(array(
Campaign::STATUS_PARAM_NAME => Campaign::STATUS_PAUSED,
));
from facebookads.adobjects.campaign import Campaign
campaign = Campaign(parent_id='act_<AD_ACCOUNT_ID>')
campaign[Campaign.Field.name] = 'Product Catalog Sales Campaign'
objective = Campaign.Objective.product_catalog_sales
campaign[Campaign.Field.objective] = objective
campaign[Campaign.Field.promoted_object] = {
'product_catalog_id': <PRODUCT_CATALOG_ID>,
}
campaign.remote_create(params={
'status': Campaign.Status.paused,
})
Campaign campaign = new AdAccount(act_<AD_ACCOUNT_ID>, context).createCampaign()
.setName("Product Catalog Sales Campaign Group")
.setObjective(Campaign.EnumObjective.VALUE_PRODUCT_CATALOG_SALES)
.setPromotedObject("{\"product_catalog_id\":\"" + <PRODUCT_CATALOG_ID> + "\"}")
.setStatus(Campaign.EnumStatus.VALUE_PAUSED)
.execute();
String campaign_id = campaign.getId();
curl \
-F 'name=Product Catalog Sales Campaign' \
-F 'objective=PRODUCT_CATALOG_SALES' \
-F 'promoted_object={"product_catalog_id":"<PRODUCT_CATALOG_ID>"}' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/campaigns
创建广告系列并获得 campaign_id
后,您可以创建广告组。广告组可定义广告的竞价和定位选项。
若要对网站或应用访客进行再营销,请使用与您所推广的商品系列类型相同的动态受众,即,向酒店受众推广酒店系列,向航班受众推广航班系列,向目的地受众推广目的地系列。
若要向曾在您网站及/或应用中有过购买行为的用户进行交叉销售和追加销售,请使用包含曾有过购买行为的用户的动态受众,并向他们推广其他目录的旅游选项;例如,定位购买过航班的受众,向其推广酒店系列或其他强调座位选择服务的航班系列。
Purchase
或 InitiateCheckout
)针对 OFFSITE_CONVERSIONS
进行优化。 use FacebookAds\Object\AdSet;
use FacebookAds\Object\Fields\AdSetFields;
use FacebookAds\Object\Fields\TargetingFields;
use FacebookAds\Object\Values\AdSetBillingEventValues;
use FacebookAds\Object\Values\AdSetOptimizationGoalValues;
$adset = new AdSet(null, 'act_<AD_ACCOUNT_ID>');
$adset->setData(array(
AdSetFields::NAME => 'Product Catalog Sales Adset',
AdSetFields::BID_AMOUNT => 3000,
AdSetFields::BILLING_EVENT => AdSetBillingEventValues::IMPRESSIONS,
AdSetFields::OPTIMIZATION_GOAL =>
AdSetOptimizationGoalValues::OFFSITE_CONVERSIONS,
AdSetFields::DAILY_BUDGET => 15000,
AdSetFields::CAMPAIGN_ID => <CAMPAIGN_ID>,
AdSetFields::TARGETING => array(
TargetingFields::GEO_LOCATIONS => array(
'countries' => array('US'),
),
TargetingFields::DYNAMIC_AUDIENCE_IDS => array(<DYNAMIC_AUDIENCE_ID>),
),
AdSetFields::PROMOTED_OBJECT => array(
'product_set_id' => <PRODUCT_SET_ID>,
),
));
$adset->create(array(
AdSet::STATUS_PARAM_NAME => AdSet::STATUS_PAUSED,
));
from facebookads.adobjects.adset import AdSet
from facebookads.adobjects.targeting import Targeting
adset = AdSet(parent_id=ad_account_id)
adset[AdSet.Field.name] = 'Product Catalog Sales Adset'
adset[AdSet.Field.bid_amount] = 3000
adset[AdSet.Field.billing_event] = AdSet.BillingEvent.impressions
adset[AdSet.Field.optimization_goal] = \
AdSet.OptimizationGoal.offsite_conversions
adset[AdSet.Field.daily_budget] = 15000
adset[AdSet.Field.campaign_id] = campaign_id
adset[AdSet.Field.targeting] = {
Targeting.Field.geo_locations: {
Targeting.Field.countries: ['US'],
},
Targeting.Field.dynamic_audience_ids: [
dynamic_audience_id,
],
}
adset[AdSet.Field.promoted_object] = {
'product_set_id': product_set_id,
}
adset.remote_create()
AdSet adSet = new AdAccount(act_<AD_ACCOUNT_ID>, context).createAdSet()
.setName("Product Catalog Sales Adset")
.setBidAmount(3000L)
.setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS)
.setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_OFFSITE_CONVERSIONS)
.setDailyBudget(15000L)
.setCampaignId(<CAMPAIGN_ID>)
.setTargeting(
new Targeting()
.setFieldDynamicAudienceIds(Arrays.asList(<DYNAMIC_AUDIENCE_ID>))
.setFieldGeoLocations(
new TargetingGeoLocation()
.setFieldCountries(Arrays.asList("US"))
)
)
.setPromotedObject("{\"product_set_id\":\"" + <PRODUCT_SET_ID> + "\"}")
.setStatus(AdSet.EnumStatus.VALUE_PAUSED)
.execute();
String ad_set_id = adSet.getId();
curl \
-F 'name=Product Catalog Sales Adset' \
-F 'bid_amount=3000' \
-F 'billing_event=IMPRESSIONS' \
-F 'optimization_goal=OFFSITE_CONVERSIONS' \
-F 'daily_budget=15000' \
-F 'campaign_id=<CAMPAIGN_ID>' \
-F 'targeting={
"geo_locations": {"countries":["US"]},
"dynamic_audience_ids": ["<DYNAMIC_AUDIENCE_ID>"]
}' \
-F 'promoted_object={"product_set_id":"<PRODUCT_SET_ID>"}' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/adsets
旅游广告不支持广告组中的内联动态受众定位参数。您必须首先单独创建受众。
您可在旅游广告的广告创意中使用模板标签。当 Facebook 展示您的广告时,我们会以用户的真实旅游选择替代模板标签。您可在广告本体中使用模板标签,也可在用户点击广告后显示的网址中使用。
使用 template_url_spec
字段以指定用户点击广告后显示的网址。如果您未提供,或我们在呈现广告时无法获得该网址,则会显示目录中的网址。对于航班广告,如果您未在目录中提供网址,则此字段为必填字段。
您可展示单件商品或是以轮播广告形式展示多件商品。对于单一商品广告,您可在轮播广告中展示同一商品的多张图片(假设您目录中的每件商品都含有多张图片)。您也可以结合展示静态和动态图卡。有关创意选项的更多信息,请参阅进阶赋能型目录广告 > 构建创意模板。
以下示例显示如何为酒店广告创建轮播广告创意。目的地广告和航班广告的设置方式与此类似。
use FacebookAds\Object\AdCreative;
use FacebookAds\Object\Fields\AdCreativeFields;
use FacebookAds\Object\Fields\AdCreativeLinkDataFields;
use FacebookAds\Object\Fields\AdCreativeObjectStorySpecFields;
use FacebookAds\Object\Values\AdCreativeCallToActionTypeValues;
use FacebookAds\Object\AdCreativeObjectStorySpec;
use FacebookAds\Object\AdCreativeLinkData;
$object_story_spec = new AdCreativeObjectStorySpec();
$object_story_spec->setData(array(
AdCreativeObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
AdCreativeObjectStorySpecFields::TEMPLATE_DATA =>
(new AdCreativeLinkData())->setData(array(
AdCreativeLinkDataFields::MESSAGE =>
'Book your upcoming stay in {{hotel.city}}',
AdCreativeLinkDataFields::NAME => '{{hotel.name | titleize}}',
AdCreativeLinkDataFields::LINK => '<LINK>',
AdCreativeLinkDataFields::DESCRIPTION =>
'{{hotel.description}}',
AdCreativeLinkDataFields::ADDITIONAL_IMAGE_INDEX => 0,
AdCreativeLinkDataFields::CALL_TO_ACTION => array(
'type' => AdCreativeCallToActionTypeValues::BOOK_TRAVEL,
),
)),
));
$creative = new AdCreative(null, 'act_<AD_ACCOUNT_ID>');
$creative->setData(array(
AdCreativeFields::NAME => 'Dynamic Ad Template Creative Sample',
AdCreativeFields::OBJECT_STORY_SPEC => $object_story_spec,
AdCreativeFields::TEMPLATE_URL_SPEC =>
array(
'config' => array(
'app_id' => '123456789012345',
),
'ios' => array(
'url' => 'example://home/hotel'.
'?id={{hotel.hotel_id | urlencode}}'.
'&startDate={{trip.checkin_date date_format:Y-m-d | urlencode}}'.
'&endDate={{trip.checkout_date date_format:Y-m-d | urlencode}}',
),
'web' => array(
'url' => 'http://www.example.com/hotel'.
'?id={{hotel.hotel_id | urlencode}}'.
'&startDate={{trip.checkin_date date_format:Y-m-d | urlencode}}'.
'&endDate={{trip.checkout_date date_format:Y-m-d | urlencode}}',
)
),
AdCreativeFields::PRODUCT_SET_ID => <PRODUCT_SET_ID>,
));
$creative->create();
from facebookads.adobjects.adcreative import AdCreative
from facebookads.adobjects.adcreativeobjectstoryspec \
import AdCreativeObjectStorySpec
story = AdCreativeObjectStorySpec()
story[story.Field.page_id] = <PAGE_ID>
story[story.Field.template_data] = {
'message': 'Book your upcoming stay in {{hotel.city}}',
'name': '{{hotel.name | titleize}}',
'link': '<LINK>',
'description': '{{hotel.description}}',
'additional_image_index': 0,
'call_to_action': {
'type': 'BOOK_TRAVEL',
},
}
creative = AdCreative(parent_id='act_<AD_ACCOUNT_ID>')
creative[AdCreative.Field.name] = 'Dynamic Ad Template Creative Sample'
creative[AdCreative.Field.object_story_spec] = story
template_url = ('http://www.example.com/hotel.aspx?id={{hotel.hotel_id}}'
'&startDate={{trip.checkin_date date_format:Y-m-d}}'
'&endDate={{trip.checkout_date date_format:Y-m-d}}')
creative[AdCreative.Field.template_url] = template_url
creative[AdCreative.Field.product_set_id] = <PRODUCT_SET_ID>
creative.remote_create()
curl \
-F 'name=Dynamic Ad Template Creative Sample' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"template_data": {
"additional_image_index": 0,
"call_to_action": {"type":"BOOK_TRAVEL"},
"description": "{{hotel.description}}",
"link": "<LINK>",
"message": "Book your upcoming stay in {{hotel.city}}",
"name": "{{hotel.name | titleize}}"
}
}' \
-F 'template_url_spec={
"config": {"app_id":"123456789012345"},
"ios": {
"url": "example:\/\/home\/hotel?id={{hotel.hotel_id | urlencode}}&startDate={{trip.checkin_date date_format:Y-m-d | urlencode}}&endDate={{trip.checkout_date date_format:Y-m-d | urlencode}}"
},
"web": {
"url": "http:\/\/www.example.com\/hotel?id={{hotel.hotel_id | urlencode}}&startDate={{trip.checkin_date date_format:Y-m-d | urlencode}}&endDate={{trip.checkout_date date_format:Y-m-d | urlencode}}"
}
}' \
-F 'product_set_id=<PRODUCT_SET_ID>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/adcreatives
如要使用追加销售选项,例如向购买机票的受众追加销售选座或优先登机服务:
PURCHASE
事件来提供受众。recommender_settings
中,将 PURCHASE
事件指定为推荐广告。curl \ -F 'name=Advantage+ Catalog Ad Template Creative Up-sell Sample' \ -F 'object_story_spec={ "page_id": "<PAGE_ID>", "template_data": { "additional_image_index": 0, "call_to_action": {"type":"LEARN_MORE"}, "description": "{{flight.description}}", "link": "<LINK>", "message": "Book extra leg room on your flight from {{flight.origin_city}} to {{flight.destination_city}}", } }' \ -F 'template_url_spec={ "config": {"app_id":"<APP_ID>"}, "ios": { "url": "example:\/\/home\/flight?id={{flight.origin_airport}}&startDate={{trip.departing_departure_date date_format:Y-m-d | urlencode}}&endDate={{trip.returning_departure_date date_format:Y-m-d | urlencode}}" }, "web": { "url": "http:\/\/www.example.com\/flight?id={{flight.origin_airport}}&startDate={{trip.checkin_date date_format:Y-m-d | urlencode}}&endDate={{trip.returning_departure_date date_format:Y-m-d | urlencode}}" } }' \ -F 'product_set_id=<FLIGHT_SET_ID>' \ -F 'recommender_settings'={"preferred_events":["Purchase"]}\ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/VERSION/act_<AD_ACCOUNT_ID>/adcreatives
叠加特效允许广告主为进阶赋能型目录广告中的每项商品添加定价信息(直销价或折扣价)。
您可根据广告组中所用的目录类型,使用以下叠加类型:
price
、strikethrough
和 % off
price
price
注意:以上叠加选项支持各目录类型所有与价格相关的模板标签。如要查看每个目录类型的模板标签,请参阅酒店、目的地和航班。
系统会从信息库的“价格”和“优惠价”列动态提取定价信息。广告主可从以下自定义方案中选择进阶赋能型目录广告叠加特效:
TOP_LEFT
、TOP_RIGHT
、BOTTOM_LEFT
和 BOTTOM_RIGHT
。若为三角形,则仅支持 TOP_LEFT
和 TOP_RIGHT
。price
、strikethrough
和 % off
。注意:strikethrough
和 % off
仅适用于酒店。详细了解如何添加叠加特效。
curl \ -F 'name=Test Templates in Overlay' \ -F 'object_story_spec={ "page_id": "<PAGE_ID>", "template_data": { "description": "Description", "link": "<LINK>", "name": "Name: {{hotel.name}}", "message" : "Come visit {{hotel.city}}!", "image_overlay_spec": { "overlay_template":"pill_with_text", "text_font":"droid_serif_regular", "text_type":"strikethrough_price", "position":"top_left", "theme_color":"background_e50900_text_ffffff", "float_with_margin":"true", "text_template_tags": ["{{hotel.price round}}", "{{hotel.sale_price round}}"], } } }' \ -F 'product_set_id=<PRODUCT_SET_ID>' \ -F 'template_url=http://www.example.com' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v2.10/act_897427477067185/adcreatives
若要创建广告,请使用 ad_set_id
和 creative_id
。
curl -X POST \
-F 'name="My Ad"' \
-F 'adset_id="<AD_SET_ID>"' \
-F 'creative={
"creative_id": "<CREATIVE_ID>"
}' \
-F 'status="PAUSED"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0/act_<AD_ACCOUNT_ID>/ads
您可使用广告预览 API 生成进阶赋能型目录素材的预览。加入 product_item_ids
参数,以指定预览中显示哪些目录商品。
您可使用广告预览 API 生成广告预览。加入 product_item_ids
参数以指定预览中显示哪些目录商品,加入 start_date
和 end_date
以指定具体日期。
curl -X GET \
-d 'ad_format="DESKTOP_FEED_STANDARD"' \
-d 'product_item_ids=[
"<PRODUCT_ITEM_ID>"
]' \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0/<CREATIVE_ID>/previews
字段名称和类型 | 描述 |
---|---|
类型: |
|
类型: | 呈现包含用户意向信号的预览,例如 2016-12-24。
|
类型: | 呈现包含用户意向信号的预览,例如 2017-01-01。
|
如需获取旅游对象(如酒店)的广告成效分析,请对 /insights
执行 GET
调用。注意:请记住向 breakdown
参数中添加 product_id
。
对于酒店和目的地,将针对每个 hotel_id
或 destination_id
显示 product id
细分数据。对于航班,product id
细分数据将显示 origin_airport:destination_airport
。
如需检索进阶赋能型目录广告的评论或“赞”,请使用动态帖子 API。