> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nt3.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics

> Fetch translation analytics and coverage reports.

The **Analytics** endpoints give you quantitative insight into the state of your localization work. Use them to track translation coverage, identify languages that need attention, monitor team productivity, and report progress to stakeholders.

Analytics are computed in real time against the live translation data, so the numbers always reflect the current state of your project.

## Endpoints

```
GET    /api/projects/:projectId/analytics/progress              Translation progress by language
GET    /api/projects/:projectId/analytics/progress-over-time    Progress trend over time
GET    /api/projects/:projectId/analytics/contributors          Contributor activity stats
GET    /api/organizations/:orgId/analytics/overview             Organization-wide overview
```

## Translation Progress by Language

Returns translation coverage and completion metrics for a project, broken down by language:

```bash theme={null}
curl "https://app.nt3.io/api/projects/proj_6abc123def456/analytics/progress?languages=fr,de,es" \
  -H "Cookie: session=..."
```

**Query parameters:**

| Parameter   | Type   | Description                                                       |
| ----------- | ------ | ----------------------------------------------------------------- |
| `languages` | string | Comma-separated list of language codes to include (e.g. `fr,de`). |

**Response:**

```json theme={null}
{
  "totalKeys": 342,
  "languages": [
    {
      "language": "fr",
      "totalKeys": 342,
      "translated": 318,
      "reviewed": 295,
      "approved": 290,
      "completionPercent": 93
    },
    {
      "language": "de",
      "totalKeys": 342,
      "translated": 201,
      "reviewed": 185,
      "approved": 180,
      "completionPercent": 59
    }
  ]
}
```

<Note>
  `completionPercent` is calculated as `translated / totalKeys × 100`. Keys with status `translated`, `reviewed`, or `approved` all count as translated.
</Note>

## Progress Over Time

Returns a daily time series of translation activity for the last N days:

```bash theme={null}
curl "https://app.nt3.io/api/projects/proj_6abc123def456/analytics/progress-over-time?days=30" \
  -H "Cookie: session=..."
```

**Query parameters:**

| Parameter | Type   | Default | Description                          |
| --------- | ------ | ------- | ------------------------------------ |
| `days`    | number | `30`    | Number of days of history to return. |

**Response:**

```json theme={null}
[
  { "date": "2025-03-01", "translations": 12, "reviews": 5 },
  { "date": "2025-03-02", "translations": 24, "reviews": 8 }
]
```

## Contributor Stats

Returns per-contributor activity statistics for a project:

```bash theme={null}
curl "https://app.nt3.io/api/projects/proj_6abc123def456/analytics/contributors" \
  -H "Cookie: session=..."
```

**Response:**

```json theme={null}
[
  {
    "userId": "user_abc",
    "userName": "Alice Martin",
    "translations": 120,
    "reviews": 45,
    "approvals": 30
  },
  {
    "userId": "user_def",
    "userName": "Bob Smith",
    "translations": 80,
    "reviews": 20,
    "approvals": 15
  }
]
```

## Organization Overview

Returns a high-level overview of localization progress across all projects in an organization:

```bash theme={null}
curl "https://app.nt3.io/api/organizations/org_789xyz/analytics/overview" \
  -H "Cookie: session=..."
```

**Response:**

```json theme={null}
{
  "totalProjects": 5,
  "totalKeys": 1842,
  "totalTranslations": 9210,
  "languagesWithProgress": [
    { "language": "fr", "completionPercent": 87 },
    { "language": "de", "completionPercent": 64 }
  ]
}
```
