2.8K members online now
2.8K members online now
Welcome to the Official Google Partners - North America Community
Read the latest articles and tips from Partners Experts and the Google team on growing your business, managing your agency and getting the most out of your AdWords accounts
star_border
Top Contributor Alumni

Learn How to Add Scripts to MCC and CID Level

 

Overview:

Few understand the power of AdWords scripts, and even fewer use them to capacity. Did you know that you can use AdWords scripts to automatically update bids based on specific parameters on an hourly basis? That you can pull out converting search terms, to then be added back as exact match keywords? All with an incredible amount of flexibility?

 

Below I will show you how easy it is to get started using MCC & CID scripts to increase the performance of your Adwords campaigns.

 

 Part 1 - CID Scripts

Follow these instructions to get going with AdWords scripts in under a minute.

 

  1. Navigate to the Campaigns tab in the AdWords web application.
  2. In the left navigation click Bulk operations, then choose Scripts.
  3. Click + Script button to create a new script.

 

screengrab-mikes.png 

Copy & Paste the following code in the editor area:

function main() {
  var keywords = AdWordsApp.keywords()
      .orderBy("Impressions DESC")
      .forDateRange("YESTERDAY")
      .withLimit(10)
      .get();

  Logger.log("10 keywords with most impressions yesterday");
  while (keywords.hasNext()) {
    var keyword = keywords.next();
    Logger.log(keyword.getText() + ": " +
        keyword.getStatsFor("YESTERDAY").getImpressions());
  }
}

 

5.) Click Authorize now to authorize the script. Don't worry, this only has to be done once per script.

4.png

6.) Click Preview and wait a bit for the results to appear. (You can set up the script to run on a daily, weekly or custom schedule).


Part 2 - MCC Scripts

Follow these instructions to get going with MCC scripts in under a minute.

  1. Navigate to the Accounts tab in the AdWords web application.
  2. In the left navigation, click Bulk Operations, then choose Scripts.
  3. Click the + Script button to create a new script.

1.png

Copy and paste the following code into the editor area:

 

function main() {
  // Retrieve all the child accounts.
  var accountIterator = MccApp.accounts().get();

  // Iterate through the account list.
  while (accountIterator.hasNext()) {
    var account = accountIterator.next();
    // Get stats for the child account.
    var stats = account.getStatsFor("THIS_MONTH");
    // And log it.
    Logger.log("%s,%s,%s,%s", account.getCustomerId(), stats.getClicks(),
               stats.getImpressions(), stats.getCost());
  }
}

 

5. Click Authorize now to authorize the script. Don't worry, this only has to be done once per script.

2.png

 

6. Click Preview and wait a bit for the results to appear.

 

Here are some links to enhance your scripts once you get comfortable:

 

Code Snippets: https://developers.google.com/adwords/scripts/docs/examples/

Script Examples: https://developers.google.com/adwords/scripts/docs/solutions/

Scripts: https://developers.google.com/adwords/scripts/docs/features/mcc

 

*Please leave any questions or comments below. Remember when using 3rd party scripts that you could do harm to your accounts, always use scripts with caution.

 

Stay Googley!

about Mike Blackmore

I manage and consult for large Automotive Groups. Everything SoLoMo (Social, Local, Mobile) advertising strategies to maximize ROI.

Comments
Jeannie H
June 2016

Very well-written and needed article. Thanks.

Pat o
June 2016

Very cool...

I look forward to actually playing this. I've been aware of this for some time, but haven't made the time to used them (ironic, as it is such a time saver!).

 

ISHIR P
August 2016

what is the purpose of MCC scripts. Not getting. What it will do after its added at MCC level? Please tell.

Mike Blackmore Top Contributor Alumni
August 2016 - last edited August 2016

Hi Ishir,

 

I use MCC level scripts to help solve some of my painful problems by allowing me to host all of my scripts in my MCC and apply them to each of the accounts at the same time.

 

You can apply logic using the executeInParallel() function to up to 50 accounts at the same time and collect the results in a single place for reporting. Also, your scripts can now run up to an hour total if you design them properly.

 

Worse yet, if you find a bug in a script that you’ve copied to 10 or 25 accounts, you’ll need to log into each one and update them manually to apply the fix, with MCC scripts you can just do it once, saving you time and grey hair.

 

Plus there are many more advantages if you manage large scale accounts with thousands of moving parts.

Labels