Thrift module: ua

ModuleServicesData typesConstants
ua DeviceType
MobileClass
NameAndVersion
UserAgent
UserAgentType

Enumerations

Enumeration: UserAgentType


BROWSER1
A web browser, especially on a desktop, notebook or workstation


EMAIL_CLIENT100
An email client, email reader

FEED_READER101
A news aggregator, also termed a feed aggregator, feed reader, news reader, RSS
reader or simply aggregator

LIBRARY102
A library is a collection of resources used to develop software.

MEDIAPLAYER103
Media player, also called multimedia player, is a term typically used to describe computer software for playing
back multimedia files.

MOBILE_BROWSER2
A mobile browser, also called a microbrowser, minibrowser, or wireless internet browser (WIB), is a web browser
designed for use on a mobile device.

OFFLINE_BROWSER104
Offline browser which may download completely or partially a website to a hard drive

OTHER3
A software that doesn't match the other types

ROBOT4
Bots, such as Web crawlers

UNKNOWN5
An unknown user agent type

USERAGENT_ANONYMIZER105
A software to hide the real user agent information

VALIDATOR106
A software or service that validates parts of a website or webservice, such as CSS, HTML, JSON, XML

WAP_BROWSER107
A WAP browser is a web browser for mobile devices such as mobile phones that uses the Wireless Application
Protocol (WAP). WAP is a technical standard for accessing information over a mobile wireless network.

GUARDIAN_NATIVE_APP6
One of the guardian native apps


Enumeration: DeviceType


GAME_CONSOLE1
A game console is an interactive computer that produces a video display signal which can be used with a
display device (a television, monitor, etc.) to display a video game. The term "game console" is used to
distinguish a machine designed for people to buy and use primarily for playing video games on a TV in
contrast to arcade machines, handheld game consoles, or home computers.

PDA3
A personal digital assistant (PDA), also known as a palmtop computer, or personal data assistant, is a mobile
device that functions as a personal information manager. PDAs are largely considered obsolete with the
widespread adoption of smartphones.

PERSONAL_COMPUTER4
A personal computer (PC) is a general-purpose computer, whose size, capabilities, and original sale price
makes it useful for individuals, and which is intended to be operated directly by an end-user with no
intervening computer operator.

SMART_TV5
A smart TV, sometimes referred to as connected TV or hybrid TV

SMARTPHONE6
A smartphone is a mobile phone built on a mobile operating system, with more advanced computing capability
and connectivity than a feature phone

TABLET7
A tablet computer, or simply tablet, is a mobile computer with display, circuitry and battery in a single
unit. Tablets are often equipped with sensors, including cameras, microphone, accelerometer and touchscreen,
with finger or stylus gestures replacing computer mouse and keyboard.

UNKNOWN8
An unknown device category

WEARABLE_COMPUTER9
Wearable computers, also known as body-borne computers are miniature electronic devices that are worn by the
bearer under, with or on top of clothing.

OTHER10
A device that doesn't match the other categories


GUARDIAN_ANDROID_NATIVE_APP11
The Guardian android native app


GUARDIAN_IOS_NATIVE_APP12
The Guardian iOS native app


GUARDIAN_WINDOWS_APP13
The Guardian iOS native app


Enumeration: MobileClass


PHONE1
TABLET2

Data structures

Struct: NameAndVersion

KeyFieldTypeDescriptionRequirednessDefault value
1namestringrequired
2versionstringoptional
3betabooloptional

Struct: UserAgent

KeyFieldTypeDescriptionRequirednessDefault value
1userAgentStringstring

For Web submissions: The raw HTTP User-Agent request header sent by the user's web browser, which can be used to work out which browser the user was using. General info on this HTTP header:

  • https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent
  • https://en.wikipedia.org/wiki/User_agent
  • https://webaim.org/blog/user-agent-string-history/
  • https://developer.chrome.com/docs/privacy-sandbox/user-agent/ - User-Agent reduction, introduced around 2021 due to privacy concerns, may eventally reduce the usefulness of the User-Agent request header.

An example User-Agent string value (for Chrome):

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36

Note that as of April 2020 (Ophan PR #3719), Ophan only populates this field for Web submissions - submissions from Guardian Native-Apps are sent by HTTP library (eg 'OkHttp'), rather than web browser, and so would only serve to identify the HTTP library, which wouldn't be interesting to us.

optional
2typeUserAgentType

Classification of the user agent (eg 'BROWSER', 'ROBOT', etc) by the Ophan stack.

Currently processing of the User-Agent string is done first by Yauaa ('Yet Another UserAgent Analyzer' - https://try.yauaa.basjes.nl/) and then Ophan Slab's extractors.UserAgentExtractor uses information from Yauaa's 'Agent' assessment to classify to one of our own UserAgentType values.

optional
3osNameAndVersionThe operating system this request was made from optional
4familyNameAndVersionThe family name and version of the user agent e.g. Firefox 13.0 or iOS Core 3.1.1 optional
5deviceDeviceTypeDevice class of this user agent optional
6modelnativeapp.DeviceFull device model and manufacturer Only populated for native apps, where this data is available. optional
7rendererInforenderer.RendererInfoWhen classifying the experience that a user had when visiting our site, we make a distinction between the Renderer in use, which may vary significantly on the same device, such as a native app vs a web browser, and the physical device that was used to view the content. optional
8isMobileboolthis represents a device of at least two form-factors, a 'mobile' or a 'tablet', and it is based on data extracted from the user-agent, which therefore makes it a reasonable guess, but as this is quite a fuzzy distinction, this shouldn't be considered as being 100% accurate. optional
9mobileClassMobileClassoptional

Details about the user agent (browser or native application) that made this request