Skip to main content
Recurly → PostHogIntegration guide

Connecting Recurly to PostHog

Recurly is built around keeping subscriptions alive, which means a large share of the revenue it recovers comes from payments that failed and were retried rather than from anything marketing did. 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 Recurly subscription 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

Recurly and PostHog: billing events beside product usage

Use your user ID as the PostHog distinct_id and set the Recurly account_code to match, then send webhook events for trial started, first paid charge, payment failed, payment recovered, canceled and expired. Keep dunning expiry and customer cancellation as separate event names. Derive the event UUID from the Recurly transaction or notification ID so webhook retries overwrite instead of duplicating.

PostHog's value with Recurly is putting billing transitions on the same person as product usage. Use your user ID as the distinct_id in the app, set the Recurly account_code to the same value, and send server events from the webhook: trial started, first paid charge, payment failed, payment recovered, canceled, expired. Funnels from activation to first charge, and retention by plan, then come straight out of PostHog without a warehouse.

Separate the two kinds of churn in the event names, because they are different problems. A subscription that expires after dunning failed is a card problem; one canceled by the customer is a product or price problem. Analyzing them together sends product teams chasing usage patterns behind churn that was really expired cards. For B2B, attach events to a group for the company so seat-based plans can be read at account level.

Webhook retries are the integrity issue here. Recurly resends a notification when your endpoint does not acknowledge it in time, and without an event UUID a slow handler writes the same payment twice. Derive the UUID from the Recurly transaction or notification ID so a retry overwrites rather than duplicates. On a self-hosted instance, also confirm the ingestion endpoint your backend calls is reachable from the server, not only from browsers.

Recurly → PostHog · what breaks

Why this join usually fails — Recurly → PostHog

  1. 01

    The distinct_id never reaches Recurly

    Checkout may run through Recurly's hosted pages, and the renewal that actually matters happens months later with no browser session at all.

  2. 02

    Dunning recovery counted as acquisition

    A retried card that succeeds on day three looks identical to a new subscription in most exports. On a mature book that recovery is a meaningful share of monthly revenue and none of it was bought.

  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.

Recurly → PostHog · the fix

What working looks like — Recurly → PostHog

  • The distinct_id on every subscription

  • Conversions arriving in PostHog

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

  • Reconciled against the source

Recurly → PostHog · architecture

How Recurly and PostHog actually connect

  1. 1

    Recurly holds the truth

    Dunning recovery is Recurly's core product. Revenue rescued from a declined card three days after it failed is real money and it is not a conversion — attributing it to whatever campaign is running that week is the standard mistake here.

  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 Recurly subscription.

  4. 4

    The event source decides reliability

    Send new subscription starts at first successful payment. Renewals and dunning recoveries belong in separate figures.

  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.

Recurly → PostHog · normal or broken

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

Normal, not a fault

  • The distinct_id present on the subscription

  • Sent from the Recurly subscription 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

    Checkout may run through Recurly's hosted pages, and the renewal that actually matters happens months later with no browser session at all.

  • Sent from the browser

    A retried card that succeeds on day three looks identical to a new subscription in most exports. On a mature book that recovery is a meaningful share of monthly revenue and none of it was bought.

  • 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

Recurly → PostHog · diagnose

Diagnostic order — Recurly → PostHog

  1. 01

    Count subscriptions carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Split subscription events into new, renewal and recovered

    Three categories, three owners. Until they are separated, no acquisition number is readable.

  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.

Recurly → PostHog · prove

How it gets proven — Recurly → PostHog

Source of truth

Recurly subscriptions by start date, with recovered and involuntary-churn revenue held apart from new business.

  • The distinct_id confirmed present on a live subscription.
  • Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
  • New subscription starts reconciled against imported conversions, with recovered revenue reported separately.

Recurly → PostHog · free audit

What we check in the free audit

  • Count subscriptions carrying the distinct_id
  • Follow one real conversion end to end
  • Split subscription events into new, renewal and recovered
  • Check ingestion health and disk before debugging any missing event
  • Read the match rate, not the success message

Checked against

Recurly subscriptions by start date, with recovered and involuntary-churn revenue held apart from new business.

Get my free conversion tracking audit

Free30 minutesNo obligation

Recurly → PostHog · when not to buy

When you don't need this — Recurly → PostHog

  • Measure identifier coverage yourself first — pull your last hundred subscriptions and count how many carry the distinct_id.
  • If your churn is mostly voluntary and you run no dunning, this collapses to an ordinary subscription 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.

Recurly → PostHog · what we deliver

What gets built — Recurly → PostHog

  • Identifier capture into Recurly

    Capture on your own domain, persist against the account, and attach to the subscription so a renewal or a recovery can still be traced without being credited as new.

  • Event source: the Recurly subscription webhook

    Send new subscription starts at first successful payment. Renewals and dunning recoveries belong in separate figures.

  • 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

    Cancellations inside the first billing period reverse, and so should subscriptions that never recover from a failed first charge.

Written guarantee

95%+ tracking accuracy

Measured against Recurly subscriptions by start date, with recovered and involuntary-churn revenue held apart from new business.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Recurly → PostHog questions, answered

Set the Recurly account_code to the same user ID you use as the PostHog distinct_id, then send billing events server-side under that ID.

Free · 30 min

Get Recurly and PostHog joined properly

Free30 minutesNo obligation