Skip to main content
You can connect a PostHog Cloud project to Hyperline and use its product events as usage data. Hyperline runs a HogQL query on a schedule and imports the results as events.
Hyperline supports PostHog Cloud projects hosted in the EU or US. The connection uses read-only query access.

Connect your PostHog project

  1. Go to Settings > Integrations in Hyperline.
  2. Find PostHog and select Connect.
  3. Sign in to PostHog if prompted.
  4. Select one PostHog project and authorize Hyperline.
After authorization, Hyperline automatically creates a PostHog connection on the data loaders page. You do not need to copy an API key or project ID.

Create a data loader

  1. Go to the data loaders page.
  2. Select New data loader.
  3. Choose the PostHog connection created for your project.
  4. Enter the event type that Hyperline should use for the imported records.
  5. Choose how often Hyperline should refresh the data.
  6. Enter a HogQL query and preview the results.
Your query must return these fields with the exact casing:
  • id — a stable, unique identifier for the record
  • customerId — the Hyperline customer ID or external ID associated with the record
  • timestamp — when the event occurred
For example, the following query imports PostHog events named api_call:
In this example, each PostHog distinct_id must match a Hyperline customer ID or external ID. You can select additional event properties when you need them for aggregation or pricing.
Filter the query to include only billable events and properties. This keeps each refresh focused on the data Hyperline needs for billing.
  1. Check that the preview contains the expected customers and records.
  2. Save the data loader.
Hyperline imports the query results on the selected schedule. For more information about customer matching, record updates, and required fields, see Pull usage data with connectors.

Next steps