# Custom Metrics

## Custom metrics

You can create **Custom Metrics** using the custom events you ingest by filtering or aggregating events based on event metadata. Include metadata along with the custom events when you log these events with Statsig.

For example, you might track overall **event\_count** for all events of type *purchase\_event*. You might also filter these metrics to only the events where users purchase a specific product category.

Statsig supports six types of custom metrics:

| Metric Type | Description                                                                                                                | Examples                                                    |
| ----------- | --------------------------------------------------------------------------------------------------------------------       | ----------------------------------------------------------- |
| Event Count | **Total count of events** filtered by the *Value*, *Metadata*, or *User* properties of an event type                       | **Add to Cart** event filtered by category type             |
| User Count  | **Number of unique users** that trigger events filtered by the *Value*, *Metadata*, or *User* properties of an event type  | **Active Users** based on their views of a product category |
| Aggregation | **Sum or Average** of the *Value*, *Metadata*, or *User* property of an event type                                         | **Total Revenue**                                    |
| Ratio       | **Rates** (e.g. cart conversion rate, purchase rate), **Normalized Values** (e.g. sessions per user, items per cart)       | **Cart Conversion Rate**, **Sessions per User**           |
| Funnel      | **Funnels**- funnel of multiple events with conversion tracking                                                            | **Sign-up Funnel**, **Checkout Funnel**                       |
| Count Distinct | **Count Distinct**- Number of unique values for a given field, often approximated with sketches                         | **Unique Songs** listened per user                          |

{% callout type="info" %}
Sketch-based count distinct metrics are in Early Access. Reach out to Statsig Support to request access.
{% /callout %}

The "average" in aggregation is the average of event value (average revenue per purchase per user), not the average of exposed units (average revenue per user). Sum defines the average revenue per user.

Refer to the **Metrics 201** topic, [Creating Custom Metrics](https://docs.statsig.com/metrics/create), to learn how to create custom metrics for your product.
