Device.ua

The raw User-Agent string from the device's HTTP request. Recommended through OpenRTB 2.5; 2.6 asks exchanges to keep sending it whenever the device provides one, even when device.sua is filled.

CurrentstringOptionalSince 2.0

Field facts

Path
device.ua
Object
Device
Type
string
Requirement
Optional
Added
OpenRTB 2.0
Spec section
3.2.18

How it is used

Buyers use it for device detection, browser targeting, and invalid traffic checks. It must be the string the device actually sent, never one inferred or assembled by a server. Because Chromium browsers freeze parts of it, bidders should read device details from device.sua when present and treat ua as the fallback. For server-side ad insertion and other server-to-server traffic, forward the viewer's device user agent, not the server's.

Example

Where the field sits in a payload, with everything else left out:

{
  "id": "req-1",
  "device": {
    "ua": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36"
  }
}

Common mistakes

  • Sending the user agent of an ad insertion server or HTTP library instead of the viewer's device, which makes real traffic look like a bot.
  • Synthesizing a string from make and model when the real header is missing.

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.

VersionsType in the specRequiredDeprecated
2.0 to 2.2stringRecommendedNo
2.3 to 2.3.1stringRecommendedNo
2.4stringRecommendedNo
2.5stringRecommendedNo
2.6-202210 to 2.6-202606stringNoNo

Related fields

Other Device fields