What Is It?
This script checks if an item (keyword, ad, ad group, campaign, or account) is exceeding the budget you set up for it. It pauses the entity and notifies you over email when the budget is hit. It also reenables the entity at the beginning of the next budget period.
It uses the label applied to enable campaigns and also enables you to specify your budget period by choosing a cycle date. So if your budget for the account starts on the 15th of the month and ends on the 15th of next month, enter the cycle date as 15.
Note: This script takes into consideration costs for entities, not budgets. This means that if you have 2 campaigns that share a budget, it's possible for 1 campaign to be paused and the other to keep running.
Note: For video campaigns, the script pulls in the data but the applies such as pausing/enabling the campaign or updating the budget won't go through due to API restriction.
Why should you use it?
The script enables you to:
Set budgets for campaigns, ad groups, keywords, or ads.
Set budgets for monthly, weekly, daily, or custom periods (cycle date).
Monthly budgets can be set to cycle on any day of the month you want.
Pause items when their cost exceeds the maximum budget you specified.
Re-enable paused items when a new budget period starts.
Get notifications via email when changes are made or when an account exceeds the budget for the period.
Mid-Month Budget Changes
If a monthly budget is set for the script and it is changed during the month, the script will use the new budget for its next run. For example, if the monthly budget was set to $1,000 at the beginning of the month and is changed to $700 on the 15th, then when the script runs on the 16th, it will match the total cost of the account against $700 and pause items if the budget is exceeded.
Smart Campaigns and Experiments
Smart Campaigns and Campaign Experiments are currently not compatible with the Script, as the Google Ads Scripts API doesn't support pausing or modifying them. If you have active smart campaigns or experiments in your account, you need to keep into consideration these two factors:
If you are running the script at a campaign level, the script won't be able to trace the spend of the smart campaigns or pause them, therefore it will not consider them. It will track the spend of experiments but it can't pause them.
If you are running the script on an account level, the script will take into consideration the smart campaign's spend and the spend of the experiment as a part of the total account spend, even though smart campaigns and experiments can't be paused. This means that the maximum budget amount set will consider the smart campaign's spend and spend from experiments, but upon reaching the limit, the script will only pause those campaigns which are not set up as smart campaigns or experiments.
Supported Campaign Types
Campaign types supported by the 'Pause When Things Spend Too Much' Script:
Search Campaigns
Display Campaigns
Shopping Campaigns
Video Campaigns
Performance Max Campaigns (read more)
Campaign types NOT supported by the 'Pause When Things Spend Too Much' Script:
Smart Campaigns
Demand Gen
Experiments
This script must be scheduled to run every hour if you want it to re-enable paused items at the start of a new budget period.
Basic Settings
Read Settings from Spreadsheet: Select this option to get the values from the spreadsheet. You can copy this sample spreadsheet to set up budgets.
Note: Each column in the spreadsheet has an explanation of how the information has to be entered. The spreadsheet can work across accounts and settings.
Maximum Budget Amount: Enter the budget amount you want to reach before the item is paused. The number in this field applies to each individual item.
Monthly Cycle Start Date: In this field, you can set the month's day that is defined as the cycle start date for the budget period. It should be between 1 and 28.
Actions when Budget is Exceeded
Pause Items: When this setting is set to yes, items that have exceeded the maximum budget amount for the budget period can automatically be paused.
Reenable Items: The script applies a Google Ads label to all items. It pauses and uses the same label to enable those items at the beginning of the budget period.
Email Addresses To Notify: The email addresses of those who should receive notifications when an item exceeds its maximum spend limit, gets paused, or is enabled. Separate multiple email addresses with commas.
Text Of Label To Add: The name of the Google Ads label to add to items that exceed the budget and are paused. This label is used to automatically find these items to reactivate them when the next budget period starts.
By default, the label is "stopped by budget script", and when an entity is labeled by the script, it'll be followed by the budget period from your script settings in parentheses. For example:stopped by budget script (Daily)
stopped by budget script (Weekly Mon-Sun)
stopped by budget script (Weekly Sun-Sat)
stopped by budget script (Monthly)
stopped by budget script (Custom)
If you are using multiple settings in the same account, we recommend using different labels to avoid confusion.
⚠️ Important: If the label used is removed in Google Ads, the script won't re-enable those items. If it is also applied to additional items in the account, the script will re-enable them whether or not the script paused them.
Advanced Settings
Check Only Items With This Label: The script will only check the items' budgets with this label. Leave blank to check all active items in your account.
Campaign/Ad Group Name Contains: When you add text in this field, the script will perform actions only on campaigns or ad groups whose names contain that text. For instance, if 3 out of your 10 campaigns have the word "Bath" in their names, the script will monitor and pause those 3 campaigns. The field is not case-sensitive.
Aggregate Costs: When checked, the combined cost of all matching items is compared to the budget. When left unchecked, each item that matches the search criteria is evaluated independently.
The field applies when the item to pause is other than "Account."
Show Debug Data In Logs: Select this option to get the complete logs, which can be useful when reporting a problem to Optmyzr. This option severely decreases the script's performance, so it should be turned off most of the time.
Advanced Option: If you manage many accounts and budgets, it may be easier to maintain your settings in a Google Spreadsheet. Copy this spreadsheet to your own Google account for use with the New Advanced Settings of this script.
Use Cases
Avoid Campaign Overspend
Problem: Some campaigns tend to overspend toward the end of the month, especially when performance spikes. How can you stay within your allocated budget?
Solution: You set a maximum monthly budget for every campaign, along with a cycle date to align with your billing cycle. The script continuously monitors spend and automatically pauses campaigns, ad groups, or keywords once they exceed the defined budget.
This allows you to have full control over your monthly spend and maintain profitability.
Get Instant Alerts When Spend Limits Are Hit
Problem: You often realize budget overruns too late because you are not actively monitoring accounts throughout the day.
Solution: You can add email addresses to receive notifications whenever an item exceeds its budget, gets paused, or is re-enabled. This keeps you informed of all critical changes in real time.
Manage Budgets Across Specific Campaign Segments
Problem: You want to control spending only for a subset of campaigns (e.g., branded campaigns or seasonal campaigns), but not the entire account.
Solution: You can use filters such as “Campaign Name Contains” or “Check Only Items With This Label” to target specific campaigns or ad groups. The script will only monitor and take action on those selected items.

