AdWords Scripts For Every Level: Part 3, Advanced Tips For Unleashing The Power Of Scripts

Using MCC Scripts and Google Sheets for powerful optimization. Plus the "hidden" gem in the Bidding by Weather script.

Chat with SearchBot

google-adwords-bigA4-1920

We conclude our three-part series on Google AdWords scripts with some tips for more advanced users. If you missed the first two installments, you can check them out here:

AdWords Scripts For Every Level: Part 1, Learning How To Read Scripts

AdWords Scripts For Every Level: Part 2, Intermediate Tips For Editing & Troubleshooting

Steve Hammer, president at search marketing firm RankHammer, and Frederick Vallaeys, co-founder of AdWords tool company Optmyz, again provided insights from their work in the trenches with scripts.

Here we look at the benefits of MCC Scripts and tips for keeping all those scripts organized and up to date.

MCC Scripts + Google Sheets = Organized Power

Google MCC Scripts allow you to store and execute scripts across up to 50 accounts. In our coverage of the roll out in May, you’ll find links to more resources as well as to columns on using MCC Scripts by Frederick Vallaeys and Russell Savage, who is also a Search Engine Land columnist and runs the invaluable blog FreeAdWordsScripts.com.

A drawback to MCC Scripts, as Vallaeys points out, is that there’s no native way to apply different settings for different accounts. For example, while you might apply the same basic account management methodology from a script to many accounts, you may want to email different people managing each account.

There are some workarounds: maintain the settings for all accounts in the MCC script code itself, or connect the script to an outside data source like Google Sheets. The second option – using Google Sheets — is likely going to be the easier one to maintain.

As we touched on in Part Two of this series, Scripts can output data to Google Sheets. But they can also pull data from Google Sheets. You may have seen this with the cool Bid by Weather script that allows you to change your bids based on changes in the weather.

Vallaeys used Google Sheets for a long time before the team at Optmyzr built their own tool called Enhanced Scripts, in part, to allow PPC managers to maintain different settings for each account as well as multiple settings for individual accounts. (Enhanced Scripts also puts the coding in the back end and gives users a simple web interface to set up and edit scripts. You can read more about them in this previous article.)

As you and your team start to get prolific with scripts, Google Sheets can be your go-to for better organization and optimization. Vallaeys has three tips for using Google Sheets and Scripts for easier maintenance:

  • Use Google Sheets as a controller so that the script reads a row from the sheet for every account and this row can include all the custom settings like thresholds, email addresses, etc.
  • Now account labels are supported so use these to keep track of which accounts were already processed if you need to run a script for more than 50 accounts (the Google limit).
  • Aggregating the output from multiple accounts is a little trickier but well worth it as you’ll be able to run some automated reports or generate multi-account dashboards that would have been very time consuming to do manually.

Russell Savage also has some great ideas for keeping things as simple as possible in his column, Reusable Code For MCC Scripts Will Save You Tons Of Time In AdWords

The “Hidden” Gem In The Bidding By Weather Script

Steve Hammer shares how to take the magic behind the Bid by Weather script and apply it to other uses.

The Bidding by Weather script “opens up some pretty mind blowing opportunities for automation, and not just for weather.  However, a ‘hidden’ part of that script is the use of a spreadsheet to define many elements for using the feed.  This concept, expanded, can be used to feed internal data.”

Hammer explains that there are three parts to this.

1. The easiest one is to call the Google spreadsheet you want to use.

var SPREADSHEET_URL ='INSERT_SPREADSHEET_URL_HERE';
var spreadsheet =SpreadsheetApp.openByUrl(SPREADSHEET_URL);

2. The next step is to extract the data. This is best done as an array, unless the spreadsheet is very large. There’s an assumption that there is a header column, and potentially multiple sheets as well (it only selects the first here).

var sheetDataArray = getSheetData(spreadsheet,1);
/**
  * Retrieves the data for a worksheet.
  * @param {Object} spreadsheet The spreadsheet.
  * @param {number} sheetIndex The sheet index.
  * @return {Array} The data as a two dimensional array.
  */
 function getSheetData(spreadsheet, sheetIndex){
   var sheet = spreadsheet.getSheets()[sheetIndex];
   var range =
       sheet.getRange(2,1, sheet.getLastRow()-1, sheet.getLastColumn());
   return range.getValues();
 }

3. The last, but not least part of this is to decide how to use it. This will depend a lot on how the account is structured.  As one example:  Conceptually, imagine feeding back in an “on the phone” closing rate for lead generation ad groups, with a fairly defined values of a closed sale.  We’d iterate through the adgroup data, and multiply the back end closing ratio with the sale value and desired margin.  (10% lead close x $1000 sale x 50% margin = $50 target CPL).  This could then be applied to the keywords in the adgroup for a conversion targeted bidding model, or applied to a CPC bid for the known on page conversion rate.

And, that is a fantastic example of the power and ingenuity that Scripts can unleash! If you have other ideas, please share them in the comments below.

Bonus Update: We’ve added a final installment to this series, AdWords Scripts For Every Level: Part 4, A Real World Use Case (Free Script Included).


Opinions expressed in this article are those of the guest author and not necessarily Search Engine Land. Staff authors are listed here.


About the author

Ginny Marvin
Contributor
Ginny Marvin was Third Door Media’s former Editor-in-Chief (October 2018 to December 2020), running the day-to-day editorial operations across all publications and overseeing paid media coverage. Ginny Marvin wrote about paid digital advertising and analytics news and trends for Search Engine Land, MarTech and MarTech Today. With more than 15 years of marketing experience, Ginny has held both in-house and agency management positions. She can be found on Twitter as @ginnymarvin.

Get the must-read newsletter for search marketers.