PostHog provides multiple integrations to send events from your apps, use the API, and ingest historical data into your PostHog instance.
Our goal is for you to be able to integrate PostHog with your language, framework, or platform of choosing, without having to adapt your technology stack.
There are two common phases of integration with PostHog:
- Live (real-time) events from an application in development, test, or deployed to production
- Historical events from an existing data source such as a data warehouse
Live events
Live (real-time) events can be integrated using client libraries, server libraries, and third-party platform integrations.
The fastest way to get started with PostHog on the web is via the using the JavaScript snippet.
For more information read the live data ingestion guide.
Historical events
By ingesting historical data into PostHog you can apply the same analysis to your historical and real-time data.
Historical events need to be integrated using a PostHog server library or directly via the PostHog API.
For more information read the historical data ingestion guide.
Libraries
Refer to the tables below for an overview of the functionality in each of our client and server libraries.
Client libraries
Some features such as session recording are only available with our JavaScript library.
We're working to add support for feature flags and autocapture to as many libraries as possible. Please check out the individual library repositories for status on this and let us know if you think we should prioritize support for any specific library.
Library | Maintainer | Event Capture | User Identification | Autocapture | Session Recording | Feature Flags |
---|---|---|---|---|---|---|
JavaScript | PostHog Team | ✅ | ✅ | ✅ | ✅ | ✅ |
Android | PostHog Team | ✅ | ✅ | ❌ | ❌ | ❌ |
iOS | PostHog Team | ✅ | ✅ | ❌ | ❌ | ❌ |
Flutter | PostHog Team | ✅ | ✅ | ❌ | ❌ | ❌ |
React Native | PostHog Team | ✅ | ✅ | ❌ | ❌ | ❌ |
Server libraries
Note: Session recording is not possible on server-side libraries.
Library | Maintainer | Event Capture | User Identification | Feature Flags |
---|---|---|---|---|
NodeJS | PostHog Team | ✅ | ✅ | ✅ |
Python | PostHog Team | ✅ | ✅ | ✅ |
PHP | PostHog Team | ✅ | ✅ | ✅ |
Ruby | PostHog Team | ✅ | ✅ | ✅ |
Golang | PostHog Team | ✅ | ✅ | ✅ |
Elixir | Community | ✅ | ✅ | ❌ |
Nim | Community | ✅ | ✅ | ❌ |
Integrations
Integration | Description | Maintainer | Sends data to PostHog? | Pulls data from PostHog? |
---|---|---|---|---|
Sentry | A two-way integration to get PostHog user data into Sentry and Sentry exceptions into PostHog. | PostHog Team | ✅ | ✅ |
Segment | Integration to use PostHog as a destination in Segment. | PostHog Team | ✅ | ❌ |
RudderStack | Integration to use PostHog as a destination in RudderStack. | RudderStack Team | ✅ | ❌ |
Slack | PostHog webhooks to receive messages in Slack when an action happens. | PostHog Team | ❌ | ✅ |
Microsoft Teams | PostHog webhooks to receive messages in Microsoft Teams when an action happens. | PostHog Team | ❌ | ✅ |
Discord | PostHog webhooks to receive messages in Discord when an action happens. | PostHog Team | ❌ | ✅ |
Gatsby | A wrapper over posthog-js provided as a Gatsby plugin. | Community | ✅ | ❌ |
Docusaurus | A wrapper over posthog-js provided as a Docusaurus integration. | Community | ✅ | ❌ |
Zapier | Use PostHog triggers in Zapier workflows. | PostHog Team | ❌ | ✅ |
n8n | Use PostHog triggers in n8n workflows. | n8n Team | ❌ | ✅ |
Apps
Visit our apps section for more information.