Use ad exclusions to block ads
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.
Create ad exclusions
There are two parts to creating ad exclusions.
Create ad exclusion labels and apply them to line items
- Create an ad exclusion label. Learn more
- 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
- Sign in to Google Ad Manager.
- Click Inventory Ad Manager ad exclusions New ad exclusion.
- Enter a name for the ad exclusion.
- (Optional) Change the status to Inactive if you want to save the ad exclusion for later use.
- 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.
- 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.
- 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:
- Sign in to Google Ad Manager.
- Click Inventory Ad Manager ad exclusions.
- Search for the ad exclusions you want to activate.
- Use the checkboxes to select one or more ad exclusions.
- 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
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
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:
You can specify multiple category exclusions at the slot level:
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.