Skip to main content
There are three ways to get events into Retain, and you only need one of them. Use the Node.js SDK if you are on Node. Use the HTTP API from any other language, with nothing to install. Or, if you already track product usage in a tool like PostHog, connect that tool and skip instrumentation entirely.

Node.js

Install the SDK with your preferred package manager. Requirements: Node.js 20 or later.
Continue the Quickstart with Authentication, then Identify and Track.

Other languages

You don’t need to install anything Just grab your Project Token in Authentication then move on to Identify and Track for HTTP examples in your language. If you need more details, check the API reference.
Official SDKs for other languages are coming soon.

Already tracking with a product analytics tool

If your product events already flow into PostHog, you do not need to instrument anything a second time. Point a PostHog realtime destination at Retain and the events you already collect start arriving, usually in a couple of minutes. See Connect PostHog for the full setup.
Mixpanel and Amplitude are coming soon.

Next steps

Authentication

Get your Project Token and use it from the SDK or HTTP client.

Connect PostHog

Forward the events you already track, no re-instrumentation needed.

Identify

Register users in Retain before tracking events.

Track

Record events as they happen in your product.