Google Ads daily budgets help control campaign delivery, but an agency may also need to protect a separately agreed monthly client allocation. A pacing script adds an account-level view of actual spend, expected spend and projected month-end expenditure. It is especially useful when you manage a relatively simple account and want a repeatable daily check without maintaining another spreadsheet.
MONTHLY_BUDGET and ALERT_EMAIL.Safety note: Google reporting can be delayed or adjusted. The script is informational and will not prevent overspend; users must continue monitoring their advertising accounts.
Version 1.0 · Published November 16, 2026. Read the full source below before installing it in your account.
/**
* PaceWise — Free Google Ads Monthly Budget Pacing Script (v1.0)
* Read-only account-level monthly pacing; uses completed days through yesterday.
* Requires review and testing in a non-critical Google Ads account before release.
* No campaign mutations, no external network calls, no PaceWise account required.
* Install as a SINGLE-ACCOUNT Google Ads script, schedule DAILY after morning data refresh.
*/
const CONFIG = {
MONTHLY_BUDGET: 3000, // Required: positive amount in THIS account's currency
ALERT_EMAIL: 'you@example.com', // Required: replace with your email
OVER_PACE_PCT: 10, // Alert if forecast exceeds budget by >= 10%
UNDER_PACE_PCT: 10, // Alert if forecast is below budget by >= 10%
MIN_COMPLETED_DAYS: 3, // Avoid unstable early-month forecasts
SEND_DAILY_SUMMARY: false // true = daily email even without alert
};
function main() {
validateConfig_();
const account = AdsApp.currentAccount();
const timeZone = account.getTimeZone();
const currency = account.getCurrencyCode();
const todayString = Utilities.formatDate(new Date(), timeZone, 'yyyy-MM-dd');
const parts = todayString.split('-').map(Number);
const year = parts[0], month = parts[1], todayDay = parts[2];
const daysInMonth = new Date(Date.UTC(year, month, 0)).getUTCDate();
const completedDays = todayDay - 1;
// Read only completed days. No reliable forecast on the first day.
if (completedDays < 1) {
Logger.log('No completed days yet in ' + todayString + '; nothing to report.');
return;
}
const start = pad_(year, 4) + pad_(month, 2) + '01';
const end = pad_(year, 4) + pad_(month, 2) + pad_(completedDays, 2);
const spend = account.getStatsFor(start, end).getCost();
if (!Number.isFinite(spend) || spend < 0) {
throw new Error('Unable to retrieve valid month-to-date spend.');
}
const budget = CONFIG.MONTHLY_BUDGET;
const expectedToYesterday = budget * completedDays / daysInMonth;
const forecast = spend / completedDays * daysInMonth;
const deviation = (forecast - budget) / budget * 100;
const remaining = budget - spend;
const eligible = completedDays >= CONFIG.MIN_COMPLETED_DAYS;
const status = !eligible ? 'INSUFFICIENT HISTORY'
: deviation >= CONFIG.OVER_PACE_PCT ? 'OVER-PACE ALERT'
: deviation <= -CONFIG.UNDER_PACE_PCT ? 'UNDER-PACE ALERT'
: 'ON TRACK';
const displayMoney = n => currency + ' ' + n.toFixed(2);
const accountName = account.getName() || account.getCustomerId();
const lines = [
'PaceWise free budget pacing script — monthly account report',
'Account: ' + accountName + ' (' + account.getCustomerId() + ')',
'Account time zone: ' + timeZone,
'Month: ' + year + '-' + pad_(month, 2),
'Completed days checked: ' + completedDays + '/' + daysInMonth,
'Spend to end of yesterday: ' + displayMoney(spend),
'Monthly budget (user-entered): ' + displayMoney(budget),
'Linear spend target to yesterday: ' + displayMoney(expectedToYesterday),
'Projected month-end spend (simple run-rate): ' + displayMoney(forecast),
'Forecast deviation: ' + deviation.toFixed(1) + '%',
'Unspent allocation (not a platform balance): ' + displayMoney(remaining),
'Status: ' + status,
'',
'Forecast assumes a constant average daily spend; promotions, seasonality,',
'data latency and campaign changes can materially change actual spend.',
'This script never changes budgets or pauses campaigns.'
];
const body = lines.join('\n');
Logger.log(body);
if (CONFIG.SEND_DAILY_SUMMARY || (eligible && status !== 'ON TRACK')) {
MailApp.sendEmail(CONFIG.ALERT_EMAIL,
'[PaceWise] ' + status + ' — ' + accountName, body);
}
}
function validateConfig_() {
if (typeof CONFIG.MONTHLY_BUDGET !== 'number' ||
!Number.isFinite(CONFIG.MONTHLY_BUDGET) || CONFIG.MONTHLY_BUDGET <= 0) {
throw new Error('MONTHLY_BUDGET must be a positive number.');
}
if (!CONFIG.ALERT_EMAIL || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(CONFIG.ALERT_EMAIL) ||
CONFIG.ALERT_EMAIL === 'you@example.com') {
throw new Error('Replace ALERT_EMAIL with your own valid email address.');
}
['OVER_PACE_PCT', 'UNDER_PACE_PCT'].forEach(function(k) {
if (typeof CONFIG[k] !== 'number' || !Number.isFinite(CONFIG[k]) || CONFIG[k] < 0) {
throw new Error(k + ' must be zero or a positive number.');
}
});
if (!Number.isInteger(CONFIG.MIN_COMPLETED_DAYS) || CONFIG.MIN_COMPLETED_DAYS < 1 ||
CONFIG.MIN_COMPLETED_DAYS > 28) {
throw new Error('MIN_COMPLETED_DAYS must be an integer between 1 and 28.');
}
}
function pad_(n, size) { return String(n).padStart(size, '0'); }
Download Free Script
Imagine a 30-day month with a $3,000 budget. After 10 completed days, the account has spent $1,200. That is $200 above a linear spend target of $1,000.
If the current rate continues, projected monthly spend is $3,600 — 20% over budget.
A configured 10% alert threshold would flag the risk. This simple forecast is an illustration; real spend can change because of demand, promotions, campaign changes and delayed reporting.
For one straightforward Google Ads account, a lightweight script can provide a valuable daily checkpoint. When you manage multiple clients, Google Ads alongside Meta, Microsoft and TikTok, custom billing cycles, budget rollovers, stakeholder reporting or more frequent oversight, maintaining separate scripts can become its own operational burden.
PaceWise is designed for that next level of complexity: cross-platform budget pacing, forecasts, overspend and underspend alerts, portfolio visibility and one-click white-label reporting, with configurable controls. Explore PaceWise or its Google Ads pacing page, or start with our free PPC budget pacing template if a single account isn't your only challenge.
This free script is an educational monitoring tool, not a spending cap. It does not stop campaigns, guarantee timely alerts, account for custom billing cycles or anticipate future shifts in spend. Forecasts are linear and may be inaccurate early in the month or around promotions. Google Ads script permissions and data freshness can change.
Review the source and test before relying on it.
See how PaceWise helps agencies keep advertising budgets visible across accounts and supported platforms - Google, Meta, Microsoft and TikTok, with forecasting, alerts and white-label reporting built in.
Start Free — No Card NeededYes. The downloadable source code is free and does not require a PaceWise subscription.
No. It is intentionally read-only. It alerts you to projected spend variance so you can decide what action to take.
Version 1 is designed for one account per installation. A manager-account workflow or other platform support would require a different implementation.
It uses account-level Google Ads spend, including eligible campaign types reflected in account statistics, rather than treating Performance Max separately.
The script provides simple Google Ads monthly monitoring. PaceWise provides a managed workflow for multiple accounts, supported advertising platforms, forecasting, alerts, reporting and more complex budget operations.
Using completed days makes the linear projection easier to interpret and avoids treating an unfinished day as a full day of spend. Google reporting can still be delayed.
PaceWise is a next-generation, AI-powered PPC budget pacing and management platform for agencies and in-house teams. It brings spend visibility, pacing alerts and budget control across Google Ads, Microsoft Ads, TikTok Ads and Meta Ads.