Overview
The PostHog integration provides comprehensive product analytics including page views, user sessions, feature flags, and custom event tracking.What you’ll track:
- Page views and sessions
- Active users (DAU, WAU, MAU)
- Custom events and conversions
- Feature flag usage
- User retention metrics
- Funnel conversion rates
Prerequisites
Before connecting PostHog, ensure you have:- A PostHog account (Cloud or Self-hosted)
- Admin access to your PostHog project
- A Dashtray account (any tier)
Connection Steps
Navigate to Integrations
- Log in to your Dashtray account
- Click Integrations in the sidebar
- Find PostHog in the Product category
- Click Connect
Get PostHog API Key
- Go to PostHog Settings
- Navigate to Project API Key section
- Copy your Project API Key
Use your Project API Key, not your Personal API Key. Project keys have read-only access to analytics data.
Enter Credentials
In Dashtray:
- Paste your PostHog API Key
- Enter your PostHog instance URL:
- Cloud:
https://app.posthog.com - Self-hosted: Your custom domain
- Cloud:
- Click Connect
Available Metrics
User Metrics
| Metric | Description | Unit |
|---|---|---|
posthog_dau | Daily Active Users | count |
posthog_wau | Weekly Active Users | count |
posthog_mau | Monthly Active Users | count |
posthog_new_users | New users today | count |
Event Metrics
| Metric | Description | Unit |
|---|---|---|
posthog_events | Total events tracked | count |
posthog_pageviews | Page views | count |
posthog_sessions | User sessions | count |
posthog_session_duration | Average session duration | seconds |
Feature Flag Metrics
| Metric | Description | Unit |
|---|---|---|
posthog_feature_flags | Active feature flags | count |
posthog_flag_evaluations | Flag evaluations | count |
Custom Events
Track your custom events:- Sign ups
- Conversions
- Button clicks
- Form submissions
- Any custom event you’ve defined in PostHog
Webhook Setup (Optional)
PostHog doesn’t support outbound webhooks, but you can use manual refresh or scheduled syncs.Troubleshooting
Connection Failed
Problem: API key authentication fails. Solutions:- Verify you’re using the Project API Key (not Personal API Key)
- Check that the API key is active and not revoked
- Ensure PostHog instance URL is correct
- For self-hosted: Verify URL is accessible from internet
No Data Showing
Problem: Metrics are zero or outdated. Solutions:- Verify PostHog is receiving events from your application
- Check that you have data in the selected time range
- Click Refresh to trigger manual sync
- Ensure API key has read permissions
Self-Hosted Connection Issues
Problem: Cannot connect to self-hosted PostHog instance. Solutions:- Ensure instance is publicly accessible
- Check firewall rules allow incoming connections
- Verify SSL certificate is valid (if using HTTPS)
- Test API endpoint with curl:
Rate Limiting
Problem: Sync fails with rate limit error. Explanation:- PostHog API has rate limits (varies by plan)
- High event volumes may hit limits during sync
- Wait for rate limit to reset
- Reduce sync frequency
- Upgrade PostHog plan for higher limits
Data Refresh
Manual Refresh
Click Refresh on your dashboard to fetch the latest data from PostHog.Manual refresh fetches the last 7 days of events to capture recent changes.
Automatic Sync
Automatic syncing is available on Pro and Scale tiers:- Pro tier: Every 3 hours
- Scale tier: Every 30 minutes
Best Practices
1. Track Key Events
Focus on events that matter:- User sign ups
- Feature usage
- Conversion events
- Critical user actions
2. Monitor User Retention
Track DAU, WAU, MAU to:- Understand user engagement
- Identify retention issues
- Measure product-market fit
3. Use Feature Flags
Monitor feature flag usage to:- Track feature adoption
- A/B test effectiveness
- Gradual rollout success
4. Set Up Alerts
Create alerts for:- Drop in DAU/MAU
- Spike in error events
- Low conversion rates
- Feature flag issues
Security & Privacy
Data Access
Dashtray requests read-only access to:- Event data
- User metrics (aggregated)
- Feature flag data
- Custom event definitions
- Individual user identities (unless you explicitly track them)
- Personal data beyond what you send to PostHog
- Session recordings
- Raw event payloads
Credential Storage
- API keys are encrypted with AES-256-GCM
- Keys are stored securely in our database
- You can revoke access anytime by regenerating your PostHog API key
Data Retention
Data retention depends on your tier:- Starter: 3 days
- Basic: 30 days
- Pro/Scale: Unlimited
Disconnecting
To disconnect PostHog:- Go to Integrations → PostHog
- Click Disconnect
- Confirm disconnection
Next Steps
Create Product Dashboard
Build an analytics-focused dashboard
Set Up Alerts
Get notified of user behavior changes
Connect Stripe
Correlate revenue with user behavior
AI Insights
Ask questions about user behavior
Support
Need help with PostHog integration?- Email: support@dashtray.com
- PostHog Docs: posthog.com/docs
- Status: status.dashtray.com