Budget Depletion Warning Script

Do you need to know exactly when your campaigns are starting to run out of budget? Not after they’ve overspent when it’s already too late, but when you’re getting alarmingly close?

This budget depletion warning script might just do the trick for you.

What’s included?

How does the script work?

In a nutshell, the script warns you when your spend has reached a certain percentage of your daily budget, as chosen by you.

Google can spend twice your daily budget to help reach your goals. That’s fine for some campaigns, but sometimes you need to be a bit more restrictive with your spend and avoid overspending at all costs. We’ve also created a script that can pause campaigns when spend goes too far over budget, but this script is a preventative option if your budget is more limited.

For example, if your budget is close to getting exhausted, you might also want to figure out until when in the day it lasts, without manually looking at the reports every day (especially if you’ve got shared budgets across campaign). This will help you monitor overspending trends on a day to day basis.

How do I use it?

First, you’ll need to copy the script below into your account (in Tools, under Bulk Actions in the Google Ads interface) and set an hourly run schedule.

Choose the campaigns that the script should look at by editing the CAMPAIGN_NAME_CONTAINS and CAMPAIGN_NAME_EXCLUDES settings, to include or exclude specific campaigns in your account (e.g. only checking brand campaigns). You can also leave those variables blank to include all campaigns.

Then, set a percentage cap in WARNING_PERCENTAGE_CAP to determine the percentage of the budget that needs to have been spent for the tool to warn you.

The tool will then email all the addresses provided in the EMAILS variable with a table of the campaigns that have exceeded the budget cap.

Just make sure to check your inbox once in a while!

The Budget Depletion Warning Script code

Click to Hide Advanced Floating Content