AdWords Scripts are one of the top ways to start automating the most repetitive tasks that can drain the profits out of an agency or the joy out of the job of an in-house PPC manager.
I’ve been sharing scripts with the advertising community for a long time and by now there are hundreds of free scripts that anyone can use by simply copy-and-pasting some code into an AdWords account.
But with so many free scripts to choose from, analysis-paralysis may set in.
So following on the theme from my last post about ways to get going with automation today, here are five PPC tasks that are great for automating with scripts, and some specific scripts that should be at the top of your list to try.
There aren’t a ton of people publishing free scripts so many of the ones included in this post were written by myself, my company (Optmyzr), and FreeAdWordsScripts.com (a site we manage).
Thanks to Daniel Gilbert, Steve Hammer, Martin Roettgerding, Derek Martin, Sean Dolan, Russell Savage, and Nathan Byloff for all the open source scripts you’ve provided, many of which are on this long list of free scripts.
1. Budget Scripts
Because automation done with scripts don’t usually have a nice user interface (unless you use Enhanced Scripts), they don’t lend themselves particularly well to automating tasks that require a lot of complicated settings and human oversight.
Some of the best things to automate are tasks where the decisions are cut-and-dry.
A Script for Pausing All Campaigns When an Account Spend Is Too High for the Month
Luckily, a lot of budget optimizations require only a simple binary decision.
For example, one of the most straightforward optimizations is to check when an account has spent more than its overall monthly budget and to pause all active campaigns until the next month starts.
That’s a great optimization to automate with an AdWords script because it has one simple input: the maximum monthly budget.
It requires no fancy UI for confirming the changes it makes. It just needs to pause campaigns, label them, and send an email with the summary of what was done to the account owner.
(Note: This particular script isn’t able to pause shopping campaigns, video campaigns, and experiment campaigns so it may not be right for more advanced accounts.)
If you’ve been frustrated at Google’s change to how much overdelivery a campaign can have, you can use a script to check the daily spend and how it compares to the daily budget.
Once it exceeds the allowed spend by some factor, like 20 percent, the campaign can be automatically paused for the remainder of the day.
(Note: Because a script can be automated to run at most once per hour, keep in mind that your campaign could continue to run once it exceeds its spend limit for almost another 60 minutes so set your targets a bit lower than what you really want.)
Sometimes spending too little is just as bad as spending too much, especially if you’re an agency getting paid a percent of media spend.
This script from Google automatically increases your daily budget to help you compensate for slow days when you’re trying to hit a certain target for the month.
(Note: Optmyzr has a variation of this script which accounts for historical day-of-week patterns so that we’re setting higher budgets for days of the week when we know there is more opportunity.)
2. Ad Maintenance Scripts
Writing great ads still takes some human intuition about what message may resonate with the target audience so ad creation is not typically something that lends itself well to automation.
However, once your ads are built, there is a lot of work that should be done like removing losing ads, updating special offers, and checking for broken landing pages. All these tasks are perfect for automations with scripts.
So here are some of my favorite scripts for maintaining a clean, well-optimized set of ads.
Virtually all advertisers run into approval issues with Google. If you’re anything like me, you tend to ignore some of these disapprovals because you know there are still other active ad texts in the affected ad groups.
But over time, these disapproved ads can become annoying because they generate warnings, and generally clutter up the interface.
And, in some cases, I’ve even see disapproved ads that were several years old cause issues because they were violating a new policy and Google was assuming that since the ad was not removed, it might still be something the advertiser intended to run at a future time, and the whole account got suspended.
Going a step further than simply removing disapproved ads, you can also write a script to deal with basic disapproval issues, like when an ad is rejected by Google for using excessive capitalization.
This script looks for disapproved ads and resubmits them with less capitalization.
3. Bid Management Scripts
Bid management is all about math, statistics, and predictions. So it’s no surprise then that letting the machines crunch the numbers is a great automation.
Luckily there are simple bid management scripts, too. So let’s start with those.
A Script to Either Bid to Impression Share or Bid to Position
If you’re looking to do something simple, like bidding to position, that’s easy and requires only simple inputs, like the target range. An interesting variant of this type of bidding can also be done with this script written by Google which targets a range of impression share.
Whereas most scripts are about automating something that could also be done in AdWords, maintaining different hourly dayparts is something you can only do with an automation since Google restricts advertisers to six active dayparts per day.
But thanks to this script, which adjusts the hourly bid adjustments for the next upcoming hours, it becomes possible to have a different bid adjustment for every hour.
And the beauty of scripts is that you get to modify the underlying code yourself. So if you wanted to have different bid adjustments every 15 minutes, that could easily be added to this script.
One of the key benefits is that with a script you can always start with something simple, say a rule that just increases bids if your ads are below their minimum target rank.
But once you start to understand other elements that drive success, you can refine that rule. In this script, a cost per conversion target has been added as a criteria along with average position.
The weather-based bidding script is the classic example of the power of scripts. But even if you don’t care about the weather in your business, it still illustrates that scripts can be connected to proprietary business data or data outside of AdWords. And if weather does matter to you, try Google’s bid by weather script.
4. Inventory Scripts
Scripts won’t write any award-winning ads, but when all you need is a quick account buildout from structured data and the ability to sync ads with changes in pricing, scripts are perfect.
The classic use case I see a lot is automotive advertisers who want to build out ad groups for all the vehicles they sell.
Because the ad groups follow a fairly well-defined template based on attributes of the cars for sale, this is a perfect automation to build with a script.
All the data about what’s for sale goes in a Google spreadsheet, and the script follows the template for generating ad groups, ad texts, and keywords.
The result is a fully built-out campaign in minutes rather than hours.
A Script to Update Your Ads with the Latest Prices and Discounts
Once you’ve created a campaign based on inventory, it makes sense to deploy ad parameters to make sure the ads show the right discounts and prices.
This is something that’s only possible with a script or an API solution because ad parameters are not editable in the AdWords UI.
5. Alerting Scripts
Constantly checking accounts can be a pain, but it’s necessary if you want to know quickly when things aren’t going as planned.
While you might mind if your boss told you to check accounts every hour, including on the weekends and at night, an AdWords script excels at this.
And because AdWords Scripts can access all reports from AdWords, even the stuff you don’t see in the AdWords UI, they can even do the type of analysis that humans can’t do.
This script does something quite simple: it looks for product groups or keywords that have spent more than a certain amount with fewer than some conversions over a given date range.
This can be done in Automated Rules, but those can only trigger once per day. That’s simply not frequent enough when dealing with high-spending accounts. So this script can do the same task 24 times a day.
While the previous script looks at the lowest level elements of an account (keywords and product groups), this one looks at the account-level to find unusual patterns.
This Google script compares normal performance at a given hour of the day for each day of the week and triggers an alert if the current metrics deviate too much from what’s expected.
More PPC Resources:
- 5 Ways to Automate More of Your PPC This Year
- How to Use Automation to Boost PPC Performance
- 24 Essential Apps to Manage Your PPC Campaigns from Anywhere
Subscribe to SEJ
Get our daily newsletter from SEJ's Founder Loren Baker about the latest news in the industry!