> 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/general/general-custom-targeting.md).

# Custom Key-Value Pairs

Define custom key-value pairs to extend targeting, statistics reporting, and token passing.

Custom key-value pairs let Publishers pass additional data with their ad requests. These pairs serve three functions:

* **Passing Tokens**: Publishers can send additional data to Advertisers via custom key-value pairs.
* **Advertiser Targeting**: Advertisers can target campaigns based on these key-value pairs.
* **Statistics Reporting**: Advertisers, Publishers, and Network Admin Users can break down reports by these pairs.

## Supported Data Types <a href="#supported-data-types" id="supported-data-types"></a>

| Type             | Description                                                                                                   |
| ---------------- | ------------------------------------------------------------------------------------------------------------- |
| Predefined List  | A fixed set of possible values (e.g., `fruit=apple`, `orange`, `pear`).                                       |
| Predefined Range | A range of predefined values (e.g., `credit_score=normal`) when a value of between `200` and `500` is passed. |
| String           | Any sequence of characters (e.g., `UUID=abc123`).                                                             |
| Number           | Whole numbers (e.g., `age=30`).                                                                               |
| Range            | A numerical range (e.g., `income=50000-100000`).                                                              |

## Passing Tokens <a href="#passing-tokens" id="passing-tokens"></a>

For each ad request, Publishers may pass one value associated with a key. For example, if a Publisher passes a custom key-value pair such as age=18, this information will be available for reporting and targeting.

### How to Enable Tokens <a href="#how-to-enable-tokens" id="how-to-enable-tokens"></a>

To use this feature, contact your account manager with the required key-value pairs. Provide:

* **Key Name**
* **Type** (String, Number, Range, Predefined List, Predefined Range)
* **Valid Values** (if applicable, e.g., predefined list options)

Once enabled, Publishers can pass these values via ad requests, and Advertisers can see them in reporting and targeting options if enabled at Ad Server level.

### How to Pass Tokens <a href="#how-to-pass-tokens" id="how-to-pass-tokens"></a>

The example below shows how to pass Unique User Identifier (UUID) data to an ad tag. The `data-ex-uuid="name"` attribute is the UUID tag. This tag sends the user's UUID ("name" in this example) to the ad server, which can then use this information to show targeted ads.

<figure><img src="https://4095468742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQpBCwTiJQ0YOSGpcC0AH%2Fuploads%2FEtnVllBvQvkhHEvaJZfR%2FHow-to-pass-tokens-blurred.png?alt=media&amp;token=bbf2a48e-64c6-4f24-83f9-a4e3f312b066" alt="Ad tag with the data-ex-uuid attribute highlighted"><figcaption></figcaption></figure>

```html
<script async type="application/javascript" src="https://a.adservingdomain.com/ad-provider.js"></script>
 <ins class="eas6a97888e2" data-zoneid="123456"  data-ex-uuid="name"></ins>
 <script>(AdProvider = window.AdProvider || []).push({"serve": {}});</script>
```

## Advertiser Targeting <a href="#a-dvertiser-targeting" id="a-dvertiser-targeting"></a>

Custom key-value pairs in targeting help Advertiser campaigns reach the right audience. Advertisers can target campaigns based on the custom key values provided by Publishers.

For example:

* If a Publisher passes `device_type=gaming_console`, Advertisers can target users based on this value.
* If a Publisher passes `user_segment=premium_user`, Advertisers can focus their campaigns on premium users.

The following examples show how each data type is used in targeting. The keys and values shown were configured for one network; each Ad Server has its own set of keys.

### Predefined List <a href="#predefined-list" id="predefined-list"></a>

<figure><img src="https://4095468742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQpBCwTiJQ0YOSGpcC0AH%2Fuploads%2FskfCAvzzdP7ziFuAWEkh%2Fcustom-targeting-predefined-list.png?alt=media&amp;token=71914c6e-89be-489e-9e46-235ba64087c4" alt="Predefined list targeting with Car Brand values selected"><figcaption></figcaption></figure>

Car brand is an example of a predefined list: a fixed set of values chosen when the key is configured. Predefined lists must be single-level; nested values are not supported.

### Predefined Range <a href="#predefined-range" id="predefined-range"></a>

<figure><img src="https://4095468742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQpBCwTiJQ0YOSGpcC0AH%2Fuploads%2FebwcZiE18pdUE7LPZGam%2Fcustom-targeting-predefined-range.png?alt=media&amp;token=18d912e4-8a32-497b-aec6-992bacb80d31" alt="Predefined range targeting with Credit Score values selected"><figcaption></figcaption></figure>

Credit Score is an example of a predefined range: each named value maps to a range of numbers, defined when the key is configured.

For example:

* Low Credit Score: Values less than 200.
* Normal Credit Score: Values between 200 and 500.
* High Credit Score: Values above 500.

### String <a href="#string" id="string"></a>

<figure><img src="https://4095468742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQpBCwTiJQ0YOSGpcC0AH%2Fuploads%2FZUu9rL84giBuvqIKCthf%2Fcustom-targeting-string.png?alt=media&amp;token=5434f21d-bfcf-4249-b11b-a854b5dd661c" alt="String targeting with a UUID value entered"><figcaption></figcaption></figure>

UUID is an example of a string key: its values are any sequence of characters.

### Number <a href="#number" id="number"></a>

<figure><img src="https://4095468742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQpBCwTiJQ0YOSGpcC0AH%2Fuploads%2FDmLXjh7hV4RT2bo701dA%2Fcustom-targeting-numbers.png?alt=media&amp;token=9d4850e1-5069-4001-9641-3cfff092ccd7" alt="Number targeting with a whole number entered"><figcaption></figcaption></figure>

Numbers is an example of a number key: its values are whole numbers, which can be positive, negative, or zero.

### Range <a href="#range" id="range"></a>

<figure><img src="https://4095468742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQpBCwTiJQ0YOSGpcC0AH%2Fuploads%2FYSVuE9Q8DGl2MMo5ezbV%2Fcustom-targeting-range.png?alt=media&amp;token=a191e7b7-c9e4-460a-8523-d605a29ff979" alt="Range targeting with a value range entered"><figcaption></figcaption></figure>

A range key lets Advertisers target values between two limits, such as 1 and 100. The following table shows the syntax.

<table data-search="false"><thead><tr><th>Input Values</th><th>Values displayed in the chip</th></tr></thead><tbody><tr><td>5</td><td>5</td></tr><tr><td>-10.5</td><td>-10.5</td></tr><tr><td>-1000--5</td><td>All values from -1000 to -5</td></tr><tr><td>1-10</td><td>All values from 1 to 10</td></tr><tr><td>&#x3C;1000</td><td>Less than 1000</td></tr><tr><td>&#x3C;=1000</td><td>Less than or equal to 1000</td></tr><tr><td>>-1000</td><td>Greater than -1000</td></tr><tr><td>>=-1000</td><td>Greater than or equal to -1000</td></tr><tr><td>!=1000</td><td>All values other than 1000</td></tr></tbody></table>

## Statistics Reporting <a href="#statistics-reporting" id="statistics-reporting"></a>

Key-value pairs are available in reporting, allowing Advertisers, Publishers, and Network Admin Users to analyze data based on custom parameters.

### How It Works <a href="#how-it-works" id="how-it-works"></a>

* When a Publisher passes a custom key-value pair, this data is logged alongside standard ad request data.
* Advertisers, Publishers, and Network Admin Users can filter reports based on these custom values.

{% hint style="info" %}
For string-based key-value pairs (e.g. UUID) statistical data is available up to the last 7 days.
{% endhint %}

### Example Use Cases

* **Audience Insights**: Understand the distribution of key-value pairs (e.g., how many impressions were served to `user_segment=premium`).
* **Performance Analysis**: Compare CTR or conversion rates across different custom values.
* **Publisher Optimization**: Identify which key-value pairs contribute to higher revenue or engagement.

### Reporting Availability <a href="#reporting-availability" id="reporting-availability"></a>

These key-value pairs are available in:

* Dashboard Reports
* API Data Feeds
* Exportable CSV Files

## Restricting Custom Key-Value Pairs to Specific Accounts <a href="#restricting-custom-key-value-pairs-to-specific-accounts" id="restricting-custom-key-value-pairs-to-specific-accounts"></a>

Custom key-value pairs can be restricted to specific accounts on an Ad Server. To enable this for particular accounts, contact your account manager with a list of the accounts and the relevant key-value pairs.


---

# 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/general/general-custom-targeting.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.
