Overview
Metrics define the "numeric" data that is displayed in Reporting. Metrics may do everything from counting the number of Events to measuring the value of a Customer Profile.
Metrics are customizable, and can be used to measure any data that is available in Firstparty. Metrics are defined by specifying an equation that dictates how Firstparty should calculate the value of the Metric for each row of data returned in a Report.
Firstparty creates a set of default Metrics for you, but you can create an unlimited number of your own Metrics at any time.
Equations
Metric Equations define how Firstparty should calculate the value of a Metric for each row of data returned in a Report. Equations are easy to write, and are evaluated by following the typical arithmetic order or operations, further specified by the inclusion of parentheses.
Learn More Metric Equations
Filters
Metrics support Filters, which limit the data that is included when calculating the value of that Metric. Filters are applied to the entire Metric, and will affect how the equation is calculated.
Defining a Filter
A Metric Filter has three components: a property
, an operator
, and a value
.
Property
The property
is the name of the Property that the Filter should be applied to, wrapped in curly braces (ex: {event.name}
).
The next
, previous
, first
, and last
Equation functions are also available to reference the value of the Property for the next, previous, first, and last Event in the order the Events were created.
Operator
The operator
defines how the Property and Value are compared, and are limited to the operators in the list in the Firstparty UI.
Value
The value
is the value that the Property is compared to. The value may also reference another Property on the Event, wrapped in curly braces (ex: {event.name}
). Using a dynamic value in the value
is useful for filtering based on a comparison between the value in the Event and the value in the next, previous, first, or last event in the Session.