Page Summary
-
Check the budget's
reference_countbefore removing it to ensure noENABLEDorPAUSEDcampaigns are using it. -
A
reference_countgreater than 0 indicates the budget is still in use byENABLEDorPAUSEDcampaigns. -
You can find the reference count by querying
campaign_budget.reference_countfor a specific budget ID. -
To remove an unused budget, send a
removeoperation with the campaign budget's resource name. -
Removing a campaign also removes any non-shared budget used by that campaign.
Before removing a budget, ensure that no
ENABLED or
PAUSED campaigns
are using it.
Check the budget reference count
Check the budget's
reference_count field before
attempting to remove it. If this field is greater than 0, there are ENABLED
or PAUSED campaigns still using the budget. You can retrieve this information
by querying campaign_budget as the main resource:
SELECT campaign_budget.reference_count
FROM campaign_budget
WHERE campaign_budget.id = campaign_budget_id
Remove the campaign budget
Once you've determined that a CampaignBudget
is no longer in use (reference_count = 0) and can be removed, send a
CampaignBudgetOperation with
remove set to the resource
name of the campaign budget:
{
"operations": [
{
"remove": "customers/CUSTOMER_ID/campaignBudgets/CAMPAIGN_BUDGET_ID"
}
]
}