Shared Campaign Negative Lists

A script which shares negative lists across multiple campaigns.

Shared campaign negative lists are really useful for making sure all of your campaigns are excluding the same terms. If you’re constantly mining search query reports, you’re also constantly finding new negatives, and there are also shared lists for campaign placement exclusions.

But how do you know if a campaign is missing a shared list?

When you’ve made a set of new campaigns, applying shared lists to all of them is tedious work – and it’s easy to accidentally leave one out. Moreover, it’s hard to check if you’ve actually done it right. If you go to the Shared Library in your account, you can go to each list and see the names of the campaigns that share the list, but you have to do that separately for each list and you can’t see more than 500 campaign names at a time.

What the script does

This script lets you copy shared lists to other campaigns once you’ve set one template up in a single campaign, saving you lots of time setting the same things up elsewhere and making it easier to add all your negatives to future campaigns. 

You can define which campaigns your lists are copied to (in case you want different lits across your campaigns), and the script won’t remove your existing lists either: it only adds to them (so you can re-run the same script for new campaigns without messing with existing ones).

How to set the script up

Just copy the code below into a new Google Ads script, and change these options at the top:

  • Use campaignNameContains and campaignNameDoesNotContain, to filter which campaigns are changed. 
    • 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 not exclude any campaigns.
    • If you need to put a double quote into campaignNameContains or campaignNameDoesNotContain, put a backslash before it. For example, if the campaign name is 9″ Tablets, you’d enter it as 9\” Tablets.
    • If you’ve got campaigns split by match type, you could use something like “-Exact” or “|EM” to show which campaigns are Exact match; you could add that to campaignNameDoesNotContain so the lists only get added to Broad or Phrase match campaigns.
  • If ignorePausedCampaigns is ‘true’, then the script will only look at currently active campaigns. Set this to ‘false’ if you want to look at currently paused campaigns.
  • campaignToCopy is the name of the template campaign, whose shared lists shall be copied. This is case-sensitive.
    • The template campaign can be paused, but it can’t be removed.
  • Set copyNegativeKeywordLists to true to share campaign negative keyword lists.
  • Set copyExcludedPlacementLists to true to share campaign excluded placement keyword lists.
    • Obviously, at least one of copyNegativeKeywordLists and copyExcludedPlacementLists needs to be true, otherwise the script won’t have any lists to share!
  • labelName is the name of the label which will be applied to campaigns once they’ve had the lists 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.

You may want to run the script more than once for different sets of lists. For example, say you had different lists for generic and brand campaigns. You might want to do one run with campaignNameDoesNotContain set to [“Brand”] and campaignToCopy set to a non-brand campaign’s name to cover all the generics.

Then, you could change the settings so campaignNameDoesNotContain is [], campaignNameContains is [“Brand”] and campaignToCopy is a brand campaign, allowing you to do a run on just the brand campaigns.

Notes:

  • The Script can’t tell the difference between “Search,” “Display” and “Search with Display Select” campaigns. You have to use the campaign names to make sure negative lists intended for Search don’t end up in Display campaigns.
  • Scripts can only run for 30 minutes, which may not be enough if you’ve got thousands of campaigns and lots of lists. But if the script times out, you can just run it again — it will say in the logs when everything has been covered.

The code