Skip to main content
Bricks → PostHogIntegration guide

Connecting Bricks Builder to PostHog

Bricks generates lean markup and is popular with developers, which means the sites built on it are usually fast and the tracking is usually hand-written rather than plugin-driven. 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 Bricks 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

Bricks Builder forms in PostHog: identify on AJAX success

PostHog autocapture logs Bricks form submits before validation, so capture a custom event from the Bricks success event with the form name, call identify there with a stable ID, and store distinct_id in a hidden field. Send CRM-qualified leads server-side with that distinct_id and a submission-derived UUID. Confirm input masking before recording form pages.

PostHog's autocapture records a submit event when a Bricks form is sent, but that happens in the browser before Bricks' AJAX response says whether the submission was accepted. A form rejected for a missing field or a failed captcha still logs a submit. Capture a custom event from the Bricks success event instead, with the form name as a property, and build funnels on that.

The submission is also the moment the visitor stops being anonymous, so call identify there with a stable ID (a CRM ID, or a hash of the email) and store PostHog's distinct_id in a hidden Bricks field. When the CRM later marks the lead qualified, send a server-side capture with that same distinct_id and a UUID derived from the submission, so retries do not duplicate and the qualified event lands on the same person's timeline as the original visit.

If PostHog is self-hosted, put ingestion on a subdomain of the Bricks site so blockers treat it as first-party. Turn off session recording on pages whose forms take sensitive input unless input masking is confirmed on those exact fields; developer-built Bricks forms sometimes use custom inputs that masking rules do not recognize.

Bricks → PostHog · what breaks

Why this join usually fails — Bricks → PostHog

  1. 01

    The distinct_id never reaches Bricks

    Custom implementations vary per site, and forms submit over AJAX by default.

  2. 02

    Undocumented custom tracking

    A lean hand-built implementation is usually correct and almost never written down. The next person to touch the site either duplicates it or breaks it, and both failures are silent.

  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.

Bricks → PostHog · the fix

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

    Bricks Builder's own records are the reference, not either dashboard.

Bricks → PostHog · architecture

How Bricks and PostHog actually connect

  1. 1

    Bricks Builder holds the truth

    Developer-built sites tend to have deliberate, minimal tracking. That is an advantage until the developer leaves and nobody knows what was implemented or where.

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

  4. 4

    The event source decides reliability

    Send qualified outcomes per form, with the implementation documented.

  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.

Bricks → PostHog · normal or broken

Working vs. broken, side by side — Bricks → PostHog

Normal, not a fault

  • The distinct_id present on the submission

    Visible on the record itself in Bricks Builder, not merely captured somewhere on the site.

  • 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

    PostHog's count and Bricks Builder's records agree within a few percent over a closed window.

Actually broken

  • The distinct_id missing on most records

    Custom implementations vary per site, and forms submit over AJAX by default.

  • Sent from the browser

    A lean hand-built implementation is usually correct and almost never written down. The next person to touch the site either duplicates it or breaks it, and both failures are silent.

  • 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

    The dashboard shows a number and no one has compared it to Bricks Builder.

Bricks → PostHog · diagnose

Diagnostic order — Bricks → PostHog

  1. 01

    Count submissions carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Document the existing implementation before modifying it

    On developer-built sites this is the step that prevents the most damage.

  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.

Bricks → PostHog · prove

How it gets proven — Bricks → PostHog

Against Bricks Builder's own records, not against either platform's dashboard.

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 the implementation documented.

Bricks → PostHog · free audit

What we check in the free audit

  • Count submissions carrying the distinct_id
  • Follow one real conversion end to end
  • Document the existing implementation before modifying it
  • 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

Bricks → PostHog · when not to buy

When you don't need this — Bricks → PostHog

  • If PostHog already reports conversions that reconcile against Bricks Builder's records within a few percent, this join is working and there is nothing to buy.
  • Measure identifier coverage yourself first — pull your last hundred submissions and count how many carry the distinct_id.
  • If the original developer is available, an hour of their time is worth more than a week of reverse engineering.
  • 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.

Bricks → PostHog · what we deliver

What gets built — Bricks → PostHog

  • Identifier capture into Bricks

    Document what exists before changing anything, then bind to the form submission event and pass the identifier through a hidden field.

  • Event source: your CRM record

    Send qualified outcomes per form, with the implementation documented.

  • 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

Bricks → PostHog questions, answered

Autocapture logs the browser submit before Bricks' AJAX response says whether it succeeded. Capture a custom event on the success event instead.

Free · 30 min

Get Bricks and PostHog joined properly

Free30 minutesNo obligation