Creating formula metrics
If you need to prepare an analysis on the basis of mathematical operations on events or customer attributes, you need to create a formula metric. The value is always expressed as a numerical value.
Requirements
A tracking code implemented into your website.
Creating a formula metric
- Go to Analytics > Metrics > New metric.
- Enter a name of the metric.
- Optionally, to let other users know about the purpose of the metric, you can write a short description.
- Choose Formula metric.
- To start creating a mathematical operation, click the Select button.
- You can choose one of four elements: profile, event, number or a function.
- To define the settings of the chosen element, click this element.
- If you chose an event, perform the following steps:
- To choose the context of data analyzed in the metric, next to the Type option, click the arrow. You can analyze events or profiles.
- To choose the type of results, next to the Aggregator option, click the arrow. The full list of aggregators and their description is available here
- To define the type of occurrence, next to the Occurrence type option, click the arrow. This way you can count the first, the last or all occurrences of a chosen event.
- From the dropdown list, select an event. Customers who performed a specific action (that triggers the selected event) are considered in the analysis. To define the details of the event, perform one or two actions described below:
- If you want to narrow down the scope of customers, click the Enable filter option. This profile filter works as an additional condition a customer has to meet in order to be counted in the metric.
- If you want to be more specific and analyze a particular aspect of the event, select event parameters by clicking the Where button.
- To add another element, click the plus button.
- To define the mathematical operation between the elements, click the plus button.
- To determine the time range from which the data will be analyzed, click the calendar. Confirm the settings by clicking Apply.
- To complete the process, click the Save button.