Centralising Account Level Scripts with Manager Account (MCC) Scripts in AdWords

AdWords Manager Accounts are indispensable when it comes to managing multiple client accounts. This is particularly true if you frequently use scripts for reporting or optimisation purposes. Manager Account scripts allow you to centralise your scripts in a single location, making the running and maintenance of your scripts a breeze.

In this short article I will show you how you can setup an MCC level “shell script” that will allow you to selectively apply a script to an account of your choosing.

MCC Shell Script

The script itself is very basic, allowing you to select a single account from your Manager Account. This, in turn, allows you to run your actual scripts across multiple accounts from a single location.

The script is essentially composed of 3 parts:

  1. Client Account IDs and Spreadsheet URLs (for quick reference)
//////////Client Account IDs and Spreadsheet URLs//////////
//Client 1 Account ID: 111-111-1111
//Client 1 Spreadsheet URL: "https://docs.google.com/CLIENT-1-URL";
//Client 2 Account ID: 222-222-2222
//Client 2 Spreadsheet URL: "https://docs.google.com/CLIENT-2-URL";
//Client 3 Account ID: 333-333-3333
//Client 3 Spreadsheet URL: "https://docs.google.com/CLIENT-3-URL";
//////////Client Account IDs and Spreadsheet URLs//////////

2. Account Selector Script (for selecting a single account)

function main() {

var accountSelector = MccApp.accounts()
.withIds(['xxx-xxx-xxxx']); //update with account id

var accountIterator = accountSelector.get();

while (accountIterator.hasNext()) {
var account = accountIterator.next();

xxx(); //update with the script name


3. Actual Script

function reportingScript(){

var spreadsheetUrl = "https://docs.google.com/YOUR-SPREADSHEET-URL-HERE";


Putting all the pieces together we get the following:

Final MCC “Shell Script”

Running a script across multiple accounts is now just a question of updating the account ID and (in the case of scripts with output) the spreadsheet URL.

About the author

Lars C. L. Larsen is an Online Marketing Specialist & Partner at AdNudging.com. You can connect with him on LinkedIn.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.