행동당 비용 광고

행동당 비용(CPA)을 사용하면 전환 이벤트를 지정하고 전환 수를 기준으로 비용을 지불할 수 있습니다. 동영상 조회에 대한 CPA는 CPV라고도 합니다.

CPA 대신 노출 수를 기준으로 비용을 지불하는 oCPM을 사용할 수도 있습니다.

원리

입찰가는 광고 세트에 대해 정의됩니다. 이러한 필드는 아래 제한 사항을 따라야 합니다.

이름 설명

billing_event

비용을 지불하는 행동을 정의합니다. LINK_CLICKS, PAGE_LIKES, OFFER_CLAIMS, THRUPLAY 중 하나로 설정합니다.

optimization_goal

최적화하는 행동을 정의합니다. billing_event, LINK_CLICKS, PAGE_LIKES, POST_ENGAGEMENT, OFFER_CLAIMS, THRUPLAY 중 하나와 동일한 값으로 설정합니다.

bid_amount

목표에 설정하는 값(센트 단위, 최소값: 1센트)입니다. 예를 들어 bid_amount=150은 해당 행동에 1.50달러를 입찰하고 싶다는 의미입니다. 이는 해당 행동에 대해 지불할 의사가 있는 최대값을 나타내야 합니다.

targeting

page_like를 포함하여 연결에 대해 최적화하는 광고의 경우 이미 랜딩 페이지 개체에 대해 일회성 전환을 완료한 사용자를 제외하도록 타게팅에 excluded_connections 필드를 사용해야 합니다. 적절히 제외된 연결을 지정하는 방법은 아래 섹션의 예를 참조하세요.

제한 사항

  • 오프사이트 링크 클릭 행동은 오프사이트 도메인 및 Facebook에서 호스팅하는 앱 도메인 링크의 경우에 대해서만 지원됩니다.
  • 동영상 조회 광고가 아닌 광고의 CPA 청구는 클릭을 통한 전환(1일)을 기반으로 합니다. CPV 또는 동영상 조회에 대한 CPA 광고는 10초 이상 재생된 동영상 조회를 기준으로 청구됩니다.
  • 또한 오프사이트 링크 클릭 청구는 광고 내(인라인) 링크 클릭으로 제한됩니다.

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-28T10:28:02-0800"' \ -F 'end_time="2024-12-05T10:28:02-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
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const AdAccount = bizSdk.AdAccount; const AdSet = bizSdk.AdSet; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<AD_ACCOUNT_ID>'; const api = bizSdk.FacebookAdsApi.init(access_token); const showDebugingInfo = true; // Setting this to true shows more debugging info. if (showDebugingInfo) { api.setDebug(true); } const logApiCallResult = (apiCallName, data) => { console.log(apiCallName); if (showDebugingInfo) { console.log('Data:' + JSON.stringify(data)); } }; let fields, params; fields = [ ]; params = { 'name' : 'A CPA Ad Set', 'campaign_id' : '<adCampaignLinkClicksID>', 'daily_budget' : '5000', 'start_time' : '2024-07-27T00:47:13-0700', 'end_time' : '2024-08-03T00:47:13-0700', 'billing_event' : 'IMPRESSIONS', 'optimization_goal' : 'REACH', 'bid_amount' : '1000', 'promoted_object' : {'page_id':'<pageID>'}, 'targeting' : {'facebook_positions':['feed'],'geo_locations':{'countries':['US']}}, 'user_os' : 'iOS', 'publisher_platforms' : 'facebook', 'device_platforms' : 'mobile', }; const adsets = (new AdAccount(id)).createAdSet( fields, params ); logApiCallResult('adsets api call complete.', adsets);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\AdAccount; use FacebookAds\Object\AdSet; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<AD_ACCOUNT_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'name' => 'A CPA Ad Set', 'campaign_id' => '<adCampaignLinkClicksID>', 'daily_budget' => '5000', 'start_time' => '2024-07-27T00:47:13-0700', 'end_time' => '2024-08-03T00:47:13-0700', 'billing_event' => 'IMPRESSIONS', 'optimization_goal' => 'REACH', 'bid_amount' => '1000', 'promoted_object' => array('page_id' => '<pageID>'), 'targeting' => array('facebook_positions' => array('feed'),'geo_locations' => array('countries' => array('US'))), 'user_os' => 'iOS', 'publisher_platforms' => 'facebook', 'device_platforms' => 'mobile', ); echo json_encode((new AdAccount($id))->createAdSet( $fields, $params )->exportAllData(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.adset import AdSet from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'name': 'A CPA Ad Set', 'campaign_id': '<adCampaignLinkClicksID>', 'daily_budget': '5000', 'start_time': '2024-07-27T00:47:13-0700', 'end_time': '2024-08-03T00:47:13-0700', 'billing_event': 'IMPRESSIONS', 'optimization_goal': 'REACH', 'bid_amount': '1000', 'promoted_object': {'page_id':'<pageID>'}, 'targeting': {'facebook_positions':['feed'],'geo_locations':{'countries':['US']}}, 'user_os': 'iOS', 'publisher_platforms': 'facebook', 'device_platforms': 'mobile', } print AdAccount(id).create_ad_set( fields=fields, params=params, )
import com.facebook.ads.sdk.*; import java.io.File; import java.util.Arrays; public class SAMPLE_CODE_EXAMPLE { public static void main (String args[]) throws APIException { String access_token = \"<ACCESS_TOKEN>\"; String app_secret = \"<APP_SECRET>\"; String app_id = \"<APP_ID>\"; String id = \"<AD_ACCOUNT_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new AdAccount(id, context).createAdSet() .setName(\"A CPA Ad Set\") .setCampaignId(\"<adCampaignLinkClicksID>\") .setDailyBudget(5000L) .setStartTime(\"2024-07-27T00:47:13-0700\") .setEndTime(\"2024-08-03T00:47:13-0700\") .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_REACH) .setBidAmount(1000L) .setPromotedObject(\"{\\"page_id\\":\\"<pageID>\\"}\") .setTargeting( new Targeting() .setFieldFacebookPositions(Arrays.asList(\"feed\")) .setFieldGeoLocations( new TargetingGeoLocation() .setFieldCountries(Arrays.asList(\"US\")) ) ) .setParam(\"user_os\", \"iOS\") .setParam(\"publisher_platforms\", \"facebook\") .setParam(\"device_platforms\", \"mobile\") .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end ad_account = FacebookAds::AdAccount.get(id) adsets = ad_account.adsets.create({ name: 'A CPA Ad Set', campaign_id: '<adCampaignLinkClicksID>', daily_budget: '5000', start_time: '2024-07-27T00:47:13-0700', end_time: '2024-08-03T00:47:13-0700', billing_event: 'IMPRESSIONS', optimization_goal: 'REACH', bid_amount: '1000', promoted_object: {'page_id':'<pageID>'}, targeting: {'facebook_positions':['feed'],'geo_locations':{'countries':['US']}}, user_os: 'iOS', publisher_platforms: 'facebook', device_platforms: 'mobile', })

그러면 여기의 생성 플로에 따라 광고를 만들고 이 광고 세트에 추가할 수 있습니다.

업데이트

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>/
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const AdSet = bizSdk.AdSet; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<AD_SET_ID>'; const api = bizSdk.FacebookAdsApi.init(access_token); const showDebugingInfo = true; // Setting this to true shows more debugging info. if (showDebugingInfo) { api.setDebug(true); } const logApiCallResult = (apiCallName, data) => { console.log(apiCallName); if (showDebugingInfo) { console.log('Data:' + JSON.stringify(data)); } }; let fields, params; fields = [ ]; params = { 'billing_event' : 'IMPRESSIONS', 'optimization_goal' : 'LINK_CLICKS', 'bid_amount' : '200', 'targeting' : {'geo_locations':{'countries':['US']},'facebook_positions':['feed']}, }; const sample_code = (new AdSet(id)).update( fields, params ); logApiCallResult('sample_code api call complete.', sample_code);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\AdSet; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<AD_SET_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'billing_event' => 'IMPRESSIONS', 'optimization_goal' => 'LINK_CLICKS', 'bid_amount' => '200', 'targeting' => array('geo_locations' => array('countries' => array('US')),'facebook_positions' => array('feed')), ); echo json_encode((new AdSet($id))->updateSelf( $fields, $params )->exportAllData(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.adset import AdSet from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_SET_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'billing_event': 'IMPRESSIONS', 'optimization_goal': 'LINK_CLICKS', 'bid_amount': '200', 'targeting': {'geo_locations':{'countries':['US']},'facebook_positions':['feed']}, } print AdSet(id).update( fields=fields, params=params, )
import com.facebook.ads.sdk.*; import java.io.File; import java.util.Arrays; public class SAMPLE_CODE_EXAMPLE { public static void main (String args[]) throws APIException { String access_token = \"<ACCESS_TOKEN>\"; String app_secret = \"<APP_SECRET>\"; String app_id = \"<APP_ID>\"; String id = \"<AD_SET_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new AdSet(id, context).update() .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_LINK_CLICKS) .setBidAmount(200L) .setTargeting( new Targeting() .setFieldFacebookPositions(Arrays.asList(\"feed\")) .setFieldGeoLocations( new TargetingGeoLocation() .setFieldCountries(Arrays.asList(\"US\")) ) ) .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_SET_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end ad_set = FacebookAds::AdSet.get(id) ad_set.billing_event = 'IMPRESSIONS'ad_set.optimization_goal = 'LINK_CLICKS'ad_set.bid_amount = '200'ad_set.targeting = {'geo_locations':{'countries':['US']},'facebook_positions':['feed']} ad_set.save

CPV 예시

광고 입찰 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
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const AdAccount = bizSdk.AdAccount; const Campaign = bizSdk.Campaign; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<AD_ACCOUNT_ID>'; const api = bizSdk.FacebookAdsApi.init(access_token); const showDebugingInfo = true; // Setting this to true shows more debugging info. if (showDebugingInfo) { api.setDebug(true); } const logApiCallResult = (apiCallName, data) => { console.log(apiCallName); if (showDebugingInfo) { console.log('Data:' + JSON.stringify(data)); } }; let fields, params; fields = [ ]; params = { 'name' : 'Video Views campaign', 'objective' : 'OUTCOME_ENGAGEMENT', 'status' : 'PAUSED', 'special_ad_categories' : [], }; const campaigns = (new AdAccount(id)).createCampaign( fields, params ); logApiCallResult('campaigns api call complete.', campaigns);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\AdAccount; use FacebookAds\Object\Campaign; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<AD_ACCOUNT_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'name' => 'Video Views campaign', 'objective' => 'OUTCOME_ENGAGEMENT', 'status' => 'PAUSED', 'special_ad_categories' => array(), ); echo json_encode((new AdAccount($id))->createCampaign( $fields, $params )->exportAllData(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.campaign import Campaign from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'name': 'Video Views campaign', 'objective': 'OUTCOME_ENGAGEMENT', 'status': 'PAUSED', 'special_ad_categories': [], } print AdAccount(id).create_campaign( fields=fields, params=params, )
import com.facebook.ads.sdk.*; import java.io.File; import java.util.Arrays; public class SAMPLE_CODE_EXAMPLE { public static void main (String args[]) throws APIException { String access_token = \"<ACCESS_TOKEN>\"; String app_secret = \"<APP_SECRET>\"; String app_id = \"<APP_ID>\"; String id = \"<AD_ACCOUNT_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new AdAccount(id, context).createCampaign() .setName(\"Video Views campaign\") .setObjective(Campaign.EnumObjective.VALUE_OUTCOME_ENGAGEMENT) .setStatus(Campaign.EnumStatus.VALUE_PAUSED) .setParam(\"special_ad_categories\", \"[]\") .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end ad_account = FacebookAds::AdAccount.get(id) campaigns = ad_account.campaigns.create({ name: 'Video Views campaign', objective: 'OUTCOME_ENGAGEMENT', status: 'PAUSED', special_ad_categories: [], })

그런 다음, 광고 세트에서 동영상 조회용 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