Note: The Official RudderStack Docs page for the PostHog integration provides a better overview of how to set up this integration.
About RudderStack
RudderStack is an open-source, warehouse-first, customer data platform for developers. It allows you to collect and deliver customer event data to a variety of destinations such as data warehouses and analytics platforms.
Can PostHog with RudderStack do everything PostHog does by itself?
No. The PostHog integration with RudderStack gives you access to everything our JS library can do, with the exception of autocapture and session recording. All features for your PostHog instance will be the same, but all RudderStack sends to PostHog are events you manually send. In addition, PostHog isn't able to show you our toolbar.
If you require session recording whilst using the Rudderstack integration, you need to additionally include the PostHog JS snippet and disable autocapture so you don't duplicate events.
Alternatively, you can load the PostHog JS snippet via Rudderstack itself, by enabling the device-mode connection setting.
Setting up the integration
Make sure you have a RudderStack account and a PostHog account, either self-hosted or using PostHog Cloud.
Select PostHog as your destination for the selected source from the step above
Add your PostHog token and host details:
'Team API Key' refers to your PostHog 'Project API Key' (token), that can be found in 'Project Settings'. Do not use a Personal API Key for this. 'Your Instance' refers to the address of your PostHog instance, which is
https://app.posthog.com
if you're on PostHog Cloud.You're all set!
Sending events
To learn how to send events to PostHog with RudderStack, you should check out the official RudderStack Docs for this integration.