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

# get_analytics

> Read daily and total play data for one game.

export const LastVerified = ({date, source}) => <div className="totem-verified">
    <span>Last verified: {date}</span>
    {source ? <span>Source: {source}</span> : null}
  </div>;

export const StatusBadge = ({state = "available", children}) => {
  const labels = {
    available: "Available",
    "early-access": "Early access",
    planned: "Planned",
    internal: "Internal draft"
  };
  return <span className={`totem-status totem-status--${state}`}>
      {children || labels[state] || state}
    </span>;
};

<StatusBadge state="available" />

<LastVerified date="2026-08-14" source="Totem V1 contract" />

Returns daily and total analytics for a game owned by the current account.

## Parameters

| Name      | Type        | Required | Rules                                              |
| --------- | ----------- | -------- | -------------------------------------------------- |
| `game_id` | UUID string | Yes      | Must identify a game owned by the current account. |
| `days`    | integer     | No       | 1–90. Defaults to 14.                              |

## Example call

```json theme={null}
{
  "game_id": "018f2f4e-b73b-7e91-a419-0c8ac91af1c2",
  "days": 14
}
```

## Returns

```json theme={null}
{
  "game_id": "018f2f4e-b73b-7e91-a419-0c8ac91af1c2",
  "days": 14,
  "daily": [
    {
      "date": "2026-08-12",
      "plays": 128,
      "uniques": 91,
      "median_session_s": 84,
      "d1_returns": 17,
      "score_submissions": 104
    }
  ],
  "totals": {
    "plays": 128,
    "uniques": 91,
    "median_session_s": 84,
    "d1_return": 0.187,
    "score_submissions": 104
  }
}
```

All dates are UTC calendar days. `median_session_s` is null when there is no session-length data. `d1_return` is null when no eligible first-session cohort exists.

Read [Analytics](/dashboard/analytics) for metric definitions.
