移除廣告活動預算
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
移除預算前,請先檢查ENABLED
或PAUSED
廣告活動是否正在使用該預算,方法是查看reference_count
。如果這個欄位的值大於 0,表示仍有 ENABLED
或 PAUSED
個廣告活動使用該預算。您可以搜尋以 campaign_budget
做為主要資源的指標,藉此擷取這項資訊。以下是預算參照計數的 GAQL 查詢,並依 ID 篩選:
SELECT campaign_budget.reference_count
FROM campaign_budget
WHERE campaign_budget.id = campaign_budget_id
確認 CampaignBudget
不再使用且可以移除後,請傳送 remove
作業,並提供廣告活動預算的資源名稱。
移除廣告活動時,系統也會一併移除該廣告活動使用的所有非共用預算。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-26 (世界標準時間)。
[null,null,["上次更新時間:2025-08-26 (世界標準時間)。"],[[["\u003cp\u003eBefore removing a budget, ensure no active or paused campaigns are using it by checking its \u003ccode\u003ereference_count\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIf the \u003ccode\u003ereference_count\u003c/code\u003e is greater than 0, retrieve information using a GAQL query with \u003ccode\u003ecampaign_budget\u003c/code\u003e as the main resource.\u003c/p\u003e\n"],["\u003cp\u003eTo remove an unused \u003ccode\u003eCampaignBudget\u003c/code\u003e, send a \u003ccode\u003eremove\u003c/code\u003e operation with the resource name of the campaign budget.\u003c/p\u003e\n"],["\u003cp\u003eRemoving a campaign also removes any non-shared budget associated with it.\u003c/p\u003e\n"]]],[],null,["# Remove a Campaign Budget\n\nBefore removing a budget, ensure that no\n[`ENABLED`](/google-ads/api/reference/rpc/v21/CampaignStatusEnum.CampaignStatus#enabled) or\n[`PAUSED`](/google-ads/api/reference/rpc/v21/CampaignStatusEnum.CampaignStatus#paused) campaigns\nare using it by checking its\n[`reference_count`](/google-ads/api/reference/rpc/v21/CampaignBudget#reference_count).\nIf this field is greater than 0, there are `ENABLED` or `PAUSED` campaigns still\nusing the budget. You can retrieve this information by searching for metrics\nwith `campaign_budget` as the main resource. Here is the GAQL query for the\nreference count of a budget, filtering on its ID: \n\n SELECT campaign_budget.reference_count\n FROM campaign_budget\n WHERE campaign_budget.id = \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ecampaign_budget_id\u003c/span\u003e\u003c/var\u003e\n\nOnce you've determined that a [`CampaignBudget`](/google-ads/api/reference/rpc/v21/CampaignBudget)\nis no longer used and can be removed, send a\n[`remove`](/google-ads/api/reference/rpc/v21/CampaignBudgetOperation#remove)\noperation with the resource name of the campaign budget.\n\nWhen removing a campaign, you're also removing any non-shared budget being\nused by that campaign."]]