Skip to main content

PostHog Provider

Manage PostHog analytics, feature flags, and product insights with Pulumi
2 min read

The PostHog provider enables you to manage product analytics, feature flags, and event tracking resources in PostHog using Pulumi. This provider is dynamically bridged from the Terraform PostHog Provider.

Installation#

Install the PostHog provider package using your preferred package manager:

Quick Start#

Key Features#

The PostHog provider supports the following resources for managing your product analytics infrastructure:

Feature Flags#

Create and manage feature flags with advanced targeting and rollout strategies. Perfect for gradual rollouts, A/B testing, and targeted feature releases.

Dashboards#

Build custom dashboards for visualizing your analytics data.

Insights#

Configure analytics insights for tracking events, funnels, retention, and other metrics.

Alerts#

Set up alerts to monitor metrics and get notified when thresholds are exceeded.

Hog Functions#

Create custom Hog functions for data transformation and routing.

Surveys#

Create project-scoped surveys with display conditions, targeting, and iteration scheduling.

External Data Sources#

Sync data from external systems (Postgres, Stripe, etc.) into PostHog as warehouse tables.

Proxy Records#

Provision organization-scoped PostHog reverse-proxy records on custom domains.

Configuration#

See the Configuration guide for detailed setup instructions, including:

  • Getting your PostHog API key
  • Setting up Pulumi configuration
  • Configuring self-hosted PostHog instances
  • Multi-environment and multi-project setups

Common Use Cases#

Feature Rollout Strategy#

Analytics Dashboard#

Resource Types#

ResourceDescription
FeatureFlagFeature flag management for gradual rollouts and A/B testing
DashboardCustom dashboards for data visualization
InsightAnalytics queries and insights
AlertMetric alerts and notifications
HogFunctionCustom data transformation functions
SurveyProject-scoped surveys with targeting and iteration scheduling
ExternalDataSourceSync warehouse data from external systems (Postgres, Stripe, etc.)
ProxyRecordOrganization-scoped reverse-proxy records on custom domains

Getting Help#