What is It?
The Reach Target Monthly Spend script automatically adjusts budgets to meet the target spend. The script can modify campaign-level budgets and shared budgets, and by using multiple settings, it can manage all budgets for the entire account.
This script is not compatible with Google Ads’ Campaign total budgets. The script calculates and adjusts budgets on a daily basis and does not account for campaigns that use a fixed budget over a defined period. As a result, campaigns with total budgets are incompatible, and any attempt to update such campaigns will fail.
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 restrictions.
Why Use It?
With this script, you can:
Maintain consistent budget pacing by automatically adjusting campaign or shared budgets based on how much has already been spent and how many days remain in the month.
Keep campaigns aligned with monthly spend targets by dynamically increasing or decreasing budgets to ensure the remaining budget is distributed effectively.
Reduce manual budget management by letting the script continuously recalculate daily budgets instead of manually updating them throughout the month.
Note: We suggest you don't use this script if you are already using the Optimize Budget tool, as these two will override the changes made by each other. This script does not pause overspending budgets. To manage and avoid overspending, you can use the Pause When Things Spend Too Much script.
Basic Settings
Budget Name Is
The name of the campaign or shared budget you want to manage automatically.
Enter a single campaign name or a single shared budget name (case-sensitive, exact match).
Multiple entries or comma-separated values are not supported—create a separate setting for each.
Target Monthly Spend
Enter the amount you would like the campaign or shared budget to reach by the end of the month. If the budget amount has decimals, you need to use a period (.) as a decimal separator.
Note: Numerical figures only can be used, and no special characters, for instance, currency symbols.
This script calculates the new budget by taking the amount of budget left and dividing it by the number of days left in the month.
New Budget When Target Has Been Exceeded
In this setting, you can define what the script should do if it finds a campaign has surpassed the budget.
Set Budget to 1
By setting this option to “1”, you’ll be modifying the budget for the remaining period to “1”. As this script doesn't pause the overspending budgets, setting it to "1" will also help you keep control over any potential extra spend.
Keep Last Budget
However, the 'Keep Last Budget' option will keep the budget the same as what it was when the target was met.
How To Calculate Budgets
This setting lets you specify the method you want to use to reallocate budgets.
Evenly - It lets you spread out your budget evenly throughout the month.
Evenly with Increases For High Potential Days of the Week - Shares the budget evenly between the remaining days, but will bump the budget higher if today is a day of the week that has typically seen higher click volume.
Front-loaded - Spends a larger part of the budget in the first half of the month.
Back-loaded - Spends a larger part of the budget in the second half of the month.
Based on Day of Week Potential - Budget is allocated on the base of the potential to spend on every day of the week.
We recommend the “Evenly with Increases For High Potential Days of the Week" reallocation method because this method sets a budget no lower than based on even distribution, but increases it when it believes the day has extra potential based on day-of-week patterns. So it's more likely to help you spend your budget.
You can read more about how different reallocation methods work here.
Advanced Settings
The advanced settings give you the option to define how the patterns are calculated and how the unused budget should be used. With the day-of-week pattern setting, you'll set the Nº of past weeks to use for defining the average.
Roll Over Unused Budgets
Carry forward any remaining budget from the previous period, calculated by subtracting the last period's cost from the target monthly spend set. This remaining budget is then rolled over and added to the current target spend.
Shared Budgets in the Script
The shared budget option is used when you are using the same budget across multiple campaigns. Select this to manage a shared budget, and leave it unselected if you want to manage the budget of an individual campaign.
We use this setting because campaigns and shared budgets don't have to have unique names in Google Ads, so when the name you entered in the settings matches both a campaign and a shared budget, this tells the script which one you would like to manage automatically.
Note: When a shared budget is created after the month has already begun, Google Ads doesn't transfer the spend that the individual campaign had over to the spend of the new shared budget. As Optmyzr can only consider the spend from when the shared budget was created, there may be some differences at first.
Use Cases
Maintaining Consistent Monthly Budget Pacing
Problem: Campaign spend fluctuates throughout the month, making it difficult to ensure that campaigns reach the target spend by the end of the month without overspending or underspending.
Solution: With the script, you can automatically adjust campaign budgets based on the remaining budget and the number of days left in the month. By selecting the Evenly budget calculation method, the script distributes the remaining budget consistently across the remaining days.
Prevent Overspending
Problem: Sometimes campaigns exceed the planned monthly spend before the end of the month.
Solution: Using the script setting “New Budget When Target Has Been Exceeded,” you can automatically reduce the budget once the target spend has been met. By setting the budget to 1, the script significantly limits additional spending for the remaining days.
Managing Shared Budgets
Problem: You run several campaigns that share a single budget. Monitoring and adjusting this shared budget manually can be difficult.
Solution: By selecting the Shared Budget option in the script settings, you can automatically manage the total spend across all campaigns using that budget. The script adjusts the shared budget daily so that the total spend aligns with the target monthly amount.
Further Reading
You can read more about tools for budget management in our blog post here.

