PaceWise
Free Download · No PaceWise Account

Free Google Ads Budget Pacing Script

Stop checking monthly spend by hand. Download a free, read-only Google Ads script that calculates budget pacing, projects month-end expenditure and emails you when spending is materially ahead of or behind your budget.

No PaceWise account required. Runs inside your Google Ads account. You stay in control.

Read-only - never pauses campaigns or edits budgets No PaceWise account required

Why use a budget pacing script?

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.

What this free script includes

  • Monthly actual spend from Google Ads through the end of yesterday
  • Expected spend based on elapsed calendar days
  • Simple month-end forecast based on average daily expenditure
  • Configurable over-pace and under-pace email alerts
  • Account currency and time-zone awareness
  • Read-only operation - it does not pause campaigns or adjust budgets

How it works

  1. Enter your monthly account budget and alert email.
  2. Paste the script into Google Ads Scripts and preview it.
  3. Schedule a daily run.
  4. Read the email alerts when the forecast moves beyond your configured thresholds. Always reconcile critical decisions against the Google Ads interface.
Full step-by-step installation guide
  1. Sign in to Google Ads and open the desired single account.
  2. Go to Tools → Bulk actions → Scripts (menu names may vary with UI updates).
  3. Create a new script, paste the supplied JavaScript, and replace MONTHLY_BUDGET and ALERT_EMAIL.
  4. Review the full code and authorise only the permissions Google requests; use Preview and inspect logs.
  5. Confirm the reported spend against Google Ads for the same completed-day date range and account currency.
  6. Run a controlled alert test using a clearly low monthly budget and your own email, then restore your actual budget.
  7. Schedule a daily run after local morning reporting data is available. Recheck after billing changes.

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.

The script

Version 1.0 · Published November 16, 2026. Read the full source below before installing it in your account.

View the full script source (98 lines)
/**
 * 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

Example: spot a developing overspend

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.

When a free script is enough - and when it is not

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.

Important limitations

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.

Need More Than a Daily Budget Check?

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 Needed

Frequently Asked Questions

Is the Google Ads pacing script free?

Yes. The downloadable source code is free and does not require a PaceWise subscription.

Can it stop my ads if I exceed budget?

No. It is intentionally read-only. It alerts you to projected spend variance so you can decide what action to take.

Can I use it for several Google Ads clients at once?

Version 1 is designed for one account per installation. A manager-account workflow or other platform support would require a different implementation.

Does it work with Performance Max?

It uses account-level Google Ads spend, including eligible campaign types reflected in account statistics, rather than treating Performance Max separately.

What is the difference between the script and PaceWise?

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.

Why does the script exclude today?

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

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.

Secure Payment:
© 2026 pacewise.app PaceWise is operated by YCC Ventures, in Sydney, Australia. Privacy Policy Terms of Service
support@pacewise.app