To connect to a database other than Google Analytics you will need an enterprise plan.
Contact sales

Introduction to Metrics

Metrics provide quantifiable measurements to gauge performance, behavior, and other essential information. These metrics facilitate in-depth analysis by providing insights that might not be easily visible from raw data.

Defining Metrics

Defining metrics involves specifying several parameters. Below is an overview of the parameters you’ll need:

To better understand the structure, here’s an illustrative example of a metrics specification:

metrics:
  - name: order_total
    description: Total orders processed.
    type: simple
    type_params:
      measure: order_count
    label: Total Orders

Supported Metric Types

We provides support for various metric types. Let’s explore them:

Simple metrics point directly to a measure. They can be perceived as a function that only accepts one measure as input.

Example:

metrics:
  - name: cancellations
    type: simple
    type_params:
      measure: cancellations_count
    filter: |
      {{ Dimension('order__value') }} > 100 and {{ Dimension('user__acquisition') }}

When creating metrics, ensure consistency across definitions. Avoid overlapping names and ambiguous definitions to ensure clarity.

Conclusion

Metrics are crucial for deriving actionable insights from your data. Understanding the different types of metrics and their definitions will help you create comprehensive data models.