Mapping
The Mapping.Config
stores all
individual Mapping.EventConfig
configurations for
each entity-action
event. The getMappingEvent
function returns the matching event mapping while
the getMappingValue
is used to resolve
a Mapping.Value
settings for a specific property to return an actual value.
The custom
property is used by
each destination individually.
getMappingEvent
getMappingEvent(event: string, mapping?: Mapping.Config<unknown>): EventMapping
returns the matching eventMapping
configuration and the used mappingKey
for
the given entity-action event name. If no mapping is found, it will return an
empty object. An explicit key is favored over an asterisk *
key. If available
a condition
will be checked to determine if the EventConfig
applies. It's
used by the sources.
Specify multiple Mapping.EventConfig
as an array and use condition
to check
which EventConfig
should be used. To test uncomment the globals
property.
getMappingValue
getMappingValue(event: WalkerOS.Event, mapping: Mapping.Value, options?: Mapping.Options): WalkerOS.Property | undefined
primarily used by destinations to
process values from the original event. This offers flexibility to configure
individual tagging setups
to standard fields of the destination.
string
key
value
fn
map
loop
validate
consent
First the condition
is checked to determine if the ValueConfig
should be
used. Second, the consent
state gets checked if an instance
is provided. If
no required consent is given, no value will be returned. If a fn
is provided,
it will be called to define the value, otherwise the key
or initial string
value will be used
with byPath. The current
value will be check using the validate
function and set to undefined
if it
fails. Finally, the value
will be cast to match the WalkerOS.Property
type.
An empty ValueType
will return undefined
.
If you need professional support with your walkerOS implementation, check out our services.