Skip to main content
The PostHog integration enables automatic event tracking from your FunnelFox funnels directly into your existing PostHog analytics setup.

Setup

You’ll need an active PostHog account to set up this integration.
When configuring your PostHog account, make sure the correct Project region is set under Settings > Project > General. If it was set incorrectly, you’ll need to migrate your PostHog project or create a new one.
  1. Go to Settings > Project > General in PostHog.
  1. Copy the Project API key under Project ID.
  1. Go to Integrations > PostHog in FunnelFox.
  2. Paste the API key into the PostHog Project API Key field.
  1. Click Save changes.
Your PostHog integration is now active. Republish your funnels to apply these changes.

Events

PostHog receives the following events from FunnelFox:
Subscription status and renewal events are not currently tracked.
You can set up custom events to track in your funnel using Custom Code.

Example events

The failure_code field is currently populated for Stripe payments only. It contains a Stripe decline or error code.For other payment providers, failure_reason is always generic.
reason and message are included only when the payment provider returns them. Stripe sends message only.

User identification

FunnelFox sends the user’s profile ID to PostHog, which sets it as the distinct_id. This ID remains consistent across all sessions. When a user’s email is collected, it’s also automatically added as a profile property in PostHog.

Anonymous mode

By default, FunnelFox initializes PostHog with the profile ID as the distinct_id, so every event belongs to that profile from the start. Anonymous mode delays identification instead: PostHog uses an anonymous ID based on the profile ID, and FunnelFox calls PostHog’s identify() with your user ID as soon as the funnel receives it. PostHog then links the earlier anonymous activity to the identified person. Use Anonymous mode if you manage user identity yourself, for example through Firebase or Supabase. To enable Anonymous mode:
  1. Go to Integrations > PostHog in FunnelFox.
  2. Toggle on Anonymous mode.
  3. Click Save changes.

Self-hosted instance

By default, FunnelFox sends events to PostHog Cloud. To send them to a self-hosted PostHog instance or a reverse proxy instead, set PostHog instance URL in the PostHog integration settings. Leave it empty to keep PostHog Cloud.
  1. Go to Integrations > PostHog in FunnelFox.
  2. Enter the URL in PostHog instance URL, for example https://e.yourdomain.com or https://yourdomain.com/ingest. The URL must:
  • Use https and a domain name, not an IP address.
  • Use port 443 or 8443, or no port.
  • Have no query string or #fragment.
  • Not redirect. If it does, enter the address it redirects to.
  • Forward /decide/, /static/*, and the event paths, if it’s a reverse proxy.
  • Use the xn-- form for international domains.
  1. Click Save changes.