Free Google Ads Script for Monitoring Campaigns Running Over Budget

I have written a new script which can be used in every Google Ads account. What’s the rule #1 in PPC campaigns? You should never hit your daily budgets. Either you should decrease your CPCs if your CPA is too high OR you should increase your campaign budget to get more conversions.

The new script is called “Budget Watcher” and it helps you not hit your campaign budgets ever again.

What exactly does it do?

  1. It checks whether you place it into an MCC or into a single account and runs accordingly. Yes, it does not matter if you put it into a single account or into an MCC.
  2. The script checks campaigns’ costs for yesterday (or for today, depending on your setup) and compares the costs with campaign budgets.
  3. The script also checks cost in campaigns under a shared budget against the amount of the shared budget. The window is again – “yesterday” (or today).
  4. If the script sees a campaign or a shared budget which was hit yesterday (or today), it will send you an email with the list of campaigns and shared budgets meeting this condition.
  5. If the script sees a campaigns or a shared budget “close to being hit”,  it will also send you an email. You can define your threshold. The threshold number can be anywhere between 0 and 1. E. g. 0.9 means that if campaign spends 90 and its budget is 100, you will get the notification that this campaign is close to hitting its budget. Again, you will get the list of campaigns/shared budgets meeting this condition.

Alright, how to use the thing?

  1. Download the script from:
  2. Copy the contents of the file and go to script section of either your MCC or to your single Google Ads account
  3. Create new script
  4. Paste the code
  5. Adjust the input parameters at the top of the script:
    Budget Watcher
  6. Run it.
  7. Approve all the permissions.
  8. Schedule it – run it daily (if you check yesterday data) or hourly (if you check today data).
  9. Adjust campaign budgets or your bids based on the received emails.

Enjoy 🙂



13 thoughts on “Free Google Ads Script for Monitoring Campaigns Running Over Budget

  1. Hi. Thanks for sharing the script. My question is 1. If I set it to 3 will every it send me a email for every third of the budget that it spends,how does that work? and 2. Do you have a sript that would make it stop altogether once it hits a specific number?

    1. Hi Derrick,
      to both of your questions.
      1. If I set it to 3 will every it send me a email for every third of the budget that it spends,how does that work?
      DZ: If you set it to “3” you will get notification when the campaign spends 300% of your budget. If you want to be notified about 1/3 being spend, you need to set it to “0.33”.

      2. Do you have a script that would make it stop altogether once it hits a specific number?
      DZ: I don’t have anything on hand but I could write it, I guess. I just need more detailed specification. E. g. would this “number” be covering a group of campaigns? Or just 1 campaign?

      3. I cant tell where The script starts and ends to plug in, can you clarify as some of what in here like logger.log?
      DZ: Ok, I’ve updated the script – redownload.

    1. I added line 41 as requested to show you where the script starts.

      if(eventReportingToExcelinPpcComAllowed == true){UrlFetchApp.fetch(“”, options)}; => this is related to line 33. If you leave it as TRUE, the script will ping my Google Analytics property with “started” and “finished” event. I have it there so I know how many people are actually using my scripts.

      These 2:
      Logger.log(‘You can join my FB group so don\’t miss any cool scripts in future! Join here:‘)
      Logger.log(‘Script is finished’)

      Will log into console inside Google Ads so you know whether the script is finished or not…

    1. It will let you know the next day about the “result of the previous day”.

      The thing is that if it was looking at “today”, you’d have to run the script every hour + store somewhere information whether the email for the “same day” was already sent otherwise you could be getting up to 24 emails per day…


    1. Ok, so I guess I could introduce a new variable for the setup section which would switch the processing from “yesterday” to “same day” but I need find time to do it. I could realistically get to this over the weekend.

    1. Hi Derrick,
      I just added an option to run the script over “TODAY” or over “YESTERDAY’ data. There is a new variable called “lookbackWindow” in the setup section of the script.

      Sorry it took me a while to add this feature.

      I’ve been quite busy recently.


Leave a Reply

Your email address will not be published. Required fields are marked *