If Time Is Money, This Free Google Ads Budget Script Is Priceless


Time is cash.

That is one among my mantras, and I attempt to run my life by it.

Since I run my very own small digital advertising company and we solely have a lean workforce, we have now additionally made this one among our key pillars.

So it isn’t a shock for me, and for us as a workforce, that automation has all the time been on the high of the precedence checklist.

It’s also as a result of I’ve all the time been fascinated by know-how and innovation, and imagine that progress is what drives us ahead for the higher.

As such, I’ve checked out methods to do issues utilizing a unique strategy.

My Automation Journey Began With Macros And VBA

Again within the day, I labored for a big on-line journey company and my job was to arrange accomplice companies within the again finish. It was a repetitive and tedious job; a kind of infinite “copy and paste” process.

That’s once I found the existence of macros.

For these that aren’t that acquainted, macros are units of actions that may be recorded as directions.

When performed again, macros will robotically repeat all of the actions and steps which were recorded in that very same order.

A profit is that they are often recorded and utilized in a lot of environments. One of the vital widespread makes use of is in spreadsheets – Excel, Google Sheets, and many others.

Many Years After, We Nonetheless Use Macros!

Even with my duties operating the company, I nonetheless take pleasure in being hands-on with the accounts – and specifically, working with the ops workforce.

Lately, we needed to full an additional massive report for one among our greatest shoppers.

They like Excel over some other answer, and we needed to engineer one thing that might collate and “clear” the information, format it, and current it in an insightful approach.

While gathering the information and presenting it was fairly easy, “cleansing” it to take care of constant formatting was a little bit of a problem since we had been coping with tens of 1000’s of rows.

That is the place macros got here to the rescue.

Just a few units of directions I recorded and modified utilizing visible primary (VB) – the language macros are built-in – made the duty not solely potential, but in addition helped to finish it sooner, and remove the danger of human error.

Automation = Cash

My level is strictly this: If time is cash and automation saves time, then automation equals cash.

All whereas offering the extra good thing about lowering the possibility of constructing errors alongside the method.

It’s simple to see what has impressed my fascination with automation.

A few of you studying this column would possibly even have come throughout one among my earlier articles right here on SEJ: How To Use Google Sheets For Net Scraping & Marketing campaign Constructing.

Evolving To Google Advertisements Scripts

There are tons of Google Advertisements scripts on the market which were written by a few of the brightest minds in our trade; Frederick Vallaeys, and Daniel Gilbert, simply to call a pair, are amongst people who I contemplate the actual automation trailblazers!

However regardless of scouring the web, by and enormous, I couldn’t discover something that might clear up my drawback.

Why We Wanted A New Script

Right here was my problem: At our company, we have now plenty of retail shoppers within the flower supply trade that run their companies on-line and through their brick-and-mortar shops.

Having helped many of those companies with their advert campaigns for a number of years now, we all know quite a bit about their buyer habits and shopping for patterns.

From these insights, we’ve gathered that individuals are inclined to principally order flower deliveries on weekdays, however on the weekends it’s simple sufficient to pop to the retailers and seize a recent bunch of flowers.

So usually we will see a dip in return on advert spend (ROAS) between Friday afternoon and Sunday afternoon.

Usually, persons are again on-line on Sunday evenings, ordering deliveries for Monday.

However regardless of all of the wonderful steps ahead that Google has made with automated bid methods (goal ROAS, maximize conversions, and many others.), most of those shoppers battle to maximise advert efficiency in the course of the weekends, while their ROAS are inclined to peak firstly of the week.

So one of many actions we have now taken (in accordance with our shoppers) is that, led by their efficiency knowledge, we allocate completely different budgets, at a marketing campaign stage, to every day of the week.

For instance, we’d have one thing like this for a Monday:

Day Marketing campaign Price range Weight
Monday Marketing campaign Identify 1 $150.00 30.00%
Monday Marketing campaign Identify 2 $85.00 17.00%
Monday Marketing campaign Identify 3 $162.50 32.50%
Monday Marketing campaign Identify 4 $62.50 12.50%
Monday Marketing campaign Identify 5 $40.00 8.00%
Complete $500.00 100.00%

After which like this for a Friday:

Day Marketing campaign Price range Weight
Friday Marketing campaign Identify 1 $70.00 20.00%
Friday Marketing campaign Identify 2 $87.50 25.00%
Friday Marketing campaign Identify 3 $140.00 40.00%
Friday Marketing campaign Identify 4 $35.00 10.00%
Friday Marketing campaign Identify 5 $17.50 5.00%
Complete $350.00 100.00%

You possibly can see that, not solely do we have now a smaller whole finances, however we even have a unique finances weighting by marketing campaign.

We wanted to have the ability to change every marketing campaign finances to have a unique allocation on daily basis of the week.

Certainly there’s a solution to automate the method immediately from Google Advertisements utilizing guidelines. Although, when you have an account with a lot of campaigns, the setup may take a big quantity of effort and time.

That’s as a result of we’d both must create one rule for every marketing campaign, for every day of the week, with a purpose to replace the finances quantity.

Alternatively, we must create one rule for every day of the week, however with a unique line (motion) for every marketing campaign.

And irrespective of the way you do it, both of those choices leaves you susceptible to errors alongside the best way.

I postulated that it could be simpler to have a spreadsheet with the budgets break up, the place allocations could be calculated utilizing easy formulation, and have this fed straight into the platform through a script.

As I discussed, I scoured the web by and enormous, however couldn’t discover something like that.

Certain, there are a handful of Google Advertisements scripts which were written to handle budgets, most to manage spend and restrict possibilities to overspend, however nothing that may go well with our shoppers’ wants.

Enter The Google Advertisements Price range By Day Of The Week Script

What our script does must be fairly clear by now, however to summarise, it permits us to make use of a Google Sheet to set budgets by account and by marketing campaign for every day of the week.

It then makes use of that data to replace the marketing campaign’s day by day finances.

Be aware that that is an MCC-level script, so if wanted, a number of accounts could be managed by means of one single doc.

The place To Obtain And Copy The Script

The script is totally free to make use of, and could be downloaded or copied from our Github gist right here.

script for Google Ads from GitHubScreenshot from Github, December 2022

How To Use The Script

With the intention to use the script, first you have to to create a replica of the Google Sheet that’s used to feed the finances data from.

This may be performed through this hyperlink.

Upon getting created a replica of the file, you will notice there are 4 tabs within the doc:

  • Right now – The tab the place, if a finances has been created for the present day, it will likely be proven, and from which the script will take the information to course of the budgets replace
  • Allocation – That is the tab the place budgets are outlined for one, a number of, or all days of the week. Right here, if wanted, you should use formulation to calculate the quantities which might be allotted to every day of the week, every marketing campaign, and many others.
  • All the things – The grasp checklist of the finances allocation. In idea, this tab could be superfluous however we added it with a purpose to have a solution to double-check that budgets are break up and allotted appropriately. Until adjustments are made to the formulation, this tab have to be stored, for the reason that knowledge within the ‘right this moment’s tab is queried from right here.
  • Change Log – The final tab, the place adjustments are recorded as soon as utilized. If a change has been made, right here it should present the earlier and new finances allocations.
Google ad budgets excel sheetScreenshot from Google Sheets, December 2022

The Subsequent Step Is To Set up The Script

As talked about, that is an MCC script.

In Google Advertisements, you have to to go to Instruments and settings > Bulk actions > Scripts:

MCC scriptScreenshot from Google Advertisements, December 2022

From there, click on on the plus (+) icon so as to add a brand new script.

MCC script new script Screenshot from Google Advertisements, December 2022

For this script to work correctly you have to to ensure that “New scripts expertise” is enabled (see above).

Then you have to to take away the few traces of code which might be within the doc by default:

MCC scriptScreenshot from Google Advertisements, December 2022

At this level, chances are you’ll proceed to stick the file you copied from our Github gist:

Google Ads Budgets By Day Of The WeekScreenshot from Google Advertisements, December 2022

Customizing The Script

Earlier than the script can be utilized, you have to change two variables. This may let the script know the place to supply the finances data, and the place to file any adjustments which were utilized.

The 2 variables are:

  •   var logSheet = SpreadsheetApp.openById(‘ADD-THE-GOOGLE-SHEETS-ID-HERE’).getSheetByName(‘change log’)

There you have to to switch ADD-THE-GOOGLE-SHEETS-ID-HERE with the Google Sheet ID of the doc you created earlier:

Google Ads Budgets By Day Of The WeekScreenshot from Google Sheets, December 2022

Operating The Script

You’re almost able to run the script, however be aware that you’ll want to grant authorization earlier than it could possibly make any adjustments:

Google Ads accountsScreenshot from Google Advertisements, December 2022

Upon getting used your credentials to authorize the script to behave in your behalf, run a fast preview to ensure all is working as anticipated.

At this stage, if there are budgets which were allotted for the present day within the Google Sheet’s tab named ‘right this moment’, you’ll see one thing like this when operating the script preview:

Google Ads script screenshotScreenshot from Google Advertisements, December 2022

Whereas within the Google Sheet’s tab referred to as “change log” you will notice one thing much like this:

Google SheetsScreenshot from Google Sheets, December 2022

All adjustments have been utilized and recorded appropriately!

The very last thing left to do is to schedule the script.

Relying in your wants, you’ll be able to let it run day by day, or solely on the times that you really want it to make the adjustments.


Identical to different Google Advertisements scripts we frequently use, this has helped our workforce streamline processes and leverage automation to release time and sources.

This has enabled our company to give attention to extra strategic work and duties.

Hopefully, the push for innovation and discovering higher methods to work will encourage you as a lot because it motivates us.

Extra sources: 

Featured Picture: BestForBest/Shutterstock


Scroll to Top