# Overview > OakData is web analytics built for the agent era - one snippet to instrument, one MCP to query. Start here. Source: https://oakdata.co/docs --- **OakData** is first-party web analytics built for the agent era. One snippet captures what real users do - pageviews, clicks, web vitals, errors, sessions, and optionally session replay. You read that data back two ways: a **REST API** for your own tooling, and a **Model Context Protocol (MCP) server** that lets a coding agent like Claude or Cursor watch real users and fix what's broken without leaving the editor. The SDK sends events from your site into OakData, which serves them back through a REST API and an MCP server. Capture in the browser; read the same data back over REST or MCP. ## The two halves - **The SDK** (`oakdata-js`) runs in the browser: events, identity, sessions, replay. Install it with a [quickstart](https://oakdata.co/docs/install); the full surface is in the [SDK reference](https://oakdata.co/docs/sdk/reference). - **The read APIs** serve your data back. The [REST API](https://oakdata.co/docs/api/rest) is a plain bearer-authed JSON surface; the [MCP server](https://oakdata.co/docs/api/mcp) exposes the same data as tools an AI agent calls directly. ## How tracking works After `oak.init()`, the SDK batches events and posts them to the ingest endpoint. Each event is stamped with a [session](https://oakdata.co/docs/concepts/sessions), a [distinct id](https://oakdata.co/docs/concepts/identity), and contextual properties. The server classifies [bots](https://oakdata.co/docs/concepts/bots), enforces [rate limits and quotas](https://oakdata.co/docs/concepts/rate-limits), and stores the result - all queryable per project. > **Two keys, two jobs** Public keys (`oak_pub_…`) are safe to ship in the browser and can only *write* events. Secret keys (`oak_sec_…`) stay server-side and are the only keys that can *read* analytics through the REST API and MCP. ## Where to go next - [Install in 4 steps](https://oakdata.co/docs/install) - The fastest path from an empty project to live data. - [Use your dashboard](https://oakdata.co/docs/using/filters) - Filter and read your analytics once data is flowing. - [Connect an AI agent](https://oakdata.co/docs/api/mcp) - Point Claude or Cursor at your analytics over MCP. - [Build with the REST API](https://oakdata.co/docs/api/rest) - Pull your data into your own dashboards and jobs.