Enrichment Rules
Jitsu supports ip_lookup
and user_agent_parse
enrichment rules per destination. Rules are executed before field mappings. Enrichment rule configuration has the following structure:
Field | Type | Description |
---|---|---|
name (required) | string | Enrichment rule name. Currently supported rules:
|
from (required) | string | JSON path to string IP address value. |
to (required) | string | JSON path to the result. |
IP Lookup#
IP lookup resolves address in from
JSON node into geo data structure and set geo data into to
JSON node. It uses MaxMind under the hood. IP lookup configuration example:
destinations:
destination_name:
enrichment:
- name: ip_lookup
from: /key1/ip_address
to: /key2/geo
Please note, that ip_lookup
works only if a MaxMind
file is provided (see
Geo Resolution)
User Agent Parse#
User Agent parse decomposes user agent in from
JSON node and set decomposed into to
JSON node. User Agent parse configuration example:
destinations:
destination_name:
enrichment:
- name: user_agent_parse
from: /client/device/user_agent
to: /client/device/parsed_user_agent
Parsed user agent example:
{
"ua_family": "Mobile Safari",
"ua_version": "14.0",
"os_family": "iOS",
"os_version": "14.0.1",
"device_family": "iPhone",
"device_brand": "Apple",
"device_model": "iPhone",
}
Default Rules#
Jitsu has default enrichment rules that are applied to events from JavaScript API:
enrichment:
- name: ip_lookup
from: /source_ip
to: /location
- name: user_agent_parse
from: /user_agent
to: /parsed_ua