单次操作费用 (CPA) 支持您指定转化事件,并按照转化数量付费。以视频观看量为目标的单次操作费用称为单次观看费用 (CPV)。
单次操作费用的可替换项为优化千次展示费用 (oCPM),该费用按所产生的展示次数收费。
竞价是针对广告组定义的。下列字段必须遵守以下限制:
名称 | 描述 |
---|---|
| 定义您付费的操作。设置为 |
| 定义要优化的操作。设置为与您的 |
| 您对目标的出价,指定以“美分”为单位(至少 1 美分)。例如, |
| 对于针对联系人数量(包括 |
从 v9 开始,我们将对应用广告停用 CPA 计费,您无法再同时将付费事件和优化目标设置为 APP_INSTALLS
。推荐您改用 impression
付费事件。您仍然可以在 billing_event
或 optimization_goal
下指定 APP_INSTALLS
,但不能同时指定这两者。
请参阅广告组文档,了解允许对广告组进行的更新。
下方示例将创建使用 CPA 竞价的广告组。请注意,对于 CPA 广告组,您必须设置 promoted_object
。
curl -X POST \
-F 'name="A CPA Ad Set"' \
-F 'campaign_id="<AD_CAMPAIGN_ID>"' \
-F 'daily_budget=5000' \
-F 'start_time="2024-11-28T11:10:53-0800"' \
-F 'end_time="2024-12-05T11:10:53-0800"' \
-F 'billing_event="IMPRESSIONS"' \
-F 'optimization_goal="REACH"' \
-F 'bid_amount=1000' \
-F 'promoted_object={
"page_id": "<PAGE_ID>"
}' \
-F 'targeting={
"facebook_positions": [
"feed"
],
"geo_locations": {
"countries": [
"US"
]
}
}' \
-F 'user_os="iOS"' \
-F 'publisher_platforms="facebook"' \
-F 'device_platforms="mobile"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0/act_<AD_ACCOUNT_ID>/adsets
然后,您可以按照此处的创建流程创建广告,并将这些广告放入该广告组中。
将广告组的竞价更改为 CPA 竞价:
curl -X POST \
-F 'billing_event="IMPRESSIONS"' \
-F 'optimization_goal="LINK_CLICKS"' \
-F 'bid_amount=200' \
-F 'targeting={
"geo_locations": {
"countries": [
"US"
]
},
"facebook_positions": [
"feed"
]
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0/<AD_SET_ID>/
如要创建以视频观看量为目标的广告竞价 CPV 或 CPA,请先创建 objective=VIDEO_VIEWS
的广告系列。
curl -X POST \
-F 'name="Video Views campaign"' \
-F 'objective="OUTCOME_ENGAGEMENT"' \
-F 'status="PAUSED"' \
-F 'special_ad_categories=[]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v21.0/act_<AD_ACCOUNT_ID>/campaigns
然后在广告组层级设置以视频观看量为目标的 CPA bid_info
:
use FacebookAds\Object\AdSet;
use FacebookAds\Object\Fields\AdSetFields;
use FacebookAds\Object\Fields\TargetingFields;
use FacebookAds\Object\Targeting;
use FacebookAds\Object\Values\AdSetBillingEventValues;
use FacebookAds\Object\Values\AdSetOptimizationGoalValues;
$adset = new AdSet(null, 'act_<AD_ACCOUNT_ID>');
$adset->setData(array(
AdSetFields::NAME => 'A CPV Ad Set',
AdSetFields::CAMPAIGN_ID => <CAMPAIGN_ID>,
AdSetFields::DAILY_BUDGET => 500,
AdSetFields::START_TIME =>
(new \DateTime("+1 week"))->format(\DateTime::ISO8601),
AdSetFields::END_TIME =>
(new \DateTime("+2 week"))->format(\DateTime::ISO8601),
AdSetFields::BILLING_EVENT => AdSetBillingEventValues::VIDEO_VIEWS,
AdSetFields::OPTIMIZATION_GOAL => AdSetOptimizationGoalValues::VIDEO_VIEWS,
AdSetFields::BID_AMOUNT => 100,
AdSetFields::TARGETING => (new Targeting())->setData(array(
TargetingFields::GEO_LOCATIONS => array(
'countries' => array(
'US',
),
),
TargetingFields::PUBLISHER_PLATFORMS => array('facebook'),
TargetingFields::DEVICE_PLATFORMS => array('mobile'),
)),
));
$adset->create(array(
AdSet::STATUS_PARAM_NAME => AdSet::STATUS_PAUSED,
));
import time
from facebookads.adobjects.adset import AdSet
adset = AdSet(parent_id='act_<AD_ACCOUNT_ID>')
adset.update({
AdSet.Field.name: 'A CPV Ad Set',
AdSet.Field.campaign_id: <CAMPAIGN_ID>,
AdSet.Field.daily_budget: 500,
AdSet.Field.start_time: int(time.time()),
AdSet.Field.end_time: int(time.time() + 100000),
AdSet.Field.optimization_goal: AdSet.OptimizationGoal.video_views,
AdSet.Field.billing_event: AdSet.BillingEvent.video_views,
AdSet.Field.bid_amount: 100,
AdSet.Field.targeting: {
'geo_locations': {
'countries': ['US'],
},
Targeting.Field.publisher_platforms: ['facebook'],
Targeting.Field.device_platforms: ['mobile'],
},
})
adset.remote_create(params={
'status': AdSet.Status.paused,
})
AdSet adSet = new AdAccount(act_<AD_ACCOUNT_ID>, context).createAdSet()
.setName("A CPV Ad Set")
.setCampaignId(<CAMPAIGN_ID>)
.setDailyBudget(500L)
.setStartTime(start_time)
.setEndTime(end_time)
.setBillingEvent(AdSet.EnumBillingEvent.VALUE_VIDEO_VIEWS)
.setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_VIDEO_VIEWS)
.setBidAmount(100L)
.setTargeting(
new Targeting()
.setFieldDevicePlatforms(Arrays.asList(Targeting.EnumDevicePlatforms.VALUE_MOBILE))
.setFieldGeoLocations(
new TargetingGeoLocation()
.setFieldCountries(Arrays.asList("US"))
)
.setFieldPublisherPlatforms(Arrays.asList("facebook"))
)
.setStatus(AdSet.EnumStatus.VALUE_PAUSED)
.execute();
String ad_set_id = adSet.getId();
curl \
-F 'name=A CPV Ad Set' \
-F 'campaign_id=<CAMPAIGN_ID>' \
-F 'daily_budget=500' \
-F 'start_time=2018-02-06T04:45:29+0000' \
-F 'end_time=2018-02-13T04:45:29+0000' \
-F 'billing_event=VIDEO_VIEWS' \
-F 'optimization_goal=VIDEO_VIEWS' \
-F 'bid_amount=100' \
-F 'targeting={
"device_platforms": ["mobile"],
"geo_locations": {"countries":["US"]},
"publisher_platforms": ["facebook"]
}' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/adsets