• Search Engine Land
  • Sections
    • SEO
    • SEM
    • Local
    • Retail
    • Google
    • Bing
    • Social
    • Resources
    • More
    • Home
  • Follow Us
    • Follow
  • Search Engine Land
  • SEO
  • SEM
  • Local
  • Retail
  • Google
  • Bing
  • Social
  • Resources
  • Live
  • More
  • Events
    • Follow
  • SUBSCRIBE

Search Engine Land

Search Engine Land
  • SEO
  • SEM
  • Local
  • Retail
  • Google
  • Bing
  • Social
  • Resources
  • More
  • Newsletters
  • Home
SEM

Here’s an AdWords script to fill empty ad groups

Columnist Daniel Gilbert of Brainlabs makes sure you don't lose traffic due to missing ads.

Daniel Gilbert on November 29, 2016 at 9:27 am
  • More
full adwords ad groups

As you’ve probably noticed, Christmas is coming. It’s a busy time of year for many of us. But busy means both that it’s easy to make mistakes and that it’s important not to let them slide.

That’s why it’s important to automate what you can: when it gets busy, mistakes can be caught — and even corrected — without taking up your valuable time.

So you want to make sure you didn’t pause your Black Friday ads with no active ads to show in their place. You want to be sure you don’t have an ad group where all the ads are disapproved. And you want to be sure that you did create ads in those brand-new ad groups filled with new, seasonal keywords for new, seasonal products.

I’ve already shared a script to find ad groups with no ads. But with this newest script from Brainlabs (my employer), you can go one better: you can automatically create an ad, filling the empty ad group and making sure you don’t pass up valuable traffic.

Sure, it’s only a generic ad — and we all know it’s important to get ads as specific and relevant as possible. But the new ads are all labeled, so you can easily find them and rewrite them. And in the meantime, you’re getting clicks you’d otherwise have been missing out on.

What’s more, Google is eventually going to get rid of standard text ads. We don’t know when this is going to happen (You won’t be able to create new standard text ads after January the 31, but existing ones will still serve traffic), but it always pays to plan ahead. So you can also use this script to put an expanded text ad into all ad groups that don’t already contain an ETA.

To use the script for yourself, open a new Script in AdWords and copy in the code below. Then change the settings at the top:

  • campaignNameContains and campaignNameDoesNotContain filter which campaigns the script will look at. For example, if campaignNameContains is ["Brand", "Generic"], then only campaigns with names containing “brand” or “generic” are included. If campaignNameDoesNotContain is ["Display", "Competitor"], then any campaigns with names containing “display” or “competitor” are ignored.
    • This is not case-sensitive.
    • Leave blank, [], to include all campaigns.
    • If you need to put a double quote into campaignNameContains or campaignNameDoesNotContain, put a backslash before it.
  • ignorePausedCampaigns should be set to true if you only want to look at currently active campaigns, or false if you want to include paused campaigns as well.
  • ignorePausedAdGroups should be true if you only want to look at currently active ad groups, or false to look at active and paused ad groups.
  • checkedLabelName is the label to show which campaigns and ad groups the script knows aren’t empty (as either they were already full or they’ve just had a new ETA added). This means you can rerun the script as much as you need if your account is so big the script timed out — anything with this label will be ignored in future runs.
    • You could also manually label campaigns and ad groups with this label, to prevent the script from checking them.
  • newAdLabelName is the label given to the expanded text ads that the script creates.
  • If onlyLookForETAs is true, then the script will create an expanded text ad in any ad group that doesn’t contain one. If it’s false, the script will check if there is already an ad of any type — like a standard text ad or a banner ad — and only create an ETA if there are no ads of any type already there.
  • There are six variables to make the new ETA from:
    • headlinePart1 and headlinePart2 are the headlines (max of 30 characters).
    • description is the description (max of 60 characters).
    • finalUrl is the landing page. If this doesn’t start with “http://” or “https://” the script will add “http://” for you.
    • urlPath1 and urlPath2 are the paths that show in the display URL. They are optional, so leave as "" if you don’t want them (max of 15 characters).

AdWords Scripts can only run for 30 minutes at a time, so if you’ve got a big account, you may not be able to cover all campaigns in one go. That’s why the script labels the ad groups and campaigns once they’re processed: if the script times out, then you can just run it again and again, and it will always look only at ad groups it hasn’t checked before.

The script will check the ad text you’ve given, to make sure you’re within the character limits and you don’t have too many exclamation marks, but AdWords may still refuse to make your ad because of policy violations. This won’t be flagged in preview runs; once you’ve run the script, you need to check the logs for messages about ads not being created. Note that ad groups where ads couldn’t be created won’t be labeled, because they’re still empty — so if there are problems, you can just change the ad text and run the script again.

If you don’t want to use the same template ad everywhere, you could run the script multiple times: use the campaignNameContains to look at different campaigns each time, and change the template ETA each time to suit those campaigns.


Opinions expressed in this article are those of the guest author and not necessarily Search Engine Land. Staff authors are listed here.



About The Author

Daniel Gilbert
Daniel Gilbert is the CEO at Brainlabs, the best paid media agency in the world (self-declared). He has started and invested in a number of big data and technology startups since leaving Google in 2010.

Related Topics

Channel: SEMGoogleGoogle AdsGoogle: Ads ScriptsPaid Search ColumnSearch AdsSearch Ads: GeneralSearch MarketingSearch Marketing: General

We're listening.

Have something to say about this article? Share it with us on Facebook, Twitter or our LinkedIn Group.

Get the daily newsletter search marketers rely on.
See terms.

ATTEND OUR EVENTS

Lorem ipsum doler this is promo text about SMX events.

February 23, 2021: SMX Report

April 13, 2021: SMX Create

May 18-19, 2021: SMX London

June 8-9, 2021: SMX Paris

June 15-16, 2021: SMX Advanced

August 17, 2021: SMX Convert

November 9-10, 2021: SMX Next

October 2021: SMX Advanced Europe

December 17, 2021: SMX Code

Available On-Demand: SMX

×


Learn More About Our SMX Events

Discover actionable tactics that can help you overcome crucial marketing challenges. Our next conference will be held:

MarTech 2021: March 16-17

MarTech 2021: Sept. 14-15

MarTech 2020: Watch On-Demand

×

Attend MarTech - Click Here


Learn More About Our MarTech Events

White Papers

  • 6 Powerful Ways Experience Analytics Can Help Your Business Now
  • Email Tune-Up: A 5-Point Inspection to Get Your Program in Gear
  • Digital Marketing Report Q4 2020: Benchmarks and Insights for 2021
  • Data SEO – The Next Big Adventure
  • Getting Started with Email Marketing Automation
See More Whitepapers

Webinars

  • How to Avoid the Digital Transformation Trap
  • How to Build a Marketing System of Record
  • Meet BIMI: The brand-boosting email security marketers must have for 2021
See More Webinars

Research Reports

  • Local Marketing Solutions for Multi-Location Businesses
  • Enterprise Digital Asset Management Platforms
  • Identity Resolution Platforms
  • Customer Data Platforms
  • B2B Marketing Automation Platforms
  • Call Analytics Platforms
See More Research

h
Receive daily search news and analysis.
Search Engine Land
Download the Search Engine Land App on iTunes Download the Search Engine Land App on Google Play

Channels

  • SEO
  • SEM
  • Local
  • Retail
  • Google
  • Bing
  • Social

Our Events

  • SMX
  • MarTech

Resources

  • White Papers
  • Research
  • Webinars
  • Search Marketing Expo
  • MarTech Conference

About

  • About Us
  • Contact
  • Privacy
  • Marketing Opportunities
  • Staff
  • Connect With Us

Follow Us

  • Facebook
  • Twitter
  • LinkedIn
  • Newsletters
  • Instagram
  • RSS
  • Youtube
  • iOS App
  • Google Play

© 2021 Third Door Media, Inc. All rights reserved.

Your privacy means the world to us. We share your personal information only when you give us explicit permission to do so, and confirm we have your permission each time. Learn more by viewing our privacy policy.Ok