UA parser enrichment
This enrichment uses theΒ ua-parser libraryΒ to parse the user agent and provide information about the user's device.
Collecting and separating out all the valuable device information to be found in the user agent is a great way to get insight into the types of devices and operating systems and versions your users are using. This helps with deciding which to support as well as in decisions around functionality releases.
With the device family field which is part of the context you can also benefit from the lookup done with our database to sort the multitude of different devices into higher level device types like desktop, mobile, tablet, other, etc.
The YAUAA Enrichment supersedes this enrichment and is preferable in most cases as it will generate a richer dataset.
You can continue to use the UA Parser Enrichment. It is handy if you have memory constraints running the Enrich application, as it uses significantly less memory than the YAUAA enrichment. Additionally, the UA Parser enrichment does further parsing of the Operating System and Browser Version numbers.
Both enrichments will produce an additional entity attached to an event, based on the information available in the User-Agent
header of the request from a userβs browser.
UA Parser vs YAUAA Output
UA Parser Field | YAUAA Field | Example (Firefox 106 on Mac OS X) |
---|---|---|
device_family | deviceClass | Desktop |
β | deviceName | Apple Macintosh |
β | deviceBrand | Apple |
β | deviceCpu | Intel |
β | deviceCpuBits | 32 |
β | deviceFirmwareVersion | |
β | deviceVersion | |
β | operatingSystemClass | Desktop |
os_family | operatingSystemName | Mac OS X |
os_version | operatingSystemVersion | 10.15 |
os_major | operatingSystemVersionMajor | 10 |
os_minor | β | 15 |
os_patch | β | |
os_patch_minor | operatingSystemVersionBuild | |
β | operatingSystemNameVersion | Mac OS X 10.15 |
β | operatingSystemNameVersionMajor | Mac OS X 10 |
β | layoutEngineClass | Browser |
β | layoutEngineName | Gecko |
β | layoutEngineVersion | Gecko 106.0 |
β | layoutEngineVersionMajor | Gecko 106 |
β | layoutEngineNameVersion | 106.0 |
β | layoutEngineNameVersionMajor | 106 |
β | layoutEngineBuild | 20100101 |
β | agentClass | Browser |
useragent_family | agentName | Firefox |
useragent_version | agentVersion | 106.0 |
useragent_major | agentVersionMajor | 106 |
useragent_minor | β | 0 |
useragent_patch | β | |
β | agentNameVersion | Firefox 106.0 |
β | agentNameVersionMajor | Firefox 106 |
β | agentBuild | |
β | agentLanguage | |
β | agentLanguageCode | |
β | agentInformationEmail | |
β | agentInformationUrl | |
β | agentSecurity | |
β | agentUuid | |
β | webviewAppName | |
β | webviewAppVersion | |
β | webviewAppVersionMajor | |
β | webviewAppNameVersionMajor | |
β | facebookCarrier | |
β | facebookDeviceClass | |
β | facebookDeviceName | |
β | facebookDeviceVersion | |
β | facebookFBOP | |
β | facebookFBSS | |
β | facebookOperatingSystemName | |
β | facebookOperatingSystemVersion | |
β | anonymized | |
β | hackerAttackVector | |
β | hackerToolkit | |
β | koboAffiliate | |
β | koboPlatformId | |
β | iECompatibilityVersion | |
β | iECompatibilityVersionMajor | |
β | iECompatibilityNameVersion | |
β | iECompatibilityNameVersionMajor | |
β | carrier | |
β | gSAInstallationID | |
β | networkType |
Configurationβ
Unsure if your enrichment configuration is correct or works as expected? You can easily test it using Snowplow Micro on your machine. Follow the Micro usage guide to set up Micro and configure it to use your enrichment.
Inputβ
This enrichment uses the field useragent
.
Outputβ
This enrichment adds a new context to the enriched event with this schema.
Field | Description |
---|---|
useragent_family | Useragent family (browser) name |
useragent_major | Useragent major version |
useragent_minor | Useragent minor version |
useragent_patch | Useragent patch version |
useragent_version | Full version of the useragent |
os_family | Operation system name |
os_major | Operation system major version |
os_minor | Operation system minor version |
os_patch | Operation system patch version |
os_patch_minor | Operation system patch minor version |
os_version | Operation system full version |
device_family | Device type |
As an example, the User-Agent
string
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
would be parsed with the following result:
PARAMETER | VALUE |
---|---|
useragent_family | Chrome |
useragent_major | 48 |
useragent_minor | - |
useragent_patch | 2564 |
os_family | Windows 7 |
os_major | - |
os_minor | - |
os_patch_minor | - |
os_version | Windows 7 |
device_family | Computer |
*empty values denoted by β-β