PostHog
Import PostHog people and product events. Use identified pageviews to record presence.
Connect PostHog
PostHog uses a reviewed Activepieces piece inside Datum. It reads one PostHog Cloud project through a personal API key. An initial import collects people. Datum checks for events every 15 minutes afterward.
Prepare the PostHog credentials
Open your account settings in PostHog. Create a key under Personal API keys with read access to the project. Copy the key immediately. Record the numeric project ID from project settings or the address after
/project/. Record the Cloud region: US or EU.PostHog shows the key only once.
Open Sources
Open Sources → Connect a source → PostHog. Enter PostHog personal API key. Enter Numeric project ID. Choose
usoreuin Cloud region. Press Verify.An empty region selects US Cloud.
Import people
Events arrive automatically, but people require an import. Press Run now on the source’s page. Alternatively, run the following command from your terminal or agent:
ocmgr ingest <connectionId>Check the result
Check the Verify result. Check Members after the import. Check Activity for events within 15 minutes.
Verification makes one read request without importing records.
Data Datum imports
| People | Name and email address from each person’s properties, keyed on their first distinct ID |
| Activity | Each event under the name PostHog gives it, checked every 15 minutes from when you connect |
| Presence | Optional. Identified pageviews on one hostname you choose become days a member was present |
| Not collected | Event properties, page addresses and titles, anonymous pageviews and browser housekeeping events |
Datum treats every PostHog address as unverified. PostHog people cannot link automatically to other accounts. Possible matches enter your review queue.
Event checks start when you connect. Datum does not import earlier events. PostHog’s retention and listing limits still apply.
Presence from pageviews
Open the PostHog source on Sources to configure visits to your community site. Open Settings. Enter Community presence. Alternatively, run:
ocmgr presence configure <connectionId> --host forum.example.com
Import people before collecting presence.
Presence counts only identified $pageview events on the exact configured hostname. Their distinct IDs must match imported people. Datum keeps only the visit day from each pageview. The connection’s hostname cannot change after configuration.
Create another connection for a different community site. See Presence for how Datum uses visit days.
Troubleshooting
One person has duplicate accounts
Datum identifies each person by their first distinct ID. Events under other aliases create separate accounts until matching evidence or a person links them.
Self-hosted PostHog
Datum supports only PostHog US and EU Cloud. Self-hosted PostHog requires a reviewed change to the piece’s mapping.
From your terminal or agent
ocmgr connection create --kind piece:posthog --config '{"projectId":"123","region":"us"}' \
--secret apiKey=<personal-api-key> --json
ocmgr connection verify <connectionId> --json
ocmgr ingest <connectionId> --pages 1 --json{ "name": "create_connection", "arguments": { "kind": "piece:posthog", "config": { "projectId": "123", "region": "us" }, "credentials": { "apiKey": "<personal-api-key>" } } }
{ "name": "configure_presence", "arguments": { "connectionId": "<connectionId>", "enabled": true, "host": "forum.example.com" } }curl -X POST "$OCMGR_URL/v1/presence/sources" -H "Authorization: Bearer $OCMGR_API_KEY" \
-H 'content-type: application/json' \
-d '{"connectionId":"<connectionId>","enabled":true,"host":"forum.example.com"}'See create_connection and configure_presence for every parameter.
FAQ
Can I choose which events come in?
No. Datum imports every event except anonymous pageviews and browser maintenance events. It keeps PostHog’s event names. Filter activity by type to view one kind, for example ocmgr activity --type <event-name>.
Can I stop the 15-minute check?
Yes. Run ocmgr connection update <connectionId> --config '{"enabled":false}' to disable checks. Alternatively, select Pause from the source’s menu. Both methods retain previously imported records.