PostHog Integration
Forward your PostHog analytics to Klime.
Overview
The PostHog integration lets you forward events from PostHog to Klime. If you already use PostHog for product analytics, this is the fastest way to get started with Klime since there are no code changes needed.
PostHog runs a destination template that transforms each event into Klime's format before forwarding, so events arrive correctly without any code on your side.
Setup
- Open the Klime integration in PostHog
- Paste your Write Key from Settings > Integrations
- Click Create & enable
Once enabled, your PostHog events will automatically flow to Klime.
What gets forwarded
PostHog forwards your analytics events to Klime, including:
- Custom events — Any events you track in PostHog
- User identification — User properties and traits
- Group data — Company and organization information (if you use PostHog groups)
Historical import
After connecting, you can backfill up to a year of past events from PostHog. Open Settings > Integrations, expand the PostHog row, and click Import history.
You'll need a PostHog personal API key with the Query read scope. Project tokens are write-only and will not work.
When you click Import, Klime validates your credentials and checks which group types are active in your PostHog project. A confirmation dialog shows the estimated event count and, if your project has multiple group types, asks you to choose which group slot maps to Klime customers. Once confirmed, the import runs in the background and you can close the page safely.
Group identification
If you use Klime in group mode (B2B), your events need to be associated with a company. PostHog handles this through group analytics.
Make sure your app calls posthog.group() with the company type and ID. PostHog is stateful: once you call group(), PostHog automatically attaches the group context to all subsequent events forwarded to Klime.
posthog.group("company", "company_123", {
name: "Your Company",
plan: "enterprise",
})Without group calls, Klime receives your events but can't attribute them to specific companies. Your dashboard will show the events are arriving but company-level metrics will be empty.
Write Key
You can find your write key in Settings > Integrations. Store it securely and avoid sharing it publicly.