Skip to main content
Divi → PostHogIntegration guide

Connecting Divi to PostHog

Divi is a theme and builder combined, which means the site's structure and its forms are the same product — and a theme update can change both at once. 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 Divi form 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

Divi forms in PostHog: autocapture counts failed submits

Do not build PostHog funnels on autocapture submits, which include Divi captcha failures. Fire a custom event from the Contact Form's success state with the module ID and call identify with the email. Capture the distinct_id into the submission so the CRM can send qualified leads through the capture API to the same person.

Dropping the PostHog snippet into Divi's Theme Options Integration gets you page views and autocapture on every page within minutes, and that is where the trap is. Autocapture records the form submit event in the browser, which on a Divi Contact Form includes attempts rejected by its math captcha or by empty-field validation. Build your funnels on a custom event fired from the form's success state, carrying the module ID so the same form placed on many pages can be told apart.

Call identify with the submitted email on success, so the anonymous distinct_id that browsed your service pages merges into one person. If the lead later qualifies in your CRM, send that event server-side through the capture API with the same distinct_id; capture it into the submission so the CRM has it. Without that, the qualified lead becomes a new anonymous person and the funnel from first visit to booked job never closes.

If you self-host PostHog, point the snippet at your own ingestion domain so ad blockers that block PostHog Cloud leave it alone. Session replay on Divi pages is genuinely useful for finding where mobile visitors abandon a long form, but check that inputs are masked before you record anyone typing a phone number or a description of their problem.

Divi → PostHog · what breaks

Why this join usually fails — Divi → PostHog

  1. 01

    The distinct_id never reaches Divi

    Custom code added to theme templates is vulnerable to updates, and Divi's contact module submits over AJAX.

  2. 02

    Tracking removed by a theme update

    Code placed directly into theme files disappears when the theme updates. The site keeps working, the forms keep submitting, and the conversions stop arriving with no error anywhere.

  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.

Divi → PostHog · the fix

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

Divi → PostHog · architecture

How Divi and PostHog actually connect

  1. 1

    Divi holds the truth

    Because the builder is the theme, tracking added into templates can be lost or duplicated by a theme update in ways a plugin-based setup would not experience.

  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 Divi form submission.

  4. 4

    The event source decides reliability

    Send qualified outcomes per form, with the identifier passed through a hidden field.

  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.

Divi → PostHog · normal or broken

Working vs. broken, side by side — Divi → 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

    Custom code added to theme templates is vulnerable to updates, and Divi's contact module submits over AJAX.

  • Sent from the browser

    Code placed directly into theme files disappears when the theme updates. The site keeps working, the forms keep submitting, and the conversions stop arriving with no error anywhere.

  • 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

Divi → PostHog · diagnose

Diagnostic order — Divi → PostHog

  1. 01

    Count submissions carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Check whether tracking code sits in theme files or in a child theme

    If it is in the parent theme, it is one update away from vanishing.

  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.

Divi → PostHog · prove

How it gets proven — Divi → 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, with code placement verified update-safe.

Divi → PostHog · free audit

What we check in the free audit

  • Count submissions carrying the distinct_id
  • Follow one real conversion end to end
  • Check whether tracking code sits in theme files or in a child theme
  • 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

Divi → PostHog · when not to buy

When you don't need this — Divi → PostHog

  • Measure identifier coverage yourself first — pull your last hundred submissions and count how many carry the distinct_id.
  • Sites using a separate form plugin and a tag manager are insulated from the theme-update risk.
  • 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.

Divi → PostHog · what we deliver

What gets built — Divi → PostHog

  • Identifier capture into Divi

    Use a child theme or the builder's supported code integration areas rather than editing templates directly, and bind to the AJAX submission.

  • Event source: your CRM record

    Send qualified outcomes per form, with the identifier passed through a hidden field.

  • 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

Divi → PostHog questions, answered

Autocapture records browser submit attempts, including ones that failed validation or the math captcha. Fire a custom event from the success message and count that.

Free · 30 min

Get Divi and PostHog joined properly

Free30 minutesNo obligation