> For the complete documentation index, see [llms.txt](https://docs.millimetric.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.millimetric.ai/readme.md).

# Welcome

Millimetric is a hosted analytics product where the **HTTP API is the source of truth**. You call it from your server, your browser, or an AI agent — every client speaks the same protocol.

## What you get

* **One HTTP API**, three first-class clients (browser SDK, Node SDK, MCP server for AI agents).
* **No cookies** — `anonymous_id` lives in `localStorage` and only when *you* call `track()`.
* **No raw IPs at rest** — IPs are HMAC'd with a daily-rotating salt; only country survives.
* **Smart attribution** — a server-side classifier separates Facebook *social* from Facebook *paid*, Google organic from Google Ads, and every other common combination, with a confidence label and an audit trail.
* **First-class MCP** — agents emit events with `track_event` and query their own data with `top_sources`, `get_stats`, `query_events`.

## Pick your path

| If you want to…                                                | Go here                                      |
| -------------------------------------------------------------- | -------------------------------------------- |
| See a working example in 60 seconds                            | [Quickstart](/quickstart.md)                 |
| Understand what an event is                                    | [Events](/core-concepts/events.md)           |
| Understand what to put in `properties`                         | [Properties](/core-concepts/properties.md)   |
| Stitch anonymous → known users                                 | [Identities](/core-concepts/identities.md)   |
| Know how Facebook *social* vs *paid* gets decided              | [Attribution](/core-concepts/attribution.md) |
| See exactly what gets stored                                   | [Privacy](/core-concepts/privacy.md)         |
| Reference every endpoint                                       | [API overview](/api-reference/overview.md)   |
| Drop the SDK into React / Next / Vue / Svelte                  | [Framework recipes](/sdks/frameworks.md)     |
| Connect an AI agent                                            | [MCP server](/mcp-for-ai-agents/overview.md) |
| Build a signup funnel, e-commerce dashboard, attribution model | [Recipes](/recipes/recipes.md)               |

## Three keys you'll meet everywhere

| Key prefix  | Where it lives                     | What it can do                   |
| ----------- | ---------------------------------- | -------------------------------- |
| `pk_live_…` | Browsers                           | Ingest only — origin-allowlisted |
| `sk_live_…` | Servers, scripts, anywhere private | Ingest only — full powers        |
| `rk_live_…` | Servers, MCP clients, dashboards   | Read only                        |

Mint them in the dashboard (`apps/web`). You'll see the secret exactly once.

## Send your first event

```bash
curl -X POST https://api.millimetric.ai/v1/track \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "event": "signup",
    "anonymous_id": "u_abc",
    "user_id": "user_42",
    "properties": { "plan": "free" }
  }'
```

That's the whole API surface for ingest. Add `url` + `referrer` and the [classifier](/core-concepts/attribution.md) gives you `source / medium / campaign` for free.

The next thing to read is the [Quickstart](/quickstart.md), then [Events](/core-concepts/events.md) and [Properties](/core-concepts/properties.md) for the conceptual ground floor.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.millimetric.ai/readme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
