Skip to main content
GoCardless → PostHogIntegration guide

Connecting GoCardless to PostHog

GoCardless is bank debit rather than card, which changes everything about timing — a mandate is set up now and money moves days later, repeatedly. 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 GoCardless mandate 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

GoCardless to PostHog: see the drop-off at the hosted mandate step

PostHog cannot see GoCardless's hosted page, so capture events when users leave for it and return. Store the distinct_id in mandate metadata, then capture mandate active, payment confirmed, payment failed and mandate cancelled server-side with UUIDs derived from GoCardless event IDs. Send collections and failures as distinct events, and check ingestion lag if self-hosted.

PostHog can show where people abandon a bank debit signup, but the step that loses most of them happens on GoCardless' hosted page, which PostHog cannot see. Instrument the edges instead: capture an event when you send the user to GoCardless, and another when they return. The gap between the two is the hosted authorization step, and watching it by device and plan tells you whether bank details are the friction.

Store the PostHog distinct_id in the mandate metadata when you create the mandate. Every later GoCardless webhook, mandate active, payment confirmed, payment failed, mandate cancelled, can then be captured server-side on the same person, so a funnel can run from first page view to first collected payment, days or weeks apart. Give each server event a UUID derived from the GoCardless event ID so retried webhooks do not create duplicates.

Keep revenue events honest. Send collections as their own event with amount and charge date, and failed collections as a distinct event, rather than one "subscription paid" event that counts payments GoCardless later reverses. If PostHog is self-hosted, check ingestion lag on days when GoCardless sends large batches of collection webhooks.

GoCardless → PostHog · what breaks

Why this join usually fails — GoCardless → PostHog

  1. 01

    The distinct_id never reaches GoCardless

    Bank debit has a mandatory notice period and a settlement lag measured in days, so the money event is always well after the click. The identifier must live on the mandate, because every subsequent payment references it rather than a browser session.

  2. 02

    Days between the signup and the money

    Bank debit is not instant. The mandate is agreed today and the first collection clears later, which puts every naive page-based conversion at the wrong moment and the wrong value.

  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.

GoCardless → PostHog · the fix

What working looks like — GoCardless → PostHog

  • The distinct_id on every mandate

  • Conversions arriving in PostHog

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

  • Reconciled against the source

GoCardless → PostHog · architecture

How GoCardless and PostHog actually connect

  1. 1

    GoCardless holds the truth

    The mandate is the acquisition; each payment is a collection against it. A subscription business on direct debit should value the mandate, not the first collection.

  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 GoCardless mandate.

  4. 4

    The event source decides reliability

    Send the mandate setup as acquisition at expected lifetime value, and treat individual collections as reporting rather than as new conversions.

  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.

GoCardless → PostHog · normal or broken

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

Normal, not a fault

  • The distinct_id present on the mandate

  • Sent from the GoCardless payment confirmed webhook

  • 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

    Bank debit has a mandatory notice period and a settlement lag measured in days, so the money event is always well after the click. The identifier must live on the mandate, because every subsequent payment references it rather than a browser session.

  • Sent from the browser

    Bank debit is not instant. The mandate is agreed today and the first collection clears later, which puts every naive page-based conversion at the wrong moment and the wrong value.

  • 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

GoCardless → PostHog · diagnose

Diagnostic order — GoCardless → PostHog

  1. 01

    Count mandates carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Check whether the identifier is on the mandate or only the first payment

    If it is on the payment, no later collection can be attributed — and later collections are most of the revenue.

  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.

GoCardless → PostHog · prove

How it gets proven — GoCardless → PostHog

Source of truth

GoCardless payments confirmed by charge date, against the mandate that authorised them.

  • The distinct_id confirmed present on a live mandate.
  • Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
  • A collection weeks after setup confirmed traceable to the original mandate and click.

GoCardless → PostHog · free audit

What we check in the free audit

  • Count mandates carrying the distinct_id
  • Follow one real conversion end to end
  • Check whether the identifier is on the mandate or only the first payment
  • Check ingestion health and disk before debugging any missing event
  • Read the match rate, not the success message

Checked against

GoCardless payments confirmed by charge date, against the mandate that authorised them.

Get my free conversion tracking audit

Free30 minutesNo obligation

GoCardless → PostHog · when not to buy

When you don't need this — GoCardless → PostHog

  • Measure identifier coverage yourself first — pull your last hundred mandates and count how many carry the distinct_id.
  • If you take one-off bank payments with no mandate, this reduces to a much simpler integration.
  • 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.

GoCardless → PostHog · what we deliver

What gets built — GoCardless → PostHog

  • Identifier capture into GoCardless

    Pass the click identifier into the mandate's metadata at setup, so all future collections trace back to the campaign that acquired the customer.

  • Event source: the GoCardless payment confirmed webhook

    Send the mandate setup as acquisition at expected lifetime value, and treat individual collections as reporting rather than as new conversions.

  • 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

    Failed collections, chargebacks and cancelled mandates all exist and all should reduce the reported value.

Written guarantee

95%+ tracking accuracy

Measured against GoCardless payments confirmed by charge date, against the mandate that authorised them.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

GoCardless → PostHog questions, answered

You cannot instrument GoCardless' hosted page, so capture an event when users are sent there and another when they return, and treat the difference as drop-off at bank authorization.

Free · 30 min

Get GoCardless and PostHog joined properly

Free30 minutesNo obligation