Google Ads 指令碼會盡力執行:嘗試變更 Google Ads 資料,但如果某項變更失敗,指令碼會將其記錄到「變更記錄檔」,並繼續執行:
// Attempt an invalid change.letamount=999999999999;campaign.getBudget().setAmount(amount);// Error is logged into Changes log, but the script keeps running.// Suppose we must know whether the change actually happened.if(campaign.getBudget()!=amount){// The current value of budget is not the one we expected.// The change must have failed.}
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-03-29 (世界標準時間)。"],[[["Google Ads scripts will log errors when changes fail but continue running, allowing you to check if a change was successful and handle it accordingly."],["Certain errors, such as missing required parameters, will halt script execution and require fixing before the script can run."],["While scripts proceed even when exceeding quotas, warnings are logged and should be reviewed."],["Script execution logs provide valuable information through errors (red), warnings (orange), and custom messages for debugging and monitoring."],["Successfully returned objects from Google Ads scripts are safe to use, indicating the operation was successful."]]],[]]