Use ad exclusions to block ads

Block ads trafficked in Ad Manager from selected inventory

Sometimes it's important to prevent certain categories of line items from running on certain parts of your content. Using labels, you can group line items and prevent them from running on the ad units that you specify.

For example, if you've got a news story about a plane crash, you probably don't want to run airline ads next to it. In these kinds of emergency situations, you can use ad exclusions to stop line items temporarily. First, set up ad exclusions by applying labels to line items and ad units. When it's time to block ads, simply activate the ad exclusions you've created.

Ad exclusions can also be applied to advertisers, which blocks all line items from the excluded advertisers. However, the blocking only applies to line items that were trafficked in Ad Manager. If you're using dynamic allocation, the blocked advertiser's ads from Ad Exchange can still be delivered. To block an advertiser across both Ad Manager and Ad Exchange, use unified advertiser exclusions.

Create ad exclusions

There are two parts to creating ad exclusions.

Create ad exclusion labels and apply them to line items

  1. Create an ad exclusion label. Learn more
  2. Apply the ad exclusion label to line items. You can also apply the label to orders or advertisers; the label will be inherited by all of the line items that belong to the order or advertiser. Keep in mind that blocking an advertiser only blocks the advertiser's line items trafficked in Ad Manager, not dynamically allocated impressions from Ad Exchange.

Set up Ad Manager ad exclusions for inventory

  1. Sign in to Google Ad Manager.
  2. Click Inventory and then Ad Manager ad exclusions and then New ad exclusion.
  3. Enter a name for the ad exclusion.
  4. (Optional) Change the status to Inactive if you want to save the ad exclusion for later use.
  5. Select ad units and placements for the ad exclusion. Browse or search and click include for the appropriate inventory.
    Ad exclusions apply to children of selected ad units or placements.

    If your network uses video content bundles, choose "Video content" as the type and select the scope at which the ad exclusion should apply, either "stream" or "pod."

    Note: Some of these features might not be enabled for your network.

  6. Choose which labels to block and allow. If you don't select Block all, line items will be blocked if they have any of the ad exclusion labels included in the Blocked labels list.

    However, if a given line item has more than one ad exclusion label, and one of the labels is included in the Allowed labels list, the line item will not be blocked, even if another of its labels is included in the Blocked labels list.

    For example, you have a line item with the ad exclusion labels "airline" and "travel". If "airline" is in the Blocked labels list but "travel" is in the Allowed labels list, the line item won't be blocked by this ad exclusion.

    If you select Block all, all line items will be blocked except those that have an ad exclusion label that's included in the Allowed labels list.

  7. Click Save.

Use ad exclusions in emergency situations

If you want to use ad exclusions in emergency situations, you can set them up in advance and leave them inactive. When it's time to activate them:

  1. Sign in to Google Ad Manager.
  2. Click Inventory and then Ad Manager ad exclusions.
  3. Search for the ad exclusions you want to activate.
  4. Use the checkboxes to select one or more ad exclusions.
  5. Click Activate.

You can use the same process to deactivate ad exclusions when they're not longer needed.

Use ad exclusions in your Google Publisher Tags

This method is not recommended.

Page-level ad exclusions

To set a page-level ad exclusion, add the following line to the <head> portion of your tag before the call to googletag.enableServices():


To set multiple category exclusions at the page level, you can either specify each exclusion on a separate line or specify them all on one line:

  • Specify on separate lines
  • Specify all on one line

Slot-level ad exclusions

You can set slot-level ad exclusions in addition to any page-level exclusions you've set. The page-level exclusions won't be overridden. To set slot-level ad exclusion, call the .setCategoryExclusion method when you define the ad slot:

googletag.defineSlot('/network_code/first_level_ad_unit/second_level_ad_unit', [width, height], 'div-gpt-ad-div_ID')

You can specify multiple category exclusions at the slot level:

googletag.defineSlot('/network_code/first_level_ad_unit/second_level_ad_unit', [width, height], 'div-gpt-ad-div_ID')

To clear slot-level ad exclusions, call the .clearCategoryExclusions method (page-level exclusions won't be cleared). This would be useful if you want to refresh the slot, for example.

Some publishers use content management systems to add the ad exclusion key-value dynamically to the webpages where it's needed. To return to the example of a plane crash, you could set up your content management system to insert the ad exclusion key-value into the Ad Manager tags on any webpage that includes a set of keywords related to airlines and accidents.
Was this article helpful?
How can we improve it?