Never go over budget again with this advanced Google Ads Script

Ask any paid search manager and at some point in their career they will have had that dreaded feeling when they open Google to find that they have gone over budget.

Some admittedly more than others, I’ve heard of agencies even overspending by $1M some months! It’s safe to say I wouldn’t want to be the account director on an account like that!

Everyone hates that dreaded feeling so we wanted to make sure that we never felt it again.

So the developers at my employer have built this advanced budget tracking dashboard to allow you to track your media spend against your budget and give you alerts when you are getting close to going over.

How the script works

The script allows you to track budget at the top line as well as breaking down budgets for different sets of campaigns, labels and channels.

You set a budget for the time frame that you want to track that is displayed at the top line on the graph (see below). The script then plots daily the cumulative spend for the month on each day tracking towards your goal.

There are then two other lines, one that shows you what you need to spend to reach your goal as well as another showing you’re projected spend for the month at your current rate of spending.

If you are running different channels like search and shopping within Google ads that have their own budgets or if you have different budgets for different territories then you can use the script to track these separately.

You define your budget for a set of campaigns for example, or a channel, then the script will create separate budget trackers for each one on a different tabs within the Google Sheet.

The script will also email you on a daily basis with updates on how much of your budget you have spent to make sure you’re never caught out if you haven’t been looking at your Google Sheet.

Setting up the script

Before you run the script, however there are a couple of things that you need to change.

Go into Google Sheets with this link and make a copy of this template sheet.

At the top of the template sheet, within the input tab, either the name of your business, the currency symbol of the currency that your account runs in, for example “$” and then the date range you want to use. There are three different ways you can enter this. Monthly, Yearly and Quarterly, custom dates. These are case sensitive so ensure that you capitalize the first letter. Custom dates need to be input as YYYYMMDD,YYYYMMDD, this is AdWords’ format. For example, 20190101,20190305 would be from Jan. 1 until March 5.

In row B below “tab name” you can create separate budgets for different sets of campaigns, labels or channel types. To use campaign names include section, input the common element of the campaign names that you want to track. Labels should also be entered as they are copied from Google Ads and be separated with commas. Finally, if you want to segment by channel, you can enter any one of the four channels: SHOPPING, SEARCH, DISPLAY, VIDEO. If you are using channel ensure that they are case sensitive. You can only have one per row if you’re tacking a search chanel you can’t include a label or campaign name includes too.

The script also allows you to set budgets at a daily in the daily budgets tab. Enter the total budget for each tab at the top in the total budge row. If you’ve set it to monthly and the month that you’re in has 31 days then write 1 – 31 in column A and then the budgets for each tab for each day alongside it. If you just have budgets monthly that recur monthly then it might be easier to use this lite version of the script.

On line 16 of the script, here you will need to paste the URL of the sheet that you just created within the quotation marks.

On line 19 of the script, enter the email address that you want to receive emails on. You will be emailed daily letting you know how much of the budget that you have spent.

On line 22 of the script, enter the email subject line that you want to use. For example “ Burberry budget tracking”

You will need to ensure that the script has been setup to run daily, or it will not plot the cumulative spend on the graph, or provide you with email notifications telling you how much of your daily budget that you have spent.

The script will now run daily updating the sheet to show you how much of your budget you have spent. It will also email you notifications each day telling you how much of each budget you have spent.