PostHog lets your app capture product events, check feature flags and read analytics.
What you can ask for#
Track a signed_up event with the plan name when someone creates an account.
Hide the new dashboard behind a PostHog feature flag.
Add PostHog analytics to every page.
Connect PostHog#
Step 1: Find the connector
Open Tools, then Connectors, and search for PostHog. You can also go to Settings, then Connectors, in your dashboard.
Step 2: Select Connect
Select Connect to open the secure form.
Step 3: Enter the details
Fill in API key, PostHog region and Project ID. Hidden fields show as dots; use the eye icon to check what you typed. Enter your project token, which starts with phc_, in the API key field. In PostHog region enter us or eu.
Step 4: Save
Select Save connection. Swarmz encrypts the credentials and only decrypts them to call PostHog for you. Everyone in your workspace can then use the connection.
Where to find your credentials#
In PostHog, open your project settings and copy the project token and the numeric project ID. Use the project token that starts with phc_. A personal API key that starts with phx_ is not accepted.
What the AI can and can't do#
- Set up the browser tracking snippet and send events from the server.
- Check feature flags.
- The project token is built for sending events. Reports, dashboards and PostHog administration are not available through this connector.
- Apps you publish can call this connector too, not just the builder.
- Changes ask for your approval by default. You can adjust this under Agent permissions on the connection. See What an integration can access.
Troubleshooting#
The key is rejected.
Use the project token that starts with phc_, not a personal key.
I see no events.
Publish your site, use it, and allow a few minutes. Also check the region, us or eu.
Can it read my reports?
No. It sends events and checks flags only.
General steps for any connector are in Connect an integration. Keys and secrets are covered in Secrets and API keys. To remove it, see Disconnect an integration.
What Swarmz can do with it
Browser analytics
Install the verified public project token and ingest host.
Server events
Capture bounded product events from server workflows.
Feature flags
Evaluate project feature flags for a distinct user.
More in Data & analytics
Still stuck?
A person from Swarmz Support can take a look.