• 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 a script that copies audiences to all your campaigns

Columnist Daniel Gilbert of Brainlabs shares a nifty shortcut for replicating audiences across campaigns.

Daniel Gilbert on April 19, 2017 at 2:50 pm
  • More

Making good things better is… good. Take campaign-level audiences — they’re good, but wouldn’t meta-campaign-level audiences be even better? Sure.

To reiterate, campaign level audiences are great. You don’t have quite as fine control as with ad group-level audiences (and it’s annoying you can’t have ad group and campaign audiences together!), but they’re much easier to keep track of, because there are a lot fewer of them.

(Plus, there’s a pesky limit of 5 million ad group targeting criteria in an account — which sounds like a lot but is easy to eat up when you’ve got lots of keywords, lots of negatives, a granular structure, duplication for different locations, and then want a handful of audiences in each group.)

But there’s still some slightly tedious work involved in making sure you’ve attached audiences to all campaigns. And not to be rude to humans, but this does leave room for some good old human error (e.g., forgetting to add to new campaigns, for whatever reason).

Obviously, the tech team at Brainlabs (my employer) couldn’t resist the opportunity for some script-based innovation. It’s a bit like the one I shared a few months ago to copy extensions and lists across your account, which was a classic. You set up the audiences (and bid adjustments) you want in one campaign, then the script uses that as a template and copies those audiences to all the other campaigns.

The script won’t remove existing audiences, but if a campaign was already targeting an audience, then the bid modifier may be overwritten. So, when audiences have been copied into a campaign, that campaign is labeled so the script ignores it on future runs — then you can exclude the audiences or change the modifiers however you like. You can rerun the script whenever you feel like it, to make sure any new campaigns have the audiences set up, and it won’t mess up the tweaks you’ve made in the old campaigns.

Sadly, you have to delete any ad group-level audiences before running the script. If there’s a campaign that has ad group audiences, even if they’re paused, then the script can copy campaign-level negative audiences, but not positive ones.

If you want to give it a go, copy the code below into a new AdWords Script in your account. Then change some of the options:

  • campaignNameContains is used to filter the campaigns the script looks at: if you only want the script to look at campaigns which have certain words or phrases in the names, put those words or phrases in the square brackets, in double quotes and separated with commas. For example, if campaignNameContains is ["Brand", "Generic"], then only campaigns with names containing “brand” or “generic” are included.
  • campaignNameDoesNotContain is the same, but for words or phrases in the names of campaigns you want the script to ignore. For example, if campaignNameDoesNotContain is ["Display", "Competitor"], then any campaigns with names containing “display” or “competitor” are ignored.
    • campaignNameContains and campaignNameDoesNotContain are not case-sensitive.
    • Leave them blank, [], to cover all campaigns.
    • If you need to put a double quote into either, put a backslash before it.
  • If ignorePausedCampaigns is true, then the script will only look at currently active campaigns. Set this to false if you want to apply audiences to currently paused campaigns.
  • If includeShoppingCampaigns is true, the audiences will be copied to Shopping campaigns, as well as Search campaigns.
  • campaignToCopy is the name of the template campaign whose audiences will be copied. This is case-sensitive.
    • The template campaign can be paused, but it can’t be removed.
  • labelName is the name of the label which will be applied to campaigns once they’ve had the audiences added. This means you can see which campaigns have been covered. Campaigns that already have the label will be ignored; if the script doesn’t cover them all in one run, it can go again until it covers them all.

Remember, you need to delete all ad group-level audiences before running the script! Otherwise you’ll get errors where the audiences couldn’t be added. If you have campaigns where you want to keep the ad group audiences, you may want to get the script to skip over them entirely: you can put their names in campaignNameDoesNotContain, or you could label them with the labelName used to show which campaigns already have audiences.

Notes:

  • This doesn’t work on Universal App or Video campaigns.
  • Scripts can only run for 30 minutes, which may not be enough time if you’ve got lots of campaigns or lots of audiences. But if the script times out, you can just run it again — it will say in the logs when everything has been covered.


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: Behavioral TargetingSearch 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