PostHog
Forward PostHog events to Sazabi for real-time product and error observability.
Forward your PostHog events directly to Sazabi using PostHog's CDP HTTP Webhook destination for real-time observability and AI-powered analysis.
About this data source
PostHog's Customer Data Platform (CDP) supports HTTP Webhook destinations that can forward events to external services. By configuring a webhook destination pointing to Sazabi, you can:
- Stream product analytics events to Sazabi in real-time
- Correlate PostHog events with logs from your other data sources
- Use AI to analyze user behavior patterns and detect anomalies
- Keep PostHog as your primary analytics platform while gaining AI insights
Prerequisites
Before you begin, make sure you have:
- A PostHog workspace with access to CDP destinations (paid feature)
- A Sazabi public API key (project-scoped)
CDP destinations are a paid PostHog feature. Your PostHog workspace must have access to Data Pipeline destinations to use this integration.
Get your API key
Create a public key
Click Create API key and select Public as the key type. Public keys are safe to use in webhook configurations and are scoped to a single project.
Copy the key and store it securely. You will not be able to see it again.
Setup
Open PostHog Data Pipeline
Navigate to your PostHog project and go to Data Pipeline > Destinations.
Create HTTP Webhook destination
Click New destination and select HTTP Webhook from the list of available destination types.
Configure the webhook
Enter the following values in the destination configuration:
- URL:
https://posthog.<region>.intake.sazabi.com - Method:
POST - Headers: Add an
Authorizationheader with valueBearer <your-api-key>
Replace <region> with your Sazabi project region (e.g., us-east-1) and
<your-api-key> with your Sazabi public API key.
Set the body template
Use the default body template to forward the full event and person data:
{
"event": "{event}",
"person": "{person}"
}You can customize this template to include additional fields if needed.
Select events to forward
Choose which events you want to forward to Sazabi. You can forward all events or filter by event name, properties, or other criteria.
Save and enable
Save your destination configuration. Events will begin flowing to Sazabi shortly after the webhook is enabled.
How it works
When you configure the HTTP Webhook destination:
- PostHog captures an event in your application
- The CDP evaluates the event against your destination filters
- Matching events are sent to Sazabi's intake endpoint
- Sazabi transforms the event into OTEL format for storage and analysis
- Chat can now search and analyze your PostHog events
Verifying events are flowing
Once configured, verify that events are flowing to Sazabi:
-
Trigger a test event: Perform an action in your application that generates a PostHog event matching your webhook filters.
-
Ask the assistant: Open a thread in Sazabi and ask "Show me recent PostHog events" or "What events came in from PostHog in the last hour?"
Troubleshooting
Events not appearing in Sazabi
- Verify the webhook destination is enabled in PostHog
- Check that your Sazabi API key is correct and has the Public scope
- Ensure the URL includes the correct region for your Sazabi project
- Test by triggering an event that matches your destination filters
401 Unauthorized errors
- Your API key may be invalid or expired
- Verify the Authorization header format is
Bearer <key> - Create a new public API key in Settings > API Keys
CDP destinations not available
CDP destinations are a paid PostHog feature. Check your PostHog plan in workspace settings and upgrade if needed.