Example Use Cases
- Limit the maximum cost for a new keyword or ad group you are testing
- Set different daily spend limits for campaigns so that it can spend a different amount on weekdays vs weekends
Settings and Customizations
You have to create two copies of this script and place them both in your AdWords account. The first runs hourly and checks if spend today for any campaign, ad group, or keyword with the label 'Limit Daily Spend' is greater than 100, and if so, pause it.
The second copy of this script should be set to run every morning between midnight and 1am and enables any campaigns, ad groups, or keywords with the label 'Limit Daily Spend'. This is needed so your items that got paused by the hourly script are automatically unpaused every day.
The settings below let you customize whether the script works on campaigns, ad groups, keywords, or ads; the label name you are using to identify items that should be evaluated; the maximum cost; the time range to evaluate; and the email to notify:
- scope - accepted values are "Campaigns", "Ad Groups", "Keywords", "Ad Text"
- maxCost - set this to the maximum cost for each item.
- dateRange - the amount of time in which the item is allowed to accrue no more than the maxCost - TODAY, LAST_7_DAYS, LAST_14_DAYS, LAST_30_DAYS
- labelName - set this to the name of the label you are applying to the items to be included
- email - set this to the email address to get a notification when the script makes changes