Integrations
PostHog

PostHog

Connect PostHog to Customerscore to sync product analytics events and map them to customers in your account.

How to Connect PostHog to Customerscore

Connecting PostHog is a guided flow with two parts: first you upload your API credentials, then you configure how PostHog data maps to customers in Customerscore (customer identification, events to track, and which Persons should be synced as Contacts).

Step 1: Prepare PostHog API Access

  1. Log in to your PostHog account. We'll need the project ID from your account URL (e.g., https://eu.posthog.com/project/12345 — in this case, 12345 is the project ID).

  2. Navigate to Settings → Personal API Keys and click Create personal API key. Start by entering a Label name. Type Customerscore.io as the name.

Next, choose the access level: Organization or Project, depending on whether you want to grant access to your entire organization or only to specific projects.

Then, under Scopes, assign permissions to the API key. For the basic setup, grant Read access to the following resources: Action, Event definition, Organization, Project, Property definition and Query.

Once you have selected all the required permissions, click the Create key button at the bottom of the form to generate the token.

PostHog API key setup

Step 2: Upload Credentials to Customerscore

In Customerscore, go to Settings → Providers (opens in a new tab) and click Connect to PostHog. Fill out the form:

FieldDescription
API KeyThe personal API key you created in PostHog.
Project IDThe numeric project ID from your PostHog URL.

When you click Upload credentials, Customerscore validates the token against both the US and EU PostHog regions and checks that all required permissions are granted. If any scope is missing, you'll see which ones — go back to PostHog and add them before retrying.

After the credentials are accepted, the integration moves on to a three-step configuration wizard. You can leave and return later — the wizard will resume where you left off.

Step 3: Customer Identification

This step tells Customerscore how your customers (companies) are represented in PostHog, so we can match incoming events to the right customer.

Choose one of the options:

  • Person property — each PostHog Person has a property that stores the customer identifier (for example organization_id, company_id, or account_id). Select this option when your tracking code sets a company-level identifier on every Person.
  • I'm not sure — you don't track Customers/Companies in PostHog, or you're unsure about the setup. Selecting this option prompts you to contact support so we can help you figure out the right configuration before continuing.

If you pick Person property, a second field appears: Which Person property stores the customer identifier?. Start typing the property name — the dropdown loads existing Person properties from your PostHog project, and you can either pick one or type a custom name.

⚠️

Only Persons that have this property set will be synced to Customerscore. Persons without the external ID cannot be attached to a customer record.

Click Next to continue.

Step 4: Events to Track

Pick which PostHog events you want to sync into Customerscore. Only selected events are imported — everything else is ignored.

  • The wizard lists all event definitions found in your PostHog project, along with the total count (e.g. "We found 42 events in your account.").
  • Use the search box to filter the list by name.
  • Click Select all / Deselect all to toggle everything at once.
  • Tick each event you want to track. A counter in the header shows how many are currently selected.

You need to select at least one event to continue. You can always edit this list later by reopening the integration settings.

Click Next to continue.

Step 5: Persons Sync

Along with events, PostHog Persons are synced as Contacts in Customerscore. This step lets you filter which Persons should be imported so that only the right data flows into your account.

Live count. A badge at the top shows how many Persons will be synced based on your current filters (e.g. "1,248 persons will be synced"). The count updates in real time as you change the filters.

Locked condition. If you selected a Person property for customer identification in Step 3, the wizard automatically adds a non-removable condition {property} is set. This guarantees that only Persons that can be attached to a customer are imported.

Adding filter conditions. Click + Add condition to narrow the sync further. Each condition has three parts:

PartDescription
PropertyThe PostHog Person property to filter on. Pick from the list or type a custom name.
OperatorOne of equals, does not equal, is set, is not set.
ValueThe value to match against (only shown for equals and does not equal).

Use the trash icon to remove a condition you've added. The locked condition from Step 3 cannot be removed.

Example persons. Below the filters, the wizard renders a small preview table of matching Persons (up to five rows and five columns) so you can sanity-check your configuration before saving.

When the count and preview look right, click Save configuration. The integration is now live and Customerscore starts importing your selected events and Contacts on the next sync.

Editing or Disconnecting

You can reopen the PostHog integration at any time from Settings → Providers (opens in a new tab) to change the external ID mapping, tracked events, or Persons filters — the wizard pre-fills the form with your current configuration.

To remove the integration, click Disconnect from PostHog at the bottom of the configuration wizard. This removes all configured metrics and integration settings; existing historical data in Customerscore is preserved.

What Happens Next?

Once the configuration is saved, Customerscore triggers an initial sync immediately and schedules recurring syncs according to your account's sync period. Selected events appear in customer timelines, and Persons matching the filter are created as Contacts attached to the right customer via the external ID mapping.