Use AdWords Scripts to Streamline Your PPC Optimization Efforts

There is only so much time in each day. Spending half your day in AdWords and the other half in Excel is the first step in going crazy.

AdWords Scripts allows users to work directly with Google AdWords API and pull data in Google Spreadsheets or other data housing software.

Here are a couple of easy ways AdWords Scripts can be utilized to streamline your optimization process.

Advanced Reporting

One of the most time consuming aspects of client reporting is the effort it takes to download and sort through ridiculous amounts of data. From a time management perspective, more than 50 percent of your time can be dedicated to finding the right data, cleaning it up, and getting it to a point where it can be client facing.

By using AdWords Scripts, you can create a reporting template once, and refresh the data whenever your report is due. Combining the use of the API with a few pivot tables and v-look ups, you can completely automate your reporting process.

Account Alerts

Whether it’s because you manage too many clients, or because you accounts contain too many keywords and ad text variation, you may not be able to keep a watchful eye on everything that goes on in your accounts. AdWords Scripts can actually help you understand the areas of your account that need immediate attention.

Email alerts can be set up if certain metrics rise above or below a set threshold. For example, you can set up an email alert to let you know if your average click-through rate (CTR) for an ad group or campaign falls below the industry standard of 2 percent. You could also set it to alert you if your daily budget is reached early in the day.

Ad Params

A small change in ad text often causes your ad to trigger a review process and lose all previous performance data. When Ad Params are utilized, numerical values can be changed without triggering the review process. This process can be used to countdown the number of hours left in a sale or a decreasing percentage off of a sale.

Duplication of Ad Groups

Through AdWords Scripts, ad groups can be easily copied and duplicated. This is extremely helpful if you happen to separate your ad groups by match type. Instead of recreating an ad group three times, simply copy and edit the match types.

How to Get Started

In the left navigation menu in AdWords, select bulk operations. Under this category you simply click on Scripts. When the interface loads, select Create A Script.


You’ll then be promoted with an area to input a piece of JavaScript. An example of a simple script to run would be the following:

function main() {
var keywords = AdWordsApp.keywords()
 .orderBy(“clicks DESC”)

Logger.log(“25 keywords with most impressions yesterday”);
while (keywords.hasNext()) {
 var keyword =;
 Logger.log(keyword.getText() + “: ” +

What Does it Output?

This script will output exactly what you expected. The top 25 keywords by clicks, in descending order for yesterday. If you’re interested in getting started, you can play around by changing such variables as orderBy, forDataRange, and withLimit.

Now there are definitely more complex and actionable options. But this is a great way to get started and to begin harnessing the power of Google Scripts. Google has quite a few tutorials available here that can help you get started.

Related reading

traffic forecasting customer journey
Making the case for more non-brand funding in paid search
Five things to do on a small digital marketing budget
The fall of ad copy, long live ad copy