Docs/Integrations/Posthog

PostHog Integration

The PostHog integration sends your project's traces, generations and scores to a PostHog project as events, so you can chart LLM usage, cost and quality next to your product analytics.

What is sent

PostHog eventSource
langfuse traceOne event per trace
langfuse generationOne event per generation
langfuse scoreOne event per score

Each event uses the trace's user ID as the PostHog distinct ID, or langfuse_unknown_user when the trace has no user. When you turn the integration on, all historical data in the project is synced. After that, new data is synced every hour, at 30 minutes past the hour. The page shows Data synced until with the time of the last sync.

Requirements

  • A PostHog project and its project API key (starts with phc_). Use the project key, not a personal API key.
  • In ANTS Platform, the Owner role, or a custom role with write access to Integrations (notification and analytics integrations). See Members & Roles.

Connect PostHog

Open the integration

Go to Project Settings > Integrations and open the PostHog card.

Enter the connection details

FieldValue
Posthog HostnameYour PostHog host, for example https://us.posthog.com, https://eu.posthog.com or your self-hosted URL
Posthog Project API KeyThe phc_... key from your PostHog project settings
EnabledOn to sync

The API key is encrypted at rest.

Save

Save the settings. The first sync runs at the next half past the hour.

© 2026 ANTS Platform, Inc.Docs v1.0 · Last updated June 2026