Free Report ➝


21 Nov 2014

PPC Management Driving You Mad? These Adwords Scripts Save Hours!

What Are AdWords Scripts?

AdWords scripts are an extremely powerful tool in Google AdWords. They have the capability to do most of, if not everything, a PPC a manager can do and it does these tasks almost instantly. They can gather specific data from the largest of accounts in seconds, restructure an entire account with its campaigns, ad groups, and keywords in an instant, and allow you manage an entire account from a Google Spreadsheet.

What makes AdWords scripts so powerful and versatile? It’s because AdWords scripts are segments of javascript code that interact with an AdWords accounts.

Adwords Scripts
A piece of AdWords Script Javascript code.

Now you do not need to be a coding master to use AdWords scripts (although having a working knowledge of Javascript absolutely helps) because, thankfully, there are PPC managers who are sharing their scripts online (we’re one of them!) and Google has a tutorial on using scripts with a few examples. So the most you’ll have to do is a simple copy and paste and on occasion change a few variables and structure some spreadsheets. But if you would like to write your own AdWords scripts, then knowing Javascript is a must.

How to Implement an AdWords Script

Before we start giving you some examples of Adwords Scripts, let’s first learn where and how to implement them. There are two different types of AdWords Scripts: MCC or MCCapp scripts, and account level scripts. They both use Javascripts and follow the same syntax, the only difference is that MCC scripts are implemented in the “My Client Center” page in AdWords and they are capable of working on multiple accounts at once. Account-level scripts, which are what the majority of scripts are going to be, only apply to one account.

Here’s how to implement MCC scripts:

When first logging into Adwords, click on Adwords Scriptsat the top of the page, here:

Adwords Scripts

On the left hand sidebar you will see. Adwords Scripts

Adwords Scripts

Here is where  you will see all of the scripts that have been added to the Client Center. Once you add/create a script, you can set up a schedule for your script to run. That way you won’t need to go back into your script library and hit Adwords Scriptsto implement a script every time you need it run. This is especially useful when you have reporting scripts, or budget management scripts that should be running perpetually. Also, after the list of all your scripts, you will see Logs.

Adwords Scripts

This is a working history of your script runs. Here you will see when a script was run, its name and whether it made any changes or wrote anything to the logs.

To add a new script, just simply hit Adwords Scriptsat the top of the page here:

Adwords Scripts

This is where your script will inputted. The window is also a working IDE (Integrated Development Environment), so if you are going to be writing your own script, you can do so right here.

Adwords Scripts

But most of us will just be copying and pasting the code into the window. Here is where you’ll name the script, save it, and preview it. Previewing your script means that Google will run your script and show you all the changes and logs it would make to your account if it were actually run, but it won’t actually make any of those changes.

This tool is invaluable when it comes to debugging and making sure that you have the right script for the job you want to perform. To preview, just hit Adwords Scriptsonce your script is implemented in the window. Google requires you to authorize every script before you run or preview it. Just hit Adwords Scriptsand your script will be ready. After your script has been saved by hitting Adwords Scripts. You can hit Adwords Scripts to have your script actually run.  Your new script will now be in your script library and you can run it whenever you want or schedule it.

Implementing a script at the account level follows the exact same rules. The only difference is that the script libraries are stored in a different location.

When logging into your AdWords account, select which account you want to apply the script to here.

Adwords Scripts

Once you are looking at your account, hit Bulk Operations in the sidebar on the left.

Adwords Scripts

Bulk operations are tools used to automate your account by making multiple changes across the account. Obviously, we’re working with scripts so we are going to select Adwords Scripts here:

Adwords Scripts

Here you’ll be taken to the script library which operates exactly like the one at the MCC level.

Adwords Scripts

Now that you know where to implement scripts, let’s get to what you’ve been waiting for- some powerful scripts that you can start using today.

*Google’s IDE provides the best platform for editing your code, so copy and paste the code into their before following commented instructions within the code or updating variables.*

Now that you understand what Adwords scripts and how to implement, let’s get to the fun part…what scripts can you use to help improve your adwords account management?

5 Scripts For Reporting

  1.  Account Anomaly Detector (Single Account)
    1. This script will allow you to compare your Cost, Clicks, and Impressions against how these impressions have performed historically. If the current metrics vary greatly from the historical metrics, you (and anyone else you want) will receive an email. This script operates off a Google Spreadsheet.
    2. To run this script, you’re going to need to make a copy of this template and adjust the settings on the sheet according to your needs. You will then need to update the code with the URL of your copy of the spreadheet under“var SPREADSHEET_URL = ‘YOUR_SPREADSHEET_URL’;”
    3.  Source: Google Developers
    4. Source Code
  1.  Audit Checklist (Single Account)
    1.  This script will perform a simple audit on your account and make a log of all the errors it has. You are also able to specify the rules of the checklist.
    2.  To run this script simply copy and paste the code and change the rules within the code (don’t worry there are comments within the code to tell you what to change)
    3. Source:
  1. Store Account, Campaign, AdGroup, and Keyword Level Quality Score in a Google Doc.
    1.  This script will get the quality score of your campaign, ad groups, and keywords and store them in a Google Doc.
    2. To use this script all you need is a blank spreadsheet and insert the URL of the spreadsheet into the code.
    3.  Source:
  1.  Run a Campaign Performance Report Only on Campaigns With a Specific Label
    1. This script will run a campaign performance report on campaigns with a specific label.
    2.  To use this script, you obviously need to have one or more campaigns with a label. Then you’re going to need to define that label in the code (instructions on where to do that is provided in the code). The script will log the URL off a spreadsheet for the report.
    3. Source: Google Developers
    4. Source Code
  1.  Landing Page Watch Dog
    1.  This script will generate a report on the landing pages in your account and tell you if they have a “404” error, don’t load, or have other errors on them (ie: if the words “out of stock” or “not found” are found on your page.
    2.  You can give the sheet a URL to write the report to, or have the code make a new sheet for you. You will also need to specify which campaigns to look. All instructions for settings are in comments within the code.
    3.  Source: Optmyzr

5 Scripts For Bidding/Budget

  1. Bid to Position
    1.  This script will allow you to define a position you want your ads to appear, then adjust the bids on your keywords to reach a tolerance level near that position.
    2.  To use this script, simply copy and paste the code into AdWords then define your desired position, tolerance, and coefficient.
    3.  Source: Google Developers
    4.  Source Code
  1.  Multi-Bidder
    1. Allows for the account manager to set up rules for bidding for keyword. For example, the script can increase bids on keywords that pass a certain CTR threshold.
    2. To use this script, you’ll need to make a copy of this template to use as your bidding manager and update the URL in the code.
    3. Source: Google Developers
    4.  Source Code
  1.  Multi-Campaign Budget Manager
    1.  This script will turn a spreadsheet into a multidimensional Budget Manager.
    2.  You will need this template to use the script and update the URL in the code.
    3.  Source:
  1. Bid to Position (MCC Version)
    1.  This script does the same as the Bid to Position script above but at the MCC level, so it will affect all the keywords in all the specifically labeled accounts under your MCC account.
    2. To use this script, simply copy and paste the code into AdWords then define your desired position, tolerance, and coefficient.
    3.  Source: Google Developers
    4.  Source Code
  1. Pause Campaigns, Ad Groups, or Keywords When They Spend Too Much
    1. This script will pause campaigns, ad groups, and/or keywords with a specific label when they reach a certain level of spend as defined by you.
    2. You have to create two copies of the script, one that pauses the entities and one that unpauses them. The instructions are in the code as comments.
    3.  Source: Optmyzr

5 Scripts For Account Management

  1.  Delete All Disapproved Ads Within an Account
    1.  This script will remove all disapproved ads within an account.
    2.  Simple copy, paste, and run.
    3.  Source:
  1.  Poor Performing Keyword Labeler
    1.  This script will go through all your keywords and label the ones with High CPC and Low Conversions. It will also let you give different labels to Brand keywords.
    2. To use these scripts you can copy and paste the code, then add your brand terms within the variable “BRAND_NAMES.” More detailed instructions are provided within the code.
    3.  Source: Google Developers
    4.  Source Code
  1.  Merge Multiple Campaigns Together
    1.  This script will merge two, or more, campaigns together into one.
    2.  To use this script you will need to specify a “destination campaign” and “to merge campaigns” at the top of the script. Instructions are provided in the code.
    3.  Source:
  1.  Pause Keywords With No Impressions
    1.  This script will pause all keywords with no impressions.
    2. To use this script you’re going to need to update the email address at the top of the code with your own.
    3. Source:
  1.  Sale Countdown
    1.  This script will update ad params for ads in a given ad group to countdown towards a specific date.
    2.  To use this script you’re going to need to specify the ad group by name whose parameters you would like to update, and an end date for the when the “sale” starts. Instructions provided in the code.
    3.  Source: Google Developers
    4.  Source Code

Make sure to always preview your scripts before running them. Also, getting yourself familiar with javascript and Google’s API will only serve you well as you manage scripts. Taking the time to read scripts thoroughly to learn what the lines of code are doing will enable you to debug, appropriately update code, and perhaps write your own script or modify one of these. Scripts are one of the most powerful resources there is in AdWords, it is also one of the most underutilized due to people shying away from the Javascript code and prematurely labeling it as complex.

Maximizing the Potential for AdWords Scripts

We’ve given you examples of some scripts that you can quickly/easily plug in to your campaign.  Now let’s take this a step further.  What if you start combining the features and functionalities of different scripts into one?  And this script writes into one spreadsheet with multiple worksheets, synced with your account?  What if, instead of having to scan your account for low performing keywords, high converting keywords, duplicate keywords, etc…they all show up on a spreadsheet, where you can review, approve, make the changes, and they automatically update your adwords account?

This is exactly what you can do with Adwords Scripts, when you take them a step further.  In the example below you’ll find the specs to an adwords script that will allow search for different parameters and output them all on a spreadsheet, to be used when making decisions about the campaign:

Adwords Scripts

As you can see, there’s no code, no complex function calls and variables. It’s a description of what some script we wish we had would operate. You don’t even need to think in the context of scripts. That’s the interesting thing about using AdWords scripts, you start development at the end.

Once you have clearly defined guidelines about what YOU need to maximize your account, you can conceptualize this and then simply find a programmer with experience in Javascript to write the script for you.  It is no cliche when we say that the only limit to AdWords scripts is your imagination, and determination.

Scripts can even connect to third party sites and external devices. Allowing you to create ads and keywords via text message or take real time data from weather sites or Facebook and inserting it directly into your ads.

Adwords Scripts should be essential to any Adwords manager’s arsenal.  If you aren’t yet using them, head to our Adwords Scripts directory right now and start experimenting!

The following two tabs change content below.
Search engine marketing expert with 15 years of experience in the industry, working with small mom and pop shops as well as large corporate websites. I have experience with all aspects of inbound marketing, including SEO, Link Building, Social Shares, Usability, Conversions, PPC, Email Marketing, and more.