---
updatedAt: 2026-09-29T23:38:36.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Passing Custom Targeting Data

## Passing Custom Targeting Data via API

Pass key/value pairs as `properties` in a placement in the [Decision API Request](https://dev.kevel.com/reference/request):

```json
"properties": {
  "numeralKeyName": 42,
  "stringKeyName": "the answer to the ultimate question",
  "arrayKeyName": ["life", "the universe", "everything"]
}
```

For example, if you want to target a key/value pair where genre = rock, you'd write a Zerkel query of: `genre = "rock"`. This is what the Decision API request would look like:

```json
{
  "placements": [
    {
      "divName": "homepage",
      "networkId": 123,
      "siteId": 456,
      "adTypes": [5],
      "eventIds": [12,13,14],
      "properties": {
        "genre": "rock",
        "age": 25
      }
    }
  ],
  "ip": "10.123.123.123"
}
```

## Passing Custom Targeting via Ad Call

Add this function to the placement you want to set Custom Targeting key/value pairs for, appended to the ados\_add\_placement(); function:

```javascript
setProperties({"key": value,"key":value});
```

For example:

```javascript
ados_add_placement(1234, 12345, "azk12345", 4).setProperties({"genre":"rock"});
```

## Passing Values in Creative

To pass the contents of a value into a creative, use this macro:

`{{placement.properties.keyName}}`

When the ad is served, the macro will be replaced with the value of `keyName`.