Campaign budget optimization is a way of optimizing the distribution of a campaign budget across your campaign's ad sets. This means Facebook automatically and continuously finds the best available opportunities for results across your ad sets and distributes your campaign budget in real time to get those results.
For more information, see:
You can enable and disable campaign budget optimization for a campaign. If you disable it, you should provide budgets for all ad sets under the campaign.
Starting on Marketing API Version 7.0, spend_cap
has been deprecated for Campaign Budget Optimization. You should select lifetime_budget
, which already includes the spend cap information.
Field | Description |
---|---|
| The daily budget of the campaign. |
| The lifetime budget of the campaign. |
| Pacing type shared across the ad sets in this campaign. This field must be specified in the campaign level when using campaign budget optimization. Available options:
|
| Do not use for campaign budget optimization. See Ad Set Budget Rebalancing below. |
| The ad set budget to use for each ad set in the campaign. Use this to disable campaign budget optimization and to use ad set budgets. |
| Bid strategy of the campaign. Available options:
For |
| The bid amounts to use for ad sets in this campaign when the campaign bid strategy is set to |
The target_cost
bid strategy has been deprecated with Marketing API v9. Campaigns using this bid strategy will be paused, unless advertisers change it. Instead of target_cost
, we recommend that you use cost cap bidding.
See examples below to learn more about using these fields. For information on deprecated and new campaign-level optimization fields, see Ads Developer Blog, Introducing Marketing API, v3.0.
Field | Description |
---|---|
| Daily minimum spending target for the ad set, in your account's currency. You must specify a daily budget at the ad campaign level. This target does not guarantee you spend this amount, but Facebook makes a best effort to achieve it. To remove |
| Daily spend cap of the ad set defined in your account currency. You must specify the daily budget in the campaign. |
| Lifetime minimum spend target for an ad set defined in your account currency. You must specify the lifetime budget at the ad campaign level. This target is not a guarantee you achieve the target, but Facebook makes a best effort to reach it. To remove |
| Lifetime spend cap of the ad set defined in your account currency. You must specify the lifetime budget in the campaign. |
| Bid amount for this ad set. Only available when the Campaign level |
| Similar to an ad set budget, minimum Return on Ads Spend bidding, or Min ROAS, uses this to provide the ROAS floor, but you cannot use |
For example, create a campaign with campaign budget optimization with LOWEST_COST_WITHOUT_CAP
as bid_strategy
. The campaign has a 1000 USD daily budget with auto bid:
curl -F "name"="L3 With Daily Budget" -F "objective"="LINK_CLICKS" -F "daily_budget=100000" -F "bid_strategy"="LOWEST_COST_WITHOUT_CAP"* -F "access_token"="ACCESS_TOKEN" https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/campaigns
Create a campaign with campaign budget optimization and LOWEST_COST_WITH_BID_CAP
as bid_strategy
. The campaign has a 1000 USD lifetime budget:
curl -F "name"="L3 With Lifetime Budget" -F "objective"="LINK_CLICKS" -F "lifetime_budget=100000" -F "bid_strategy"="LOWEST_COST_WITH_BID_CAP"* -F "access_token"="ACCESS_TOKEN" https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/campaigns
Create an ad set with the maximum bid capped:
curl \ -F "campaign_id"="CAMPAIGN_ID" -F "name"="Test Adset No Budget" -F "status"="ACTIVE" -F "optimization_goal"="LINK_CLICKS" -F "targeting={'geo_locations':{'countries':['US']},'publisher_platforms': ['facebook','audience_network'],'facebook_positions':['feed'],'device_platforms':['mobile','desktop']}" -F "billing_event"="IMPRESSIONS" -F "access_token"="ACCESS_TOKEN" -F "bid_amount"=100 https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/adsets
Create a campaign with campaign budget optimization and LOWEST_COST_WITH_MIN_ROAS
as bid_strategy
. For example, the campaign has 1000 USD lifetime budget with Min ROAS set:
curl -F "name"="L3 With Lifetime Budget" -F "objective"="LINK_CLICKS" -F "lifetime_budget=100000" -F "bid_strategy=LOWEST_COST_WITH_MIN_ROAS" -F "access_token"="ACCESS_TOKEN" https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/campaigns
Then create an ad set with Return on Ads Spend minimums set:
curl \ -F 'name=minRoasBiddingDemo' \ -F 'optimization_goal=VALUE' \ -F 'promoted_object={"pixel_id": "<PIXEL_ID>", "custom_event_type": "PURCHASE"}' \ -F 'targeting={"geo_locations":{"countries":["US"]}}' \ -F 'campaign_id=<CAMPAIGN_ID>' \ -F 'status=PAUSED' \ -F 'start_time=2018-12-10T12:45:26-0700' \ -F 'bid_constraints={"roas_average_floor": 10000}' \ -F 'billing_event=IMPRESSIONS' \ -F 'access_token=ACCESS_TOKEN' \ https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/adsets
You can disable budget optimization from an ad campaign and add budget to ad sets. For example, the following code sample:
AD_SET_ID1
to 5000
AD_SET_ID1
to 7000
curl -F "adset_budgets"="[{adset_id: AD_SET_ID1, daily_budget: 5000}, {adset_id: AD_SET_ID2, daily_budget: 7000}]" -F "access_token"="ACCESS_TOKEN" https://graph.facebook.com/AD_VERSION/act_AD_ACCOUNT_ID/CAMPAIGN_ID
Or you can change your bid_strategy between LOWEST_COST
, COST_CAP
, and LOWEST_COST_WITH_BID_CAP
. For example, the following code sample sets:
LOWEST_COST_WITH_BID_CAP
AD_SET_ID1
to 1500
AD_SET_ID1
to 2000
curl -F "adset_bid_amounts"={"AD_SET_ID1": 1500, "AD_SET_ID2": 2000} -F "bid_strategy"="LOWEST_COST_WITH_BID_CAP" -F "access_token"="ACCESS_TOKEN" https://graph.facebook.com/VERSION/act_AD_ACCOUNT_ID/CAMPAIGN_ID
Define a bid strategy at the campaign level. All ad sets share the same bid strategy defined at the ad campaign level. You can still define different bid amounts or Return on Ads Spending minimums at the ad set level for non-auto bid campaigns. This is the same approach you can use for ad set budget. For LOWEST_COST_WITH_MIN_ROAS
, you cannot currently switch to other bid strategies after you create your campaign. See Bid Strategies.
Define the pacing_type
in the campaign level, not in the ad set level. See Pacing and Scheduling.
All optimization goals must be the same across ad sets under auto bid. Once you run ads in a campaign, you can not edit optimization goals. See Optimization Goals.
If your campaign has more than 70 ad sets and uses Campaign Budget Optimization (CBO), you are not able to edit your current bid strategy or turn off CBO. Learn more in the Business Help Center.