Choosing a PostHog SDK
Contents
PostHog has official SDKs for web, mobile, and server-side languages, plus libraries the community maintains. Use the SDK for the language or framework your app runs on.
SDK versions and capture v1
PostHog is moving to the capture v1 API to improve performance.
The SDKs below support it in their latest major version. Each of these major versions has breaking changes, so read its migration guide before you upgrade.
We suggest you migrate as soon as possible, but the older major versions keep working and stay supported.
| SDK | Moves to capture v1 in | Migration guide |
|---|---|---|
| Python | 8.0.0 | 7.x to 8.0 |
| Go | v2.0.0 | v1 to v2 |
| Rust | 1.0.0 | 0.x to 1.0 |
| Node.js | 6.0.0 | 5.x to 6.0 |
Every other SDK, including the JavaScript Web SDK and the mobile SDKs, stays on legacy capture for now.
For how capture v1 handles events, see the Capture API (v1).
Feature comparison
Note: Session recording and autocapture are not possible in server libraries.
Developer tools
In addition to SDKs, PostHog offers tools for managing your analytics infrastructure programmatically:
- Terraform provider - Manage dashboards, insights, and other PostHog resources as infrastructure-as-code.





