Skip to main content
Ninja Forms → PostHogIntegration guide

Connecting Ninja Forms to PostHog

Ninja Forms is add-on driven, which means what a given installation can do depends entirely on which extensions were bought — and so does what can be tracked. PostHog can be self-hosted, which changes the calculus entirely: the data stays on infrastructure you control, and so does the responsibility for everything that goes wrong with it. The join between them succeeds or fails on one thing: whether the distinct_id reaches the Ninja Forms submission before the conversion happens, because PostHog can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Ninja Forms submissions joined to PostHog persons

Write the posthog-js distinct_id into a hidden field and call identify with your CRM ID or email on submit. From the ninja_forms_after_submission hook, post a form-submitted event to PostHog's capture API with that distinct_id, form ID and a UUID from the submission ID. Set CRM qualification as a person property; keep typed answers out.

PostHog is where a Ninja Forms submission can be tied to the whole session before it, because posthog-js already holds a distinct_id for the anonymous visitor. Write that distinct_id into a hidden field when the form renders, and on a successful submit call identify with your CRM ID or the email, so the anonymous browsing merges into a known person instead of staying a separate profile.

Send the dependable event from the server. The ninja_forms_after_submission hook runs in PHP after the entry is saved, so it can post a form-submitted event to PostHog's capture API with the distinct_id from the hidden field, the form ID, and a UUID derived from the submission ID, which makes a retried post harmless. Do not also send a client-side capture under a different event name, or every funnel counts the step twice.

If you use the Multi-Part Forms add-on, PostHog can show which part people abandon, but only if your JavaScript emits an event on each part change; autocapture does not see those reliably. Later qualification belongs on the person as a property set from the CRM, so funnels can be filtered to leads that turned out real. Keep the answers people typed out of event properties.

Ninja Forms → PostHog · what breaks

Why this join usually fails — Ninja Forms → PostHog

  1. 01

    The distinct_id never reaches Ninja Forms

    Hidden field and CRM integration capability varies by add-on, and submissions are AJAX by default.

  2. 02

    Designing around a capability the site does not have

    Add-on-driven plugins make it easy to plan an integration that requires an extension nobody bought. Establishing the installed set first prevents a build that cannot run.

  3. 03

    Self-hosting the analytics and the outage together

    The advantage of owning the pipeline is that nothing blocks it. The cost is that when the ingestion instance fills its disk on a Saturday, the events are gone and nobody is paged. Hosted tools fail differently and more visibly.

  4. 04

    Nothing reconciles afterwards

    PostHog shows events in the activity view within moments. On a self-hosted instance, check the ingestion lag as well — events that are queued are not events that are lost, and the two need different responses.

Ninja Forms → PostHog · the fix

What working looks like — Ninja Forms → PostHog

  • The distinct_id on every submission

  • Conversions arriving in PostHog

    The event lands on the person profile and becomes available in insights, funnels and session replay.

  • Reconciled against the source

Ninja Forms → PostHog · architecture

How Ninja Forms and PostHog actually connect

  1. 1

    Ninja Forms holds the truth

    Whether the site can pass hidden fields, integrate with a CRM or take payment depends on installed add-ons. That has to be established before any integration is designed.

  2. 2

    PostHog needs a click to match

    PostHog needs a distinct_id, an event name and its properties. Self-hosted instances additionally need the ingestion endpoint reachable and the project API key correct, which is a class of failure hosted tools do not have.

  3. 3

    The identifier is the bridge

    The distinct_id, captured at the visit and carried into the Ninja Forms submission.

  4. 4

    The event source decides reliability

    Send qualified outcomes per form, with the identifier carried through.

  5. 5

    Deduplication at the destination

    PostHog deduplicates on the event UUID where supplied. Without one, a retried batch duplicates, and on a self-hosted instance there is no vendor support desk to notice it for you.

Ninja Forms → PostHog · normal or broken

Working vs. broken, side by side — Ninja Forms → PostHog

Normal, not a fault

  • The distinct_id present on the submission

  • Sent from your CRM record

  • Deduplicated correctly

    PostHog deduplicates on the event UUID where supplied. Without one, a retried batch duplicates, and on a self-hosted instance there is no vendor support desk to notice it for you.

  • Reconciles with the source

Actually broken

  • The distinct_id missing on most records

    Hidden field and CRM integration capability varies by add-on, and submissions are AJAX by default.

  • Sent from the browser

    Add-on-driven plugins make it easy to plan an integration that requires an extension nobody bought. Establishing the installed set first prevents a build that cannot run.

  • Counted twice, or not at all

    The advantage of owning the pipeline is that nothing blocks it. The cost is that when the ingestion instance fills its disk on a Saturday, the events are gone and nobody is paged. Hosted tools fail differently and more visibly.

  • Nobody has reconciled it

Ninja Forms → PostHog · diagnose

Diagnostic order — Ninja Forms → PostHog

  1. 01

    Count submissions carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    List the installed Ninja Forms add-ons before designing anything

    First step. It determines what is possible on this specific site.

  4. 04

    Check ingestion health and disk before debugging any missing event

    On self-hosted instances the answer is infrastructure far more often than it is instrumentation.

  5. 05

    Read the match rate, not the success message

    PostHog shows events in the activity view within moments. On a self-hosted instance, check the ingestion lag as well — events that are queued are not events that are lost, and the two need different responses.

Ninja Forms → PostHog · prove

How it gets proven — Ninja Forms → PostHog

Source of truth

Your CRM record, joined to the submission.

  • The distinct_id confirmed present on a live submission.
  • Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
  • Qualified outcomes reconciled per form against imported conversions.

Ninja Forms → PostHog · free audit

What we check in the free audit

  • Count submissions carrying the distinct_id
  • Follow one real conversion end to end
  • List the installed Ninja Forms add-ons before designing anything
  • Check ingestion health and disk before debugging any missing event
  • Read the match rate, not the success message

Checked against

Your CRM record, joined to the submission.

Get my free conversion tracking audit

Free30 minutesNo obligation

Ninja Forms → PostHog · when not to buy

When you don't need this — Ninja Forms → PostHog

  • Measure identifier coverage yourself first — pull your last hundred submissions and count how many carry the distinct_id.
  • If the required add-ons are not present, budget for them or choose a different approach — do not assume the capability.
  • If you have no reason to keep the data on your own infrastructure and no team to run it, the hosted product removes the only real downside of this one.

Ninja Forms → PostHog · what we deliver

What gets built — Ninja Forms → PostHog

  • Identifier capture into Ninja Forms

    Confirm which add-ons are installed, then bind to the submission event and pass the identifier through a supported field.

  • Event source: your CRM record

    Send qualified outcomes per form, with the identifier carried through.

  • Dispatch to PostHog

    The PostHog capture API, posted server-side from your backend to your own instance or to PostHog Cloud.

  • Reversals where they exist

    Disqualified submissions reverse.

Written guarantee

95%+ tracking accuracy

Measured against Your CRM record, joined to the submission.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Ninja Forms → PostHog questions, answered

Capture the PostHog distinct_id in a hidden field, then send a server-side event from the ninja_forms_after_submission hook with that ID. That survives ad blockers and AJAX submits.

Free · 30 min

Get Ninja Forms and PostHog joined properly

Free30 minutesNo obligation