ua parser enrichment

Ben Fradet edited this page Aug 21, 2018 · 11 revisions

HOME > SNOWPLOW SETUP GUIDE > Step 3: Setting up Enrich > Configurable enrichments > ua-parser enrichment


JSON Schema iglu:com.snowplowanalytics.snowplow/ua_parser_config/jsonschema/1-0-1

Compatibility r109+

Data provider ua-parser


This enrichment uses the ua-parser library to parse the useragent and attach a ua_parser_context to each event.


  "schema": "iglu:com.snowplowanalytics.snowplow/ua_parser_config/jsonschema/1-0-0",
  "data": {
    "vendor": "com.snowplowanalytics.snowplow",
    "name": "ua_parser_config",
    "enabled": true,
    "parameters": {}

You can additionally specify a database:

  "schema": "iglu:com.snowplowanalytics.snowplow/ua_parser_config/jsonschema/1-0-0",
  "data": {
    "vendor": "com.snowplowanalytics.snowplow",
    "name": "ua_parser_config",
    "enabled": true,
    "parameters": {
      "uri": "s3://snowplow-hosted-assets/third-party/ua-parser",
      "database": "regexes-latest.yaml"

You can check the hosted assets page to know more about the database we host.

The context generated by the enrichment adheres to this schema.

Data sources

The input value for the enrichment comes from ua parameter which is mapped to useragent field in table.


This enrichment uses 3rd party ua_parser Java library.

As an example, the useragent string

Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36

Will be parsed with the following result:

Parameter Value
useragent_family Chrome
useragent_major 48
useragent_patch 2564
os_family Windows 7
device_family Other

Data generated

If ua-parser is enabled, then the Snowplow Enrichment process will write its results into a new context, ua_parser_context. As a result the following fields in the dedicated com_snowplowanalytics_snowplow_ua_parser_context_1 table would be populated.

Field Purpose
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
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.