-
Notifications
You must be signed in to change notification settings - Fork 0
Attributes
Richard Cowin edited this page Apr 8, 2024
·
7 revisions
Attributes are used to define the metrics. A metric can be abstract or concrete. The main requirements for concrete metrics, are objects that contain tag, source and key.
- source - Specifies where to get the audience attribute or event criteria from.
- key - Specifies where to get the value in the source.
-
tag - Specifies what the metric will be reported as (event id for action
event
and audience attribute for actionbind
). - when - Is used to specify that the metric (or sub-metrics) have to meet the condition before they are to be applied.
-
action - Is either
event
orbind
(bind
is used ifaction
is not specified) - on - Specifies that the metric should wait on an async event (typically used for DOM events).
-
apply - Indicates that the current metric is abstract and its content should be passed to the metrics in the
apply
array. - map - Specifies value options the value extracted needs further mapping.
-
type - Is used when action is
bind
to convert the type to. - extract - Is used for extracting values from more complex sources like dom content and callback parameters.
-
value - Specifies an explicit value when using action
bind
-
storage - Specifies that the value of a
bind
action should be cached for reference on downline pages. -
default - Specifies the value to bind to a metric when it is unable to find the value indicated by
key
. - poll - Allows the system to wait for some period of time and coninue trying to extract a value.
- combination - Allows 2 numeric values (from different source/key) to be used to calculate a metric value.
- macro - Allows groups of attributes to be packaged and reused.