PostHog as a source

Forward product events and person traits from PostHog into getuserfeedback.com for targeting and context.

Last reviewed

Use this when PostHog already sees your product activity and you want that activity available for flow targeting and response context.

PostHog pageviews become page events, screen events become screen events, and other events become track events in getuserfeedback.com. If the webhook includes a person, their properties become traits on the resolved profile.

Connect PostHog

  1. Open Integrations and click New integration.
  2. Under Data in, choose PostHog, then create the integration.
  3. Click Connect PostHog and authorize access to your PostHog project.
  4. Return to the integration and choose which events and person properties to receive.
  5. Turn the integration on.

To check the connection, open the integration and review its connection status. If access is lost, reconnect from this page. Existing sources can continue to receive events; if an older source cannot connect, create a new PostHog source.

Trigger an event your source is set to receive and include a fresh distinct_id. PostHog receives HTTP 202 with {"accepted":true} when we accept the event for processing. Open Users and search for that ID. In a healthy workspace, the profile should appear within seconds of acceptance. A backlog or retry can take longer.

How events map

  • $pageview becomes a page event, $screen becomes a screen event, and other event names become track event names.
  • properties are stored as event properties.
  • distinct_id becomes a posthog_distinct_id external ID.
  • person.id becomes a posthog_person_id external ID.
  • person.properties become profile traits. If person.name is present and no name trait is set, it becomes traits.name.
  • properties.$current_url becomes the page URL, path, and query string in event context.
  • If present, project is stored in the event's integration metadata.

The OAuth connection uses PostHog’s event uuid. Events without a valid uuid are skipped. An otherwise eligible event without a user identity can still be recorded without creating or updating a profile.

What can break

  • The connection needs attention. Open the integration and reconnect or repair it.
  • No user appears. Confirm the event has distinct_id, person.id, or a distinct ID in properties.distinct_id or properties.$distinct_id.
  • Page targeting looks wrong. Send the browser URL in properties.$current_url. PostHog's top-level event URL points back to PostHog and is not used as the customer page URL.
  • PostHog receives 413. Keep each request at or below 900,000 bytes. Send a smaller batch or reduce the size of an individual event.
  • PostHog receives 400 for a batch. If a field selected for processing contains a null character (U+0000), an unpaired Unicode surrogate, or more than 256 levels of nesting in a stored field, correct it and resend the whole batch.
  • Some events are missing from a batch. If you turn off pageviews, a $pageview is skipped. Other eligible events in the batch can still be accepted. If every event is filtered out, PostHog receives HTTP 200 with the message No events to process.

Next