Complete Guide to Google Adwords Scripts: Set Up and Best Practices

Have you ever checked your Google Adwords account, only to find the worst?

Source: Giphy

No matter how much time and effort you put into your AdWords campaigns, some things just don’t go as planned. Depending on how many other hats you’re wearing for the marketing team or business as a whole, you don’t have time to keep a constant eye on budgets, broad match keywords, quality scores, click-through-rates, budget pacing, etc. etc. etc.

Fortunately, Google AdWords Scripts can help you automate everyday tasks like pausing low-performing ads or alerting you when certain account conditions occur via Slack, email, or text. Before we share our 10 most useful scripts with you, let’s understand scripts a little better so you can use them with confidence in your AdWords account once you’re done reading!

What are Google AdWords Scripts?

According to Google, AdWords Scripts are built using “a JavaScript cloud scripting language that provides easy ways to automate tasks across Google products and third party services and build web applications.”

Basically, Google Scripts are pieces of code that can interact with your Google AdWords Account! If you’re like me and have never touched a line of code in your life, you are probably thinking about ending this article a little early…but here’s a secret:

You do not need to write a single line of code or have any coding experience to utilize Google Scripts in an effective manner.

There are a ton of incredible prewritten scripts, like ones that can adjust your bids based on the weather, or leverage Amazon to find high commercial intent keywords. These scripts can be easily applied directly to your AdWords account, which provides three major benefits:

Automating tedious tasks and making changes to a large number of AdWords campaigns or accounts.

Setting safeguards and notifications on your ads that respond to an external trigger.

Aggregating and analyzing different campaign metrics.

How to Access the AdWords Script Console

Before we dive into the list, we put together a quick tutorial on how to access Google Scripts. If you are familiar with the process, feel free to skip this section, or watch our video tutorial.

When using scripts, make sure you click PREVIEW to make sure everything runs smoothly before saving, as well as Authorize now

Hitting “Run Script Now” will execute the script. However, you are going to want to run most of these scripts daily or even hourly. Rather than manually executing a script, we can tell Google to run the script at a set interval. Save the script, go back to bulk operations, click scripts, and next to the script you just created, click ‘create schedule’, and set the frequency. The script will automatically run and execute its task every period.

The script will also generate a graph that represents an aggregated average of all your quality scores over time. Once you authorize and run the script, the report should be in your Google Drive. PPC-Epiphany recommends running this script daily.

This script creates a Google Sheet that provides a full report of your entire AdWords account, which will include metrics such as date, CPC, CTR, impressions, and average position. Setting the script’s frequency to daily will send detailed daily reports straight to your email address.

Set up is fairly straight forward. Create a copy of this spreadsheet, and enter the spreadsheets URL into the script.

You can also enter your email address into the spreadsheet to get the report emailed to you daily, as well as change the “Last check” date in the spreadsheet to aggregate data starting from a specific time. Google recommends you schedule this script to run “Daily, 3 am or later to guarantee accuracy.”

If you are a Slack fanatic like us, this script will take your experience to the next level. This script will send a notification via Slack when any of your active campaigns fall below a set CTR. Set up is 3 quick steps: you will need a Slack Webhook URL. First, go to this page, scroll down and click Set up an incoming webhook

Click Add Configuration and select which channel you would like the notification to go to. Copy the Webhook URL given (https://hooks.slack.com/services/….)

Now in the script, replace “WebHook URL” with your given URL, “CHANNEL” with the channel you would like to receive the notification, and “CTR” with the level you would like the notification to trigger. (Keep the URL and channel in quotations, and leave the CTR number out of quotations.)

It’s up to you how often you would like the script to run. I like to set the frequency to “daily”, and I receive notifications when any of my campaigns fall below a CTR of .05.

This Script allows you to receive a text message and email when one of your ads is disapproved. You will need to sign up for a free Twilio account, and place your API Key (Sid) and Token in the code, along with your Twilio phone number, your personal phone number, and your email.

Have you ever realized that your ad just isn’t working, but already spent money on the failed campaign before you could pull the plug? With this script, you can automatically pause the worst performing ads in an ad group. (you can also run the same process for impressions with this script.)

Google Ad Scheduling only allows for six bidding windows in one day. If you are the average marketer, this is more than enough time; however, the data-driven marketer would like as many bidding opportunities as possible. Luckily, with the magic power of scripts, the dream becomes a reality. This tool by Brainlabs allows you to enable bid adjustments for every hour of the day. More time = more money.

Google Adwords allows you to automatically pause a campaign when the campaign’s budget is met. With this script, you can pause all campaigns when the total account level cost meets your budget. Simply set “monthly_budget” equal to your budget, and schedule the script to run hourly. The script will pause all active campaigns in an account if the month’s budget is exceeded.

Google already provides you with some powerful testing tools like image ad rotation and bulk uploading ready-to-test expanded text ads. This script automatically applies different bids to your ads, and records the results in a Google spreadsheet. Depending on the scheduled interval you set the script for, a new bid will be applied based on the previous period’s bid.

What to look for: You can quickly view performance depending on bids, which can reveal serious money-saving opportunities. What if bidding into position #1 is twice the cost, but only generating 25% more conversions than a lower bid in position 2 or 3? This script can tell you just that.

Every marketer knows that urgency is a powerful sales tactic that can dramatically increase the effectiveness of an ad. This script allows you to display up-to-date values in ad text. This kind of automation is perfect if you are running a promotion or sale; the script calculates how many hours and days until a promotion is over, which is incorporated into the ad text.

If you ever need to create presentations on ad performance, this is the perfect script to quickly automate the process. The script will create a Google Slide into your Google Drive, with each slide containing information on each active campaign, displaying key performance metrics from the month including impressions, cost, and CPC.

Setting up permissions for the Slides API is a two step process- you need to click on Advanced APIs in the scripts console, and check off “Slides”.

After that, click on the Google Developers Console link, and search for “slides” in the Google API manager dashboard. Click “Enable”

And that’s it! Copy and paste the script and watch in awe as the magic of AdWords Scripts automates your reports into a Google Slide presentation.

What is your favorite script?

Thanks for reading! Leave a comment if you have any trouble implementing a script, or if you want to share how you are implementing your scripts!

Thanks for pointing out that issue- it turns out the script is no longer functional, so I went ahead and fixed the code! The script should work now- just replace “monthly_budget” with your budget, and run the script hourly. Once the budget is met, all your campaigns should be paused.

Figured it out! When you copy and paste from our website, the quotation character (“) was not properly copying over. I just made the change that will allow the characters to be copied over, try it out and let me know!

Sorry about that- it seems like a copy/paste error again. I reconfigured so copying the code should now work!
Also, if you click the title of the script, you can navigate to the original source of the script and find more information/ a better format.