## Overview

[Zerkel](https://dev.kevel.co/v1.0/docs/zerkel-queries) is bundled with a number of reserved keys that allow for targeting using databases and lookups integrated with Kevel, such as Kevel's Geo-IP database.

These reserved keys do not require key value pairs to be passed into the ad request.

### Reserved Keys

Reserved Keys include targeting by [device](https://dev.kevel.co/docs/reserved-keys#section-device), [location](https://dev.kevel.co/docs/reserved-keys#section-location), [keywords](https://dev.kevel.co/docs/reserved-keys#section-keywords), [userDB](https://dev.kevel.co/docs/reserved-keys#section-user), [contentDB](https://dev.kevel.co/v1.0/docs/reserved-keys#section-content), [userAgent](https://dev.kevel.com/docs/reserved-keys#useragent), [url](https://dev.kevel.co/docs/reserved-keys#section-url), [referral url](https://dev.kevel.co/docs/reserved-keys#referralurl), [site](https://dev.kevel.co/docs/reserved-keys#section-site), [zones](https://dev.kevel.co/docs/reserved-keys#section-zones), [ad types](https://dev.kevel.co/docs/reserved-keys#adtypes), [divName](https://dev.kevel.co/docs/reserved-keys#divname), [language](https://dev.kevel.co/docs/reserved-keys#acceptlanguage), and [date/time](https://dev.kevel.co/docs/reserved-keys#section-datetime).

### $device

Targets based on characteristics of the device making the ad request. This is particularly useful for mobile targeting to display ads appropriate for each device.

The $device object contains the following properties:

| Zerkel Key | Type |
| --- | --- |
| `$device.brandName`<br>(string) | Brand (ex: Nokia) |
| `$device.modelName`<br>(string) | Model (ex: N95) |
| `$device.marketingName`<br>(string) | Marketing name (e.g. BlackBerry 8100 Pearl) |
| `$device.os`<br>(string) | Operating system name |
| `$device.osVersion`<br>(object) | Operating system version |
| `$device.osVersion.string`<br>(string) | Full representation of the version string |
| `$device.osVersion.major`<br>(integer) | Major version number |
| `$device.osVersion.minor`<br>(integer) | Minor version number |
| `$device.browser`<br>(string) | Device browser information |
| `$device.browserVersion`<br>(string) | Browser version |
| `$device.resolutionWidth`<br>(integer) | Screen width in pixels |
| `$device.resolutionHeight`<br>(integer) | Screen height in pixels |
| `$device.maxImageWidth`<br>(integer) | Image's maximum width in pixels |
| `$device.maxImageHeight`<br>(integer) | Image's maximum height in pixels |
| `$device.physicalScreenWidth`<br>(integer) | Screen width in millimeters |
| `$device.physicalScreenHeight`<br>(integer) | Screen height in millimeters |
| `$device.formFactor`<br>(string) | Form factor: "desktop", "phone", or "tablet" |
| `$device.deviceIdentified`<br>(boolean) | Whether WURFL matched the user agent with a known device |

### Examples

```text
"iPhone 5S"
$device.brandName = "Apple"
$device.modelName = "iPhone 5S"
$device.os = "iOS"
...
```

### $keywords

With `$keywords` you can target by keywords passed in the request. This can be used without setting up [Keyword Targeting](https://dev.kevel.co/v1.0/docs/keyword-targeting) at the flight or ad level.

Example:
```
($keywords contains "tuna") and not ($keywords contains "dolphins")
```

### $location

Targets geographical information derived from the user's IP address. If no data is found, all properties within $location will be undefined.

The `$location` object contains the following properties:

| Zerkel Key | Type |
| --- | --- |
| `$ip`<br>(string) | User's IP address |
| `$location.city`<br>(string) | City name |
| `$location.countryCode`<br>(string) | Two-character country code |
| `$location.latitude`<br>(string) | Latitude |
| `$location.longitude`<br>(string) | Longitude |
...

### $user

| Zerkel Key | Type |
| --- | --- |
| `$user.custom.[insert custom data interest]` | [Custom Properties Targeting](https://dev.kevel.co/v1.0/docs/demographic) |
| `$user.interests` | [Interest Targeting](https://dev.kevel.co/v1.0/docs/interest-targeting) |
| `$user.key` | Target a specific user for testing |

### $content

| Zerkel Key | Type |
| --- | --- |
| $content.custom..[ContentKey] | Targets contextual metadata |

### $userAgent

The `$userAgent` object contains four properties:

| Zerkel Key | Type |
| --- | --- |
| `$userAgent.text`<br>(string) | User agent text |
| `$userAgent.browser`<br>(object) | Browser information |
| `$userAgent.os`<br>(object) | OS information |
| `$userAgent.device`<br>(object) | Mobile device information |

### $url

Targets the URL of the page making the ad request. Use contains for targeting.

Example:
```
$url contains "adzerk.com/about"
```

### $referralUrl

Targets the referrer of the URL making the ad request. This is useful for ads in iframes.

Example:
```
$referralUrl contains "adzerk.com"
```

### $site

Targets the name of the Kevel site making the request.

Example:
```
$site.title = "Adzerk"
```

### $zones

Targets the Kevel zoneId making the request. This is an array.

Example:
```
$zones contains 8675309
```

### $adTypes

Targets the ad types available on the placement making the request.

Example:
```
$adTypes contains 5
```

### $divName

Targets the div name (DOM identifier) of the placement making the request.

Example:
```
$divName = "728_above_the_fold"
```

### $acceptLanguage

Targets the language set by a user's browser.

Example:
```
$acceptLanguage contains "en-us"
```

### $datetime

Target based on date/time information.

Example:
```
$datetime.dayofweek = 4
```

### $reg

Target based on regulatory data, i.e., GDPR jurisdiction and consent.

| Zerkel Key | Description |
| --- | --- |
| `$regs.gdpr`<br>(boolean) | Is true if the request is GDPR-regulated |
| `$consent.gdpr`<br>(boolean) | Is true if the request has GDPR consent |

### $datacenter

Targets whether a request originates from a known datacenter IP address.

| Zerkel Key | Description |
| --- | --- |
| `$datacenter`<br>(boolean) | Is true if the request originates from a known datacenter. |

Updated 10 months ago.
