> For the complete documentation index, see [llms.txt](https://docs.exads.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exads.com/publishers/sites-and-zones/data-ad-block-types.md).

# 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 <a href="#putting-block-a-d-types-into-your-ad-zone-code" id="putting-block-a-d-types-into-your-ad-zone-code"></a>

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 <a href="#how-it-works" id="how-it-works"></a>

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 <a href="#example" id="example"></a>

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:

{% code overflow="wrap" expandable="true" %}

```html
<ins class="adsbynetwork" data-zoneid="3553853" data-block-ad-types="101"></ins>
```

{% endcode %}

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 <a href="#implementing-data-block-a-d-types-across-ad-formats" id="implementing-data-block-a-d-types-across-ad-formats"></a>

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.

{% hint style="info" %}
**Note:** When using multiple Ad Type IDs, separate them with commas (e.g., `data-block-ad-types="101,102,105"`).
{% endhint %}

### Async Snippet Tag <a href="#async-snippet-tag" id="async-snippet-tag"></a>

{% code overflow="wrap" expandable="true" %}

```html
<script async type="application/javascript" src="https://ads.examplesite.com/ad-provider.js"></script>
<ins class="adsbynetwork" data-zoneid="3553853" data-block-ad-types="101,102"></ins>
<script>
  (AdProvider = window.AdProvider || []).push({"serve": {}});
</script>
```

{% endcode %}

### VAST Endpoint <a href="#vast-endpoint" id="vast-endpoint"></a>

{% code overflow="wrap" %}

```
https://syndication.examplesite.com/v1/vast.php?idzone=5478789&block_ad_types=101&context=1&debug=1
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.exads.com/publishers/sites-and-zones/data-ad-block-types.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
