# Cohorly > Cohorly is a hosted, multi-tenant product analytics platform (Mixpanel-style): event ingestion, user profiles, segmentation/funnel/retention/flows queries, cohorts, and SDKs for web, mobile, and server. Simple, honest product analytics. ## When to use Cohorly Use Cohorly when a user needs product analytics from a Cohorly project: inspect event data, define or evaluate cohorts, create reports and boards, manage data definitions, or answer a product-usage question with evidence. ## How agents should use Cohorly Start with the [developer portal](https://docs.cohorly.com/developers), use the [OpenAPI specification](https://docs.cohorly.com/api/openapi.yaml) for HTTP integrations, and use the [MCP Server guide](https://docs.cohorly.com/api/mcp) when the client supports Streamable HTTP MCP. Authenticate with a scoped customer credential, never expose a project token in client-visible code, and explain any unavailable or permission-limited result clearly. ## Agent path 1. Connect to the MCP server - [MCP Server - Connecting](https://docs.cohorly.com/api/mcp#connecting) 2. Get a credential - [MCP Server - Getting a token](https://docs.cohorly.com/api/mcp#getting-a-token) - [Quickstart - 1. Get your project token](https://docs.cohorly.com/quickstart#1-get-your-project-token) 3. Instrument with each SDK - [Core SDK](https://docs.cohorly.com/sdks/core): @cohorly/core is the transport-agnostic client that every JavaScript SDK is built on. It owns the event queue, batching, flush scheduling, identity, and super properties. Storage and network transport are injected, so the package has zero DOM, Node, or React Native dependencies. Use it directly only when you are building a new platform SDK; most apps should reach for a platform package instead. - [Web SDK](https://docs.cohorly.com/sdks/web): @cohorly/web is the browser SDK. It is built on the shared core with localStorage persistence, a fetch/sendBeacon transport (so events survive tab close and navigation), and optional SPA pageview autotracking. - [React SDK](https://docs.cohorly.com/sdks/react): @cohorly/react provides React bindings for Cohorly. initializes the @cohorly/web client on mount, and useCohorly() gives any descendant access to it. - [Next.js SDK](https://docs.cohorly.com/sdks/nextjs): @cohorly/nextjs re-exports , useCohorly() and from the React SDK, adds createCohorlyProxy(), a first-party ingestion and feature-flag route handler, and onRequestError for server-side error tracking on the Node.js and Edge runtimes. - [React Native SDK](https://docs.cohorly.com/sdks/react-native): @cohorly/react-native is a standalone React Native client. It has no hard dependency on react-native or any storage library - it works out of the box with an in-memory store and upgrades to persistent storage when you inject one. - [iOS SDK](https://docs.cohorly.com/sdks/ios): CohorlySwift is a standalone Swift Package for Cohorly, supporting iOS 15+ and macOS 12+. It uses URLSession for transport, batches events, and persists its queue to UserDefaults by default. - [Android SDK](https://docs.cohorly.com/sdks/android): Official Android client SDK - Kotlin, minSdk 21, zero third-party runtime dependencies. The API mirrors the Mixpanel Android SDK, so migrating is mostly a find-and-replace of MixpanelAPI to Cohorly. - [Node.js SDK](https://docs.cohorly.com/sdks/node): `@cohorly/node` is the server-side Node.js SDK. The API mirrors the official `mixpanel` npm library: stateless, `distinct_id` passed explicitly on every call, optional Node-style callbacks plus first-class promises. Node 22+, one runtime dependency (`@cohorly/core`). - [NestJS SDK](https://docs.cohorly.com/sdks/nest): `@cohorly/nest` is a standard NestJS dynamic module (`forRoot` / `forRootAsync`) plus an injectable `CohorlyService` wrapping `@cohorly/node`, with an automatic final flush on application shutdown. Supports `@nestjs/common` ^10 and ^11. - [Python SDK](https://docs.cohorly.com/sdks/python): The official server-side Python SDK. The API mirrors `mixpanel-python`, so migrating existing code is mostly a matter of swapping the import and pointing at your Cohorly server. Python 3.8+, zero runtime dependencies, fully typed. - [PHP SDK](https://docs.cohorly.com/sdks/php): Server-side PHP SDK mirroring the Mixpanel PHP library - if you have used `mixpanel-php` you already know this SDK. Requires PHP 8.1+ with `ext-curl` and `ext-json`, no other dependencies. - [Go SDK](https://docs.cohorly.com/sdks/go): The official server-side Go SDK. The API mirrors the official Mixpanel Go SDK (`mixpanel-go`), so migrating is mostly a matter of swapping the import. Go 1.25+, zero dependencies, context-based. 4. Query - [Queries API](https://docs.cohorly.com/api/queries): Five analytical query endpoints power the dashboard: segmentation, funnel, retention, flows, and sessions. All are POST /api/query/*, require the admin Bearer key (Authorization: Bearer $API_KEY - superadmin key or an account token), and take an optional projectId in the body (defaulting to the caller's oldest project). Dates from and to are YYYY-MM-DD strings. - [MCP Server - Tools](https://docs.cohorly.com/api/mcp#tools) ## Get Started - [Concepts](https://docs.cohorly.com/concepts): Cohorly is a product analytics platform in the spirit of Mixpanel. Instrument your apps with the SDKs or the HTTP API, and get event analytics - segmentation, funnels, retention, and user profiles - in the Cohorly dashboard. - [Quickstart](https://docs.cohorly.com/quickstart): Send your first event to Cohorly in a few minutes - grab your project token, fire one HTTP request, then instrument your app with an SDK. - [Changelog](https://docs.cohorly.com/changelog): Every release of Cohorly. ## SDKs - [Core SDK](https://docs.cohorly.com/sdks/core): @cohorly/core is the transport-agnostic client that every JavaScript SDK is built on. It owns the event queue, batching, flush scheduling, identity, and super properties. Storage and network transport are injected, so the package has zero DOM, Node, or React Native dependencies. Use it directly only when you are building a new platform SDK; most apps should reach for a platform package instead. - [Web SDK](https://docs.cohorly.com/sdks/web): @cohorly/web is the browser SDK. It is built on the shared core with localStorage persistence, a fetch/sendBeacon transport (so events survive tab close and navigation), and optional SPA pageview autotracking. - [React SDK](https://docs.cohorly.com/sdks/react): @cohorly/react provides React bindings for Cohorly. initializes the @cohorly/web client on mount, and useCohorly() gives any descendant access to it. - [Next.js SDK](https://docs.cohorly.com/sdks/nextjs): @cohorly/nextjs re-exports , useCohorly() and from the React SDK, adds createCohorlyProxy(), a first-party ingestion and feature-flag route handler, and onRequestError for server-side error tracking on the Node.js and Edge runtimes. - [React Native SDK](https://docs.cohorly.com/sdks/react-native): @cohorly/react-native is a standalone React Native client. It has no hard dependency on react-native or any storage library - it works out of the box with an in-memory store and upgrades to persistent storage when you inject one. - [iOS SDK](https://docs.cohorly.com/sdks/ios): CohorlySwift is a standalone Swift Package for Cohorly, supporting iOS 15+ and macOS 12+. It uses URLSession for transport, batches events, and persists its queue to UserDefaults by default. - [Android SDK](https://docs.cohorly.com/sdks/android): Official Android client SDK - Kotlin, minSdk 21, zero third-party runtime dependencies. The API mirrors the Mixpanel Android SDK, so migrating is mostly a find-and-replace of MixpanelAPI to Cohorly. - [Node.js SDK](https://docs.cohorly.com/sdks/node): `@cohorly/node` is the server-side Node.js SDK. The API mirrors the official `mixpanel` npm library: stateless, `distinct_id` passed explicitly on every call, optional Node-style callbacks plus first-class promises. Node 22+, one runtime dependency (`@cohorly/core`). - [NestJS SDK](https://docs.cohorly.com/sdks/nest): `@cohorly/nest` is a standard NestJS dynamic module (`forRoot` / `forRootAsync`) plus an injectable `CohorlyService` wrapping `@cohorly/node`, with an automatic final flush on application shutdown. Supports `@nestjs/common` ^10 and ^11. - [Python SDK](https://docs.cohorly.com/sdks/python): The official server-side Python SDK. The API mirrors `mixpanel-python`, so migrating existing code is mostly a matter of swapping the import and pointing at your Cohorly server. Python 3.8+, zero runtime dependencies, fully typed. - [PHP SDK](https://docs.cohorly.com/sdks/php): Server-side PHP SDK mirroring the Mixpanel PHP library - if you have used `mixpanel-php` you already know this SDK. Requires PHP 8.1+ with `ext-curl` and `ext-json`, no other dependencies. - [Go SDK](https://docs.cohorly.com/sdks/go): The official server-side Go SDK. The API mirrors the official Mixpanel Go SDK (`mixpanel-go`), so migrating is mostly a matter of swapping the import. Go 1.25+, zero dependencies, context-based. ## Guides - [Feature flags](https://docs.cohorly.com/feature-flags): Release features gradually, target cohorts, run deterministic rollouts, and read flag variants from every Cohorly SDK. - [Error tracking](https://docs.cohorly.com/error-tracking): How Cohorly turns `$exception` events into error issues - fingerprints, the error worker, sampling, the monthly exception quota, triage statuses, and where to set up each SDK and upload symbols. - [Cohorly CLI](https://docs.cohorly.com/cli): `@cohorly/cli` uploads the files Cohorly needs to symbolicate errors: source map indexes for web and React Native (including Hermes), R8 mapping files for Android and dSYM symcaches for iOS. Run it in CI after every production build, or let its Vite, Next.js and Expo plugins do it. ## HTTP API - [Ingestion API](https://docs.cohorly.com/api/ingestion): The ingestion endpoints are what the SDKs call to send data. They are authenticated by a project token, not the admin key. Send the token in the X-Cohorly-Token header (applies to the whole batch) or per record (which wins over the header). - [Rate limits](https://docs.cohorly.com/api/rate-limits): /track and /engage are rate limited to keep the API healthy for everyone. Limits are enforced at two levels: per IP address and per project. Exceeding either returns 429 with a Retry-After header. - [Feature Flags API](https://docs.cohorly.com/api/flags): Manage project feature flags, evaluate them for an identity, and fetch definitions for server-side local evaluation. - [Admin API](https://docs.cohorly.com/api/admin): The admin and data endpoints let you manage projects and pull data programmatically. Everything under /api/* is authenticated with your account API key - find it in the dashboard under Settings. This page covers project management, event and user data, and stats; analytical queries are on the Queries page, and feature flag management is on the Feature Flags API page. - [Queries API](https://docs.cohorly.com/api/queries): Five analytical query endpoints power the dashboard: segmentation, funnel, retention, flows, and sessions. All are POST /api/query/*, require the admin Bearer key (Authorization: Bearer $API_KEY - superadmin key or an account token), and take an optional projectId in the body (defaulting to the caller's oldest project). Dates from and to are YYYY-MM-DD strings. - [MCP Server](https://docs.cohorly.com/api/mcp): Cohorly exposes its analytics substrate - queries, cohorts, reports, boards, definitions, annotations, feature flags and the data dictionary - to AI agents over the Model Context Protocol. One endpoint (POST /mcp), Streamable HTTP, no SQL access, and the same query pipeline every dashboard screen uses. ## Reference - [Data model](https://docs.cohorly.com/reference/data-model): Cohorly's data model has three core concepts - events, users, and projects - all scoped by project. Event properties are stored as schemaless JSON, so you never define a schema up front. - [Event properties](https://docs.cohorly.com/reference/event-properties): Every event carries a properties object. A few keys are special - they drive identity, timing, deduplication, and attribution - while everything else is free-form data you define. The SDKs set the special keys for you; when calling the HTTP API directly, set them yourself.