Skip to main content
Connect PostHog to AstroBee to analyze product usage, user behavior, and event data. Get queryable access to events, users, sessions, cohorts, and more from your PostHog account.
Experimental feature: PostHog connector is currently in beta. We’re actively improving sync reliability and adding more features.

Prerequisites

  • A PostHog Cloud account hosted in the US or EU data region
  • Access to create a Personal API key in PostHog
  • Your PostHog base URL (e.g., app.posthog.com for US, eu.posthog.com for EU)

Connecting PostHog

You can connect PostHog in two ways: from the Sources page if you’re already using AstroBee, or during the onboarding process if you’re a new user.
1

Choose Connect Sources

On the Import Data screen, click the Connect Sources card.
Onboarding screen with Connect Sources option
2

Select PostHog

Click Connect next to PostHog in the list of available connectors.
Available connectors including PostHog
3

Start connection

A “Configure Connector” modal appears showing “PostHog Not Connected”. Click the orange Connect button to begin setup.
Configure PostHog modal
4

Authorize with Fivetran

AstroBee uses Fivetran to securely connect to PostHog. Review the security information and click Continue.
Fivetran authorization screen
Fivetran ensures:
  • Secure: Data transfer is encrypted end-to-end and your credentials are never exposed
  • Private: Your data passes through without permanent storage
5

Configure connection settings

On the Fivetran setup page, configure your PostHog connection:
PostHog connection configuration
  • Region: Select your PostHog data region (US or EU)
  • Access Token: Create a Personal API key in PostHog:
    1. Log in to your PostHog Cloud account
    2. Click your account in the top right corner, then click the gear icon
    3. Navigate to the Personal API keys section
    4. Click “Create personal API key”
    5. Copy the key and paste it into the Access Token field
Follow the Fivetran PostHog setup guide for detailed instructions.Click Save & Test to verify the connection.
6

Select tables to sync

Back in AstroBee, the “Configure Connector” modal shows your sync progress. Expand Sync Settings to select which tables to include.
Select PostHog tables in AstroBee
Tables marked “(always synced)” are required. Common tables include:
  • event: User interactions and product events
  • person: User profiles and properties
  • person_name: User identification data
  • session: User session information
  • cohort: User cohorts and segments
  • project: PostHog project metadata
Click Save Table Selection, then Continue.
7

Data layer building

A modal appears showing “Your data layer is building”. AstroBee is unifying, deduplicating, and resolving entities across your data.
Data layer building modal
This may take 10 minutes to a couple of hours. Feel free to close this and come back later.
8

Data syncing

The Sources page shows your sync progress. Your data source is syncing and the data layer will be generated automatically once syncing completes.
PostHog syncing progress
It’s safe to close this window and continue working. You can connect other data sources while you wait.
9

Connection complete

Your PostHog connection now appears under MY SOURCES on the Sources page. You’ll see the sync status (e.g., “Backfilling history”) while historical data loads.
PostHog connection completed

What happens next

After connecting PostHog, AstroBee automatically generates a data layer from your synced tables. Once complete, you can start querying your product analytics data using natural language.
You can also edit your data layer to customize entities, add properties, or create relationships.

Syncing data

PostHog connections use manual sync - you control when data is refreshed. To sync your latest product analytics data:
  1. Navigate to the Sources page
  2. Find your PostHog connection
  3. Click the “Sync now” button
AstroBee will pull the latest events, users, sessions, and cohort data from PostHog.

Understanding PostHog data

PostHog syncs multiple related tables that work together:
  • Events data: Every user interaction tracked in your product
  • Person data: User profiles with properties and identification
  • Session data: Grouped user activities within a time window
  • Cohort data: User segments based on behavior or properties
  • Project metadata: Your PostHog project configuration
The exact tables and data available depend on your PostHog setup and which events you’re tracking.

Troubleshooting

For additional help, see Fivetran’s PostHog troubleshooting guide.
Issue: Connection fails with invalid or expired API key error.Solution:
  • Verify you copied the entire API key from PostHog
  • Ensure the API key hasn’t been revoked or expired
  • Create a new Personal API key in PostHog and update your connection
  • Check that you’re using a Personal API key, not a project API key
  • Confirm you have the necessary permissions in PostHog
Issue: Connection fails or no data syncs after successful authentication.Solution:
  • Verify your PostHog account region (US: app.posthog.com, EU: eu.posthog.com)
  • Update the Region setting to match your PostHog account location
  • Recreate the connection with the correct region
  • Check your PostHog account settings to confirm the hosting region
Issue: Connection succeeds but event data is empty.Solution:
  • Verify your PostHog project is actively tracking events
  • Check that events have been captured recently in your PostHog dashboard
  • Ensure you selected the “event” table during setup
  • Trigger a manual sync to pull the latest data
  • Wait for initial sync to complete (can take 10+ minutes for large event datasets)
Issue: Initial sync appears stuck or is taking longer than expected.Solution:
  • Large event datasets (millions of events) can take 30+ minutes to sync
  • Check your internet connection
  • Avoid making changes to the connection during sync
  • PostHog’s API rate limits may slow down large syncs
  • If stuck for more than an hour, contact support at support@astrobee.ai
Issue: Some cohorts or user data don’t appear in synced tables.Solution:
  • Verify the cohorts exist in your PostHog dashboard
  • Ensure you selected the “cohort” and “person” tables during setup
  • Check that users have been identified (not just anonymous)
  • Trigger a new sync to pull the latest cohort and person data
  • Some cohorts may be empty if no users match the criteria
Issue: Status shows “Backfilling history” for many hours.Solution:
  • Historical backfills for PostHog can take 12+ hours for accounts with millions of events
  • This is normal behavior, not a stuck sync
  • You can safely close the browser and return later
  • The sync continues in the background and your data layer will generate automatically when complete
  • If backfill exceeds 72 hours with no progress, contact support at support@astrobee.ai
Issue: Sync completed but data layer shows an error or never finishes building.Solution:
  • Check that at least one table was selected during setup
  • Verify your synced tables contain actual data (not empty)
  • Try refreshing the page to see updated status
  • If the error persists, try disconnecting and reconnecting PostHog
  • Contact support at support@astrobee.ai with the error message if the issue continues

Next steps