Learning Adwords Scripts

Adwords Scripts have been around for several years. Scripts are basically a little snippet of code that you add to your Adwords account, and they do several things, including:

• Run reports and email them to you or output into a Google Sheet
• Notify you of changes to your account performance
• Make changes to bids, ads, campaigns, etc.

Scripts are a type of account automation, and can be highly useful.

I’m ashamed to admit that I haven’t ever set up a single script.

I have a couple PPC accounts using scripts that other people set up, but I’ve never done one myself. I know from conversations in PPC Chat that I’m not alone, either. So, let’s learn Adwords Scripts together.

Finding a Script

Thankfully, there are several resources where you can find free Adwords Scripts without having to write your own. (If I have to write my own, I’m done, right now.) Here are a few resources I’m aware of; I’m sure there are more.

Free Adwords Scripts. There are a bunch of free scripts on this site. We’ve used a few of them, including the ad test significance script. It’s not perfect, and I like AdAlysis better for this task, but it’s better than cranking ad copy test data by hand.

Optmyzr. Frederick Vallaeys, a former Google employee, has some free scripts on his site you can use. If you’re an Optmyzr customer, there are many more scripts available. There’s also a how-to on installing scripts.

The Adwords interface. Adwords has a whole library of free scripts, helpfully organized by task.

Koozai’s big list. A list of 100 free scripts.

Using a Script

OK, finding a script is pretty easy. Implementing it is what scares me. I’m going to walk through the steps here, so we can learn together.

I’ve decided to try the Declining Ad Groups Report from the Adwords script library. It seems like a helpful script, and it doesn’t make any changes to your account – it just outputs the results into a Google Doc that you can review.

The instructions are all at the script URL, so I won’t re-copy them in detail here. The first step is to copy the Google Sheets template, and save it:

OK, that was easy enough. Now, we go to Scripts in Adwords to create a new script. It’s in the Bulk Operations menu in the left nav.

Click the +Script button, give the script a name, authorize it, and save it.

Then, paste in the code for the script from the Adwords site:

For this script, I also had to make one change to the code to paste the URL of my Google Sheet in the designated spot. It was easy to do, based on Google’s directions. Click save, and then Preview to preview your script results.

The results will populate in the Google Sheet:

OK, this is cool. I now have a list of ad groups whose performance has been declining over the past 3 weeks. The account to which I added this script is large, and also fairly new to us, so we’re still getting the feel of it. This script will help me pinpoint ad groups that need attention.

I scheduled the script to run once a week:

I set it for Sunday so it will be ready for me every Monday morning. The script sends an email to me every time it runs, so I don’t have to remember to go check the Google Sheet for updates. You can also click the “Run” button to run the script immediately.

So, How Was It?

As I said, until now I’d never set up a script before. I have to say, this was a lot easier than I expected! I thought there would be complicated changes to the script language that I’d have to make, but there was only one, and it was easy:

I just had to replace “YOUR_SPREADSHEET_URL” with the URL of my Google Sheet. Easy! If you’re used to looking at website source code, simple changes like this are no big deal.

Of course, I immediately started to wonder if I could add metrics to this script. For example, I’d love to add conversions, cost per conversion, and conversion rate to the metrics, in addition to cost and CTR. I have no idea how to do that. I suppose I could copy the part of the code for CTR and change it to conversion rate, but I don’t know if that will work. For now, CTR and cost are fine – for this client, these are important metrics, so I can live with that for now. But for other clients, the only metrics I’d care about would be conversions and cost per conversion. I’d love to know how to modify the script to include those, or swap them for CTR and cost. Anybody know how?

I’m pleasantly surprised at how easy this was. Here I’d been scared to try scripts! So if you’ve been putting off trying out Adwords Scripts, stop waiting and give them a try.

What are your favorite Adwords Scripts? And seriously, if you know how I can add conversions and cost per conversion, share in the comments!

Related Posts: