Documentation Index
Fetch the complete documentation index at: https://help.statisfy.com/llms.txt
Use this file to discover all available pages before exploring further.
Connect PostHog with Statisfy
The PostHog integration lets you import product analytics data from your PostHog project into Statisfy using HogQL queries. Author queries in the Statisfy settings UI, preview results against your PostHog project, and schedule them to sync on a regular cadence — without writing any code. The configuration model mirrors the warehouse integrations (BigQuery, Snowflake, Postgres, Redshift). The difference is the query language: PostHog uses HogQL, a SQL-like dialect tuned for event analytics. Prerequisites:- Admin access to both PostHog and Statisfy
- A PostHog Personal API key with read access to your project
- Your PostHog Project ID and the API host (e.g.,
https://us.posthog.comorhttps://eu.posthog.com)
What You Can Import
| Data Type | Description | Use Case |
|---|---|---|
| Product Usage | Time-series usage metrics per account | Track MAU, feature adoption, event counts |
| Custom Fields | Account-level attributes | Sync segment, plan tier, engagement scores |
| Custom Objects | Domain-specific records | Sync sessions, funnels, retention cohorts |
Generate a PostHog Personal API Key
- Sign in to PostHog.
- Open Settings → Personal API keys and create a new key with read access (HogQL query execution) for the project you want to connect.
- Copy the key and note your Project ID (visible in the URL or project settings) and API host.
Steps to Connect
- Log in to Statisfy.
- Navigate to Integrations → PostHog → Connect.
-
Enter your PostHog credentials:
- API Host — e.g.,
https://us.posthog.comor your self-hosted URL - Project ID — Your PostHog project identifier
- API Key — The Personal API key you generated
- API Host — e.g.,
- Click Test Connection to confirm Statisfy can reach PostHog and authenticate.
- Once connected, PostHog will appear as Connected on the Integrations page.
Configure HogQL Queries
Open Integrations → PostHog → Settings to author and manage queries.-
Add a query. Choose the query type —
product_usage,custom_field, orcustom_object. - Write HogQL. Use the in-app HogQL editor. The editor supports HogQL syntax and references your PostHog events, persons, and groups.
- Preview the results. Click Preview to run the query against your PostHog project and inspect a sample of rows before saving. Because HogQL has no static schema browser, preview-by-execution is the validation step — if the preview returns the expected shape, the query is good to save.
-
Map columns to Statisfy entities. Use the same mapping editor as the warehouse integrations:
- Pick the account resolver column (Statisfy account ID, CRM ID, organization ID, email domain, account name, or any custom field)
- For
product_usage, map the metric value, timestamp, and (optionally) the metric label - For
custom_field, pick the field and value columns - For
custom_object, map each attribute on the custom object
- Save and schedule. Configure the cadence — daily, weekly, monthly, or sub-day — and Statisfy will run the query on schedule.
Query Types
| Query Type | Output |
|---|---|
product_usage | Time-series metrics per account |
custom_field | Account-level attribute values |
custom_object | Records of a custom object type |
Account Matching
Each query specifies how its rows map to Statisfy accounts via an account resolver:| Resolver | Description |
|---|---|
| Statisfy Account ID | Native Statisfy account identifier |
| CRM Account ID | Salesforce or HubSpot account identifier |
| Organization ID | External org identifier |
| Email Domain | Company website domain |
| Account Name | Company name (fuzzy matching) |
| Custom Field | Any custom field defined on accounts |
Sync Behavior
Scheduled Jobs:- Each saved query runs on the cadence you configure.
- Self-serve configuration takes precedence. If a tenant has no saved configuration for PostHog, Statisfy falls back to any built-in computation set up by support.
- Per-query errors are logged but do not block other queries from running.
- Invalid rows within a query are skipped and reported in the job audit log.
Security
- Credentials are stored encrypted in Google Cloud Secret Manager.
- All connections use HTTPS.
- HogQL queries authored in the Settings page can only read data — PostHog’s HogQL endpoint does not allow writes.
Troubleshooting
Connection test fails
Connection test fails
- Verify the API host matches your PostHog instance (US Cloud, EU Cloud, or self-hosted URL).
- Confirm the Project ID is correct.
- Confirm the Personal API key is active and has access to the project.
Preview returns an error
Preview returns an error
- HogQL has no static schema browser, so syntax errors only surface on execution. Check the editor error message for the offending function or column.
- Verify the events, persons, or groups referenced in the query exist in your PostHog project.
- Reduce the time range or row limit if the preview times out — PostHog enforces its own server-side query timeouts.
Records not matching to accounts
Records not matching to accounts
- Verify the resolver column contains values that exist in Statisfy.
- For CRM ID resolvers, confirm your CRM integration has synced the matching accounts.
- Try a different resolver (for example, switch from account name to email domain) if matching is unreliable.
Schedule isn't running
Schedule isn't running
- Confirm a schedule is configured under Integrations → PostHog → Settings.
- Activity tracking must be enabled on the tenant — PostHog initialization is skipped when tracking is disabled.