Custom Metrics

The Metalitix logger allows you to record custom values to custom charts on the Metalitix dashboard.

Adding a Custom Metric Chart

  1. Navigate to the Engagement Metrics panel on the Metalitix Dashboard. Select Add Custom Chart.

  2. Select how you would like your chart to display

TypeDescriptionExample

Bar

Best for comparing counts of many different metrics, such as events.

Pie

Best for comparing ratios, such as the percent of sessions that triggered a call to action.

Number Line

Best for measuring the count of a single metric, such as health level across sessions.

  1. Select the type of data that the chart will show.

TypeDescriptionExamples

Attributes

Best for tagging a session with characteristics. Only the session attribute’s final recorded value will appear on the chart.

  • Starting location name

  • Total distance travelled

  • KPI reached (true/false)

Events

Best for representing user-generated actions. These will also appear in the Sessions tab as yellow indicators.

  • Items clicked or viewed

  • User jumped

  • CTA occurred

States

Best for recording and monitoring general updates to sessions. These are effectively events that do not appear in the Sessions tab.

  • User health or experience level

  • Popular levels

  • Common user settings

  1. If you select the Number Line chart and State metric, an additional step will appear. This step allows you to aggregate data. When a user's session ends, Metalitix can automatically average or sum all the session's number values to produce a single value. Alternatively, select None if aggregation is not desired.

  2. Input a friendly name (title) for your chart. The chart name will appear in the dashboard, and it is the ID used in the code to identify where to save metrics. If you choose to rename this chart at a later time, the original first chart name is the permenant ID used in the code.

  3. A code snippet will appear at the bottom of the prompt. Copy this code snippet and paste it in the part of your code where the metric occurs. In general, the code snippets will follow the pattern outlined below.

    • logger.logAttribute("CHART NAME", YOUR_CHARACTERISTIC)

    • logger.logEvent("CHART NAME", "YOUR EVENT NAME")

    • logger.logState("CHART NAME", YOUR_VALUE)

  4. Metalitix is now configured to gather a custom metric on your project! 🎉

Last updated