For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Data Ad Block Types

As a Publisher, you can block specific ad types on individual ad zones directly from your ad zone code, without changing your account-level settings.

Using Dynamic Ad Type Exclusion

The optional data-block-ad-types parameter lets you specify one or more Ad Type IDs. When the parameter is present with a value, the ad-serving algorithm excludes every campaign labeled with the corresponding Ad Types, in addition to any ad types you have already blocked at account level.

This gives you granular control, so you can adjust ad content instantly based on real-time needs or the context of a specific page.

Putting Block Ad Types into Your Ad Zone Code

After you configure your ad zone and its code appears, you can implement the Dynamic Ad Type Exclusion feature.

To use this feature, add the parameter data-block-ad-types to your ad zone code. After the parameter, provide a comma-separated list of the Ad Type IDs you want to exclude from that ad zone.

How It Works

  1. You specify the IDs: You add the data-block-ad-types parameter to your ad zone code, with a comma-separated list of the Ad Type IDs you want to block.

  2. Ad Serving Process: During the ad-serving process, the ad server checks for the presence and value of data-block-ad-types.

  3. Ad Type Exclusion: Any campaign tagged with the specified Ad Type IDs is immediately excluded from the pool of eligible ads for that impression.

  4. Ad Delivery: Only ads that do not match the blocked Ad Type IDs (and meet all other targeting criteria) are served.

Example

Suppose you have a banner ad zone on a page where you want to avoid displaying "NSFW" (Not Safe For Work) content. If "NSFW" corresponds to Ad Type ID 101, include:

When the data-block-ad-types=101 parameter is received for an impression, all ads labeled with the "NSFW" Ad Type (ID 101) are excluded, so only SFW (Safe For Work) ads are displayed.


Implementing data-block-ad-types Across Ad Formats

The data-block-ad-types parameter follows similar implementation patterns to existing tag-based parameters like data-keywords, adapting to the specific syntax required by each ad format.

Note: When using multiple Ad Type IDs, separate them with commas (e.g., data-block-ad-types="101,102,105").

Async Snippet Tag

VAST Endpoint

Last updated

Was this helpful?