This script automatically adjusts budgets to meet the target spend. The script can modify campaign-level budgets and shared budgets. By using multiple settings, it can manage all budgets for the entire account. 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.
Note: This script does not pause overspending budgets. To manage and avoid overspending you can use the Flexible Budget script. This script checks if an item is exceeding the budget and 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.
Choose the account you want to run the script in and go to the All Enhanced Scripts page. The script lets you set basic and advanced settings.
You can either create a new setting by selecting 'Create new setting' or 'Copy setting from an existing account'. To create a new setting, follow the steps below:
Enter the name you want to give the setting. You can have multiple settings for the same script. For example, in one setting you can opt to adjust budgets for brand campaigns, and in another setting, you can choose to adjust budgets for competitor campaigns.
The name of either the campaign or shared budget you want to manage automatically. This is a case-sensitive, exact match.
Select this to manage a shared budget. 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.
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. This is because a decimal separator can change from a period to being a comma depending on the account language settings. To avoid misunderstandings, the script will only consider a period.
The Reach Target Monthly Spend script calculates the new budget by taking the amount of budget left and dividing it by the number of days left in the month.
In this setting, you can define what the script should do if it finds a campaign has surpassed the budget. Selecting 'Keep Last Budget' means that the campaign budget will remain unchanged. 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 potentially extra spend.
This setting lets you specify the method you want to use to reallocate budgets. We have explained the alternatives below:
If you would like to send an email notification after the script runs, you can enter the emails in this section. Multiple email addresses can be entered using a comma-separated list.
When you run the script with the verbose output turned on, you will see output similar to this in Google Ads:
As you can see, in this case, the daily budget has been changed from $10 to $5.26.
In the more detailed "Logs" view in Google Ads, you can see why the budget has been changed in this particular way. In this case, because the target budget is $100 and only 19 days remain in the month, the budget is divided evenly, hence $100 / 19 = $5.26.
Read more about tools for budget management in our blog post here.
After entering the details for the setting, click on 'Save settings'. This will give you an option to 'Download' the script which can then be installed in the Google Ads account. For detailed steps on how to install a script in Google Ads, read this article. This script can also be run at the MCC level. This article explains how to install and run enhanced scripts at the MCC level.
Our award-winning customer care team is here for you.