# Analytics metrics

A metric is a number that Lettermint calculates from your email events. This page defines each metric. Use the exact names in the `metrics` field of a query.

All counts use the rules in [How Lettermint counts](/platform/analytics/introduction#how-lettermint-counts). The unit is one recipient of one email, unless the definition says something else.

## The path of a recipient

Each recipient moves through these stages. Each line is the metric that counts the stage.

```text
accepted                           accepted by Lettermint
├─ suppressed                      stopped, suppression list
├─ policy_rejected                 stopped, sending policy
├─ application_failed              stopped, processing error
├─ canceled                        stopped, you canceled it
└─ processed                       prepared for delivery
   └─ mta_accepted                 in the delivery queue
      ├─ deferred_events           try again later
      ├─ delivered                 final, accepted
      ├─ bounced                   final, refused
      ├─ soft_bounced              final, retries ended
      └─ administratively_bounced  final, removed
```

A recipient can be deferred several times before the final result. The final result is one of `delivered`, `bounced`, `soft_bounced`, or `administratively_bounced`.

## Acceptance and processing

| Metric | Counts |
| --- | --- |
| `messages` | Emails that Lettermint accepted. An email to three recipients counts as one. |
| `accepted` | Recipients that Lettermint accepted from the API or SMTP. |
| `processed` | Recipients for which Lettermint prepared the email for delivery. |
| `suppressed` | Recipients that Lettermint did not send to, because the address is on a suppression list. |
| `policy_rejected` | Recipients that Lettermint did not send to, because a sending policy stopped the email. |
| `application_failed` | Recipients for which Lettermint could not prepare or release the email. |
| `canceled` | Recipients of a scheduled email that you canceled. |
| `mta_accepted` | Recipients that the mail server of Lettermint took into its queue. |

## Delivery

| Metric | Counts |
| --- | --- |
| `delivered` | Recipients for which the receiving server accepted the email. |
| `bounced` | Recipients that the receiving server refused permanently. This is a hard bounce. |
| `soft_bounced` | Recipients for which delivery stopped after repeated temporary failures. |
| `administratively_bounced` | Recipients for which Lettermint removed the email from the queue. |
| `deferred_events` | Temporary failures. One recipient can cause several. |
| `deferred_recipients` | Recipients that got a temporary failure on the first delivery attempt. |
| `delivery_attempts` | Delivery attempts that ended in a delivery, a temporary failure, or a hard bounce. |
| `attempted_recipients` | The same number as `mta_accepted`. |
| `transport_outcome_recipients` | `delivered` + `bounced` + `soft_bounced`. This is the denominator of the delivery and bounce rates. |
| `open_tracked_delivered` | Delivered recipients of an email that had open tracking on. |
| `click_tracked_delivered` | Delivered recipients of an email that had click tracking on. |

:::note
`delivered` means that the receiving server accepted the email. The server can still put the email in the spam folder. Analytics do not measure inbox placement.
:::

## Feedback after delivery

| Metric | Counts |
| --- | --- |
| `complained` | Recipients that marked the email as spam. Lettermint receives these reports from mailbox providers that send them. |
| `unsubscribed` | Recipients that unsubscribed. |
| `out_of_band_bounced_recipients` | Recipients for which the receiving server accepted the email, and then returned a bounce message later. |
| `out_of_band_bounce_events` | The same number as `out_of_band_bounced_recipients`. |
| `effective_delivered` | `delivered` minus the out-of-band bounces in the same window. |

An out-of-band bounce can arrive hours after the delivery. In a short window, `effective_delivered` can be negative. This is correct, because the delivery and the bounce are in different windows.

## Opens and clicks

Lettermint puts each open and each click into one or more classes. The class tells you who made the request.

| Class | Who made the request |
| --- | --- |
| `human` | A person, as far as Lettermint can tell. |
| `privacy` | A privacy proxy, such as Apple Mail Privacy Protection. The proxy loads the email for the person, so you cannot know if the person read it. |
| `scanner` | A security scanner that examines the email before the person sees it. |
| `bot` | An automated client that Lettermint detected. |
| `machine` | A privacy proxy, a scanner, a bot, or other automated activity. |
| `observed` | Every open or click, in any class. |

Classes overlap. An open through a privacy proxy is in `privacy`, `machine`, and `observed`. Do not add the classes together.

Each class has four metrics. Replace `human` with another class name to get the metrics of that class.

| Metric | Counts |
| --- | --- |
| `human_opens` | Recipients with at least one human open. A recipient counts one time, at the time of the first open. |
| `human_opens_events` | Human opens. A recipient that opens three times counts three times. |
| `human_clicks` | Recipients with at least one human click. A recipient counts one time, at the time of the first click. |
| `human_clicks_events` | Human clicks. |

Use `human_opens` and `human_clicks` to measure the interest of people. Use the other classes to find out how much of your traffic machines read.

See [Email tracking](/platform/emails/tracking/introduction#bot-detection) for the method that Lettermint uses to classify a request.

## Rates

A rate is one count divided by another count. Lettermint returns a rate as a fraction. Multiply by 100 to get a percentage.

| Metric | Formula |
| --- | --- |
| `delivery_rate` | `delivered` / `transport_outcome_recipients` |
| `effective_delivery_rate` | `effective_delivered` / `transport_outcome_recipients` |
| `bounce_rate` | `bounced` / `transport_outcome_recipients` |
| `deferral_rate` | `deferred_events` / `delivery_attempts` |
| `complaint_rate` | `complained` / `delivered` |
| `human_open_rate` | `human_opens` / `open_tracked_delivered` |
| `human_click_rate` | `human_clicks` / `click_tracked_delivered` |

Keep these facts in mind when you read a rate:

- The response includes the two counts behind each rate in `rate_bases`. Use them to judge how much data a rate has. A bounce rate of 0.5 from 2 recipients tells you little.
- When the denominator is zero, the rate is `null`.
- A rate can be higher than 1 in a short window. An email that is delivered on Monday and opened on Tuesday adds to the opens of Tuesday, not to the deliveries of Tuesday.

The open and click rates use only the recipients of email that had tracking on. Email without tracking does not lower your open rate.

## Latency

Latency metrics measure time in milliseconds. Each stage has three percentiles and a sample count.

| Stage | Measures the time | Metrics |
| --- | --- | --- |
| Processing | From acceptance until Lettermint prepared the email for delivery | `processing_latency_p50_ms`, `processing_latency_p95_ms`, `processing_latency_p99_ms`, `processing_latency_samples` |
| Delivery | From the moment the mail server of Lettermint took the recipient into its queue until delivery | `delivery_latency_p50_ms`, `delivery_latency_p95_ms`, `delivery_latency_p99_ms`, `delivery_latency_samples` |
| Total | From acceptance until delivery | `total_latency_p50_ms`, `total_latency_p95_ms`, `total_latency_p99_ms`, `total_latency_samples` |

The p50 value is the median. Half of the recipients were faster. The p99 value shows the slow end. Only 1 in 100 recipients was slower.

A percentile is an estimate. It can be up to 15 percent higher than the exact value. A percentile is `null` when there are no samples.

## Why two numbers can differ

**The breakdown does not add up to the summary.** A breakdown by provider, infrastructure, or SMTP dimension counts delivery attempts. It also leaves out the events that have no value for that dimension. See [Dimensions that change what is counted](/platform/analytics/dimensions#dimensions-that-change-what-is-counted).

**`accepted` is higher than `delivered` + `bounced`.** Some recipients are still in the queue. Other recipients were suppressed, rejected by a policy, or canceled.

**`accepted` and `delivered` are in different buckets.** Each event counts at the time it happened. An email accepted at 23:59 and delivered at 00:01 is in two daily buckets.

**The numbers differ from the dashboard statistics.** The dashboard statistics and the `/v1/stats` endpoint use daily totals per project and a different set of rules. Do not add or compare the two sets of numbers.

**A metric is `null`, not `0`.** `null` means that Lettermint cannot give a value. `0` means that Lettermint counted and found nothing. See [Null values](/platform/analytics/query#null-values).

## Next steps

- [Dimensions](/platform/analytics/dimensions). Split and filter these metrics.
- [Query analytics with the API](/platform/analytics/query). Request these metrics.
- [Examples](/platform/analytics/examples). See complete queries for common questions.
