Reference: tracking script, APIs and MCP server
Updated
The exact rules, read from DataPocket's code: every script attribute, what a first-party proxy must forward, the payment, goal and stats endpoints, and the MCP server that gives AI assistants read-only access to your analytics.
- Tracking script referenceEvery attribute of the DataPocket script, the window.datapocket() API and its limits, what leaves the browser, cookieless mode, and pinned versions with Subresource Integrity.
- First-party proxy: what to forwardWhat a proxy serving DataPocket from your own domain must forward (the event, User-Agent and the visitor's IP), what it must not (cookies), and how DataPocket reads the visitor's IP.
- REST API: payments and goalsThe DataPocket Payment API and server-side goals: authentication, every field, idempotency, currencies, how payments find their visitor, responses and errors.
- Read API: stats, visitors, funnels and insightsRead your DataPocket analytics over HTTPS with an API key: sites, overview, time series, breakdowns, goals, funnels, visitors, journeys, bots, realtime, annotations and the latest insights report. Parameters, limits and errors.
- MCP server: your analytics in Claude, Cursor and other AI assistantsConnect claude.ai, Claude Desktop, Claude Code, Cursor or any MCP client to DataPocket: sign in with OAuth or use a read-only API key. Setup, the 17 read-only tools, units, limits and how visitor-supplied text is handled.