Skip to main content
Cognito Forms → PostHogIntegration guide

Connecting Cognito Forms to PostHog

Cognito Forms supports conditional logic and payments, which means one form can be a survey, a registration and a checkout depending on which branch the visitor takes. 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 Cognito Forms entry 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

Cognito Forms to PostHog: one distinct_id from page to entry

Copy PostHog's distinct_id into a hidden Cognito Forms field so server-side submission captures land on the same person. Send branch, entry number and paid amount as properties, derive the event UUID from the entry number, and alias by email. Autocapture works only when the form renders in your page, not an iframe; mask form inputs in session replay.

PostHog can show the whole path from ad click to a completed Cognito entry, but only if the same distinct_id is on both ends. The browser library on your page has it; the entry does not, unless you copy it into a hidden field when the form loads. Do that, and the server-side capture of the submission lands on the same person as the pageviews and the UTM-tagged first visit.

Capture the submission from the entry, keyed on that distinct_id, with the branch, the entry number and, for paid branches, the amount as properties. Derive the event UUID from the entry number so a retried post is ignored rather than counted twice. If the person entered an email, alias them now, so the history joins up if they later return as a logged-in user.

With the seamless embed, autocapture can also record field interactions, which makes PostHog useful for seeing where people abandon a multi-page Cognito form. With the iframe embed, autocapture sees nothing past the frame boundary. Be deliberate about what it collects: Cognito forms often hold sensitive answers, and on a self-hosted instance that data is your responsibility. Mask the form's inputs in session replay and keep field values out of autocapture.

Cognito Forms → PostHog · what breaks

Why this join usually fails — Cognito Forms → PostHog

  1. 01

    The distinct_id never reaches Cognito Forms

    Forms are embedded and payments may hand off to a processor, breaking the session twice.

  2. 02

    One form, several outcomes, one conversion action

    Conditional logic means the same form produces a free enquiry from one visitor and a paid registration from another. A single conversion action averages them into a value that describes neither.

  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.

Cognito Forms → PostHog · the fix

What working looks like — Cognito 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

Cognito Forms → PostHog · architecture

How Cognito Forms and PostHog actually connect

  1. 1

    Cognito Forms holds the truth

    A form that sometimes takes payment and sometimes does not produces two completely different conversions from one submission event.

  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 Cognito Forms entry.

  4. 4

    The event source decides reliability

    Send paid submissions at their amount and unpaid ones as a separate lower-value action.

  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.

Cognito Forms → PostHog · normal or broken

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

Normal, not a fault

  • The distinct_id present on the submission

  • Sent from your CRM or payment 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

    Forms are embedded and payments may hand off to a processor, breaking the session twice.

  • Sent from the browser

    Conditional logic means the same form produces a free enquiry from one visitor and a paid registration from another. A single conversion action averages them into a value that describes neither.

  • 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

Cognito Forms → PostHog · diagnose

Diagnostic order — Cognito Forms → PostHog

  1. 01

    Count submissions carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    List the branches your form can produce and their values

    Usually the first time anyone has, and it is normally the whole fix.

  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.

Cognito Forms → PostHog · prove

How it gets proven — Cognito Forms → PostHog

Source of truth

Your CRM or payment record, with the form branch recorded.

  • 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.
  • Submissions reconciled by branch against imported conversions.

Cognito 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 branches your form can produce and their values
  • Check ingestion health and disk before debugging any missing event
  • Read the match rate, not the success message

Checked against

Your CRM or payment record, with the form branch recorded.

Get my free conversion tracking audit

Free30 minutesNo obligation

Cognito Forms → PostHog · when not to buy

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

  • Measure identifier coverage yourself first — pull your last hundred submissions and count how many carry the distinct_id.
  • A single-path form with no payment needs one action and nothing else.
  • 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.

Cognito Forms → PostHog · what we deliver

What gets built — Cognito Forms → PostHog

  • Identifier capture into Cognito Forms

    Pass the identifier into a hidden field and carry it through to the payment where one occurs.

  • Event source: your CRM or payment record

    Send paid submissions at their amount and unpaid ones as a separate lower-value action.

  • 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

    Refunds reverse.

Written guarantee

95%+ tracking accuracy

Measured against Your CRM or payment record, with the form branch recorded.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Cognito Forms → PostHog questions, answered

Copy PostHog's distinct_id into a hidden field when the form loads, then capture the submission server-side with that ID. Without it, the entry becomes a new anonymous person.

Free · 30 min

Get Cognito Forms and PostHog joined properly

Free30 minutesNo obligation