Geo.city
The city, as a code from the United Nations Code for Trade and Transport Locations (UN/LOCODE). Present since OpenRTB 2.0.
Field facts
- Path
device.geo.city,user.geo.city- Object
- Geo
- Type
- string
- Requirement
- Optional
- Added
- OpenRTB 2.0
- Spec section
- 3.2.19
How it is used
A UN/LOCODE is the two-letter country code followed by a three-character location code, such as "USNYC" for New York. Plain city names also show up in live traffic, so buyers often need to handle both. The 2.5 COPPA guidance recommends dropping city for child-directed traffic.
Example
Where the field sits in a payload, with everything else left out:
{
"id": "req-1",
"device": {
"geo": {
"city": "USNYC"
}
}
}Version history
Added in OpenRTB 2.0, and present in the latest snapshot. The table shows how each version's spec text types the field.
| Versions | Type in the spec | Required | Deprecated |
|---|---|---|---|
| 2.0 to 2.1 | string | No | No |
| 2.2 | string an (h vi | No | No |
| 2.3 to 2.3.1 | string | No | No |
| 2.4 | string | No | No |
| 2.5 to 2.6-202606 | string | No | No |