Enrichment Rules

EventNative 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: ip_lookup and user_agent_parse.

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 page)

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

EventNative has default enrichment rules that are applied to events from JavaScript API:

enrichment:
- name: ip_lookup
from: /source_ip
to: /eventn_ctx/location
- name: user_agent_parse
from: /eventn_ctx/user_agent
to: /eventn_ctx/parsed_ua