أوامر تحديد الميزانية
استرداد الحد الأساسي للإنفاق في أمر تحديد الميزانية
function getBaseSpendingLimit() {
const budgetOrderIterator = AdsApp.budgetOrders().get();
for (const budgetOrder of budgetOrderIterator) {
let limitText = "";
if (budgetOrder.getSpendingLimit() == null) {
limitText = "unlimited";
} else if (budgetOrder.getTotalAdjustments() == null) {
limitText = budgetOrder.getSpendingLimit();
} else {
limitText = budgetOrder.getSpendingLimit() -
budgetOrder.getTotalAdjustments();
}
console.log("Budget Order [" + budgetOrder.getName() +
"] base spending limit: " + limitText);
}
}
استرداد الأمر النشط لتحديد الميزانية
function getActiveBudgetOrder() {
// There will only be one active budget order at any given time.
const budgetOrderIterator = AdsApp.budgetOrders()
.withCondition('account_budget.status = "ACTIVE"')
.get();
for (const budgetOrder of budgetOrderIterator) {
const budgetOrder = budgetOrderIterator.next();
console.log(`Budget Order [${budgetOrder.getName()}] is currently active.`);
}
}
استرداد كل أوامر تحديد الميزانية
function getAllBudgetOrders() {
const budgetOrderIterator = AdsApp.budgetOrders().get();
return budgetOrderIterator;
}
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-09-11 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-09-11 (حسب التوقيت العالمي المتفَّق عليه)"],[[["This script provides functions to retrieve budget order information from Google Ads, including the base spending limit, active budget order, and all budget orders."],["`getBaseSpendingLimit()` calculates and logs the base spending limit of each budget order, considering total adjustments."],["`getActiveBudgetOrder()` identifies and logs the currently active budget order within the Google Ads account."],["`getAllBudgetOrders()` retrieves and returns an iterator containing all budget orders associated with the account."]]],[]]