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

# analytics

> CLI reference: floo analytics — view traffic analytics for an app or org

View traffic analytics for an app or org. Shows requests, errors, error rate, latency, status code breakdown, and traffic sparkline.

```bash theme={null}
floo analytics [APP]
```

## Arguments

| Argument | Description                                    |
| -------- | ---------------------------------------------- |
| `APP`    | App name or UUID. Omit for org-level overview. |

## Flags

| Flag              | Description                        | Default |
| ----------------- | ---------------------------------- | ------- |
| `--period` / `-p` | Time period: `7d`, `30d`, or `90d` | `30d`   |

## Examples

```bash theme={null}
# App-level analytics (last 30 days)
floo analytics my-app

# Last 7 days
floo analytics my-app --period 7d

# Org-level overview (all apps)
floo analytics

# Agent workflow: get error rate
floo analytics my-app --json 2>/dev/null | jq -r '.data.error_rate'
```

## Org-level analytics

When `APP` is omitted, shows a per-app breakdown table:

```
Org analytics (last 30d):
  App           Requests  Errors  Error Rate  P50 Latency  Traffic
  my-app        12,450    23      0.18%       45ms         ▁▂▃▅▇▅▃▂
  api-service   8,320     5       0.06%       120ms        ▂▃▄▅▆▅▄▃
  landing       45,200    0       0.00%       12ms         ▃▅▇▇▇▅▃▂
```

## JSON output

```json theme={null}
{
  "success": true,
  "data": {
    "app_name": "my-app",
    "period": "30d",
    "requests": 12450,
    "errors": 23,
    "error_rate": 0.0018,
    "latency": {
      "p50": 45,
      "p95": 230,
      "p99": 890
    },
    "status_codes": {
      "2xx": 12200,
      "3xx": 227,
      "4xx": 15,
      "5xx": 8
    }
  }
}
```

## Errors

| Code                | Meaning                     |
| ------------------- | --------------------------- |
| `NOT_AUTHENTICATED` | Run `floo auth login` first |
| `APP_NOT_FOUND`     | No app with that name or ID |
