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, 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:

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 three options:

  1. Use our custom webhook destination or build your own realtime destinations to call the 3rd-party API.
  2. Request a new destination by clicking Can't find what your looking for? when creating a new destination in-app and our team will be notified.
  3. Fully transition to a 3rd party CDP.
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 PostHog doesn't have your destination and you can't build your own, another option is 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, 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.

Questions?

Was this page useful?

Next article

Content Security Policy and ingestion domains

Using Content Security Policies NOTE: This only applies to PostHog Cloud. As described on MDN : Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross-Site Scripting (XSS) and data injection attacks. These attacks are used for everything from data theft, to site defacement, to malware distribution. If you choose to use a CSP it is important to ensure that PostHog domains are permitted. PostHog is a distributed…

Read next article