Using PostHog with a CDP

Last updated:

|Edit this page

What is a CDP?

CDP stands for Customer Data Platform. It is a service that collects and unifies customer data from many sources and then sends it for use in other tools like product analytics (PostHog!), marketing automation, your CRM, data warehouses, and more.

The most common CDPs are Segment and RudderStack, both of which work with PostHog.

Do I need a CDP?

If you don't have a CDP already set up, you might not need one. PostHog has:

  • SDKs and API to capture data from anywhere.
  • Data warehouse to easily import and query data from Stripe, Hubspot, Zendesk, S3, and more.
  • Pre-built or customizable transformations and destinations for cleaning and sending data to other tools.
  • Use your data in PostHog's suite of analysis tools.

This means PostHog can act as your single source of truth without needing to set up and pay for another tool.

Here's a decision tree that you might find handy:

Yes
No
Yes
No
Are you using a 3rd party CDP currently?
Option 2
Integrate PostHog
Are there destinations you need that PostHog doesn't have yet?
e.g. Marketing platforms
Option 2
Integrate PostHog
Option 1
Use PostHog as a CDP

Option 1: Use PostHog as a CDP

In general, we recommend starting with PostHog as your CDP using our SDKs, data warehouse, destinations, and transformations as needed. This is the easiest and least expensive way to get started.

If you need destinations that we don't currently support, you have several options

  1. You can send your PostHog data to a 3rd party CDP.
  2. Build your own composeWebhook destination.
  3. Fully transition to a 3rd party CDP (option 2).
Website - Javascript Web SDK
PostHog
iOS App - Swift SDK
Android App - Java SDK
Backend - Python SDK
Saleforce
Intercom
Customer.io
Data warehouse e.g. BigQuery / Snowflake

Pros:

  • Least expensive as you don't need a 3rd party CDP.
  • Fewer services means reduced risk of data being dropped.
  • Works with all the features of PostHog (analytics, autocapture, feature flags, session recording, etc.)

Cons:

  • We don't yet have as many integrations as 3rd party CDPs, particularly for marketing ad platforms (like Facebook, Google, TikTok, etc.). If you need these destinations immediately and you have the time and money for a 3rd party CDP, you might want to go with option 2.

Sending PostHog data to a 3rd party CDP for extra destinations

If there's destination you are looking for that we don't currently have, you have two options:

  1. Build a composeWebhook destination for it yourself.

  2. Use a destination to send data to your CDP like RudderStack and then add the destination you need. This gives you more destinations than PostHog alone, while also mostly relying on PostHog.

Note: This won't work for the CDP device-mode sources such as Facebook Ads and Google Ads (where the CDP injects the marketing script onto the page). If you need this, we'd recommend integrating the marketing platforms directly, using Google Tag Manager or using a 3rd party CDP as your primary CDP (option 2).

Website - Javascript Web SDK
PostHog
iOS App - Swift SDK
Android App - Java SDK
Backend - Python SDK
3rd party CDP e.g. RudderStack
Extra destinations
Saleforce
Intercom
Customer.io
Data warehouse e.g. BigQuery / Snowflake

Option 2: Use a 3rd party CDP with PostHog as a destination

If you already use a CDP extensively, you'll likely want to integrate PostHog with it. For your frontend sources, you'll want to configure PostHog as a destination to ensure you get the full functionality. See our guides for Segment and RudderStack for more information.

Website - CDP Javascript SDK
3rd party - CDP
e.g. Segment/RudderStack
iOS App - CDP Swift SDK
Android App - CDP Java SDK
Backend - CDP Python SDK
PostHog
Google Ads
Facebook Ads
Saleforce
Intercom
Customer.io
Data warehouse e.g. BigQuery / Snowflake

Pros:

  • You can integrate PostHog with your existing CDP.
  • Manage all your sources and destinations in one place.
  • A broader range of destinations available than PostHog alone.

Cons:

  • You'll need to pay for a 3rd party CDP.
  • If you use PostHog's event autocapture, the other CDP destinations will not receive the autocapture events.
  • Enabling feature flags and session recordings requires extra setup or manually installing the PostHog script.
  • Variable support by the CDP libraries for PostHog's features.

Using PostHog alongside a 3rd party CDP

You can still use PostHog features like feature flags, session replays, surveys, and more alongside a 3rd party CDP. This will mean that custom events go through the 3rd party CDP and the PostHog specific data (like autocapture events, session replays, and feature flag calls) go directly to PostHog. The true flow of data will end up looking more like the following.

CDP Javascript SDK
CDP Swift SDK
CDP Java SDK
CDP Python SDK
Product analytics
Replays/Flags
Flags
Replays/Flags
Flags
Website
3rd party CDP event stream
iOS App
Android App
Backend
PostHog
Google Ads
Saleforce
Customer.io
Data warehouse e.g. BigQuery / Snowflake

Questions?

Was this page useful?

Next article

Using PostHog with a CDP

What is a CDP? CDP stands for Customer Data Platform. It is a service that collects and unifies customer data from many sources and then sends it for use in other tools like product analytics (PostHog!), marketing automation, your CRM, data warehouses, and more. The most common CDPs are Segment and RudderStack , both of which work with PostHog. Do I need a CDP? If you don't have a CDP already set up, you might not need one. PostHog has: SDKs and API to capture data from anywhere. Data…

Read next article