Skip to main content
FreshBooks → PostHogIntegration guide

Connecting FreshBooks to PostHog

FreshBooks is invoicing for people who bill for their time, which puts an unavoidable gap between winning the work and being paid for it. 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 FreshBooks invoice 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

FreshBooks payments onto the PostHog person who enquired

Call identify in PostHog when the inquiry form submits, keyed on the inquirer's email, and save that distinct_id on the FreshBooks client. When FreshBooks records a payment, capture an invoice paid event server-side to that distinct_id with amount received, currency and invoice number, deriving the event UUID from the payment ID. Never use the billing contact's email as the distinct_id.

PostHog earns a place here only if your site has something worth analyzing before the client pays: a pricing calculator, a booking flow, a proposal page, a client portal you built. When the enquiry form submits, call identify so the anonymous distinct_id is merged into a person keyed on the enquirer's email, and save that distinct_id on the FreshBooks client. Without that saved ID, the payment that arrives weeks later has no person to land on.

When FreshBooks records a payment, capture an 'invoice paid' event from your server to that distinct_id, with amount received, currency and invoice number as properties, and derive the event UUID from the FreshBooks payment ID so a retried webhook does not create a second event. A PostHog funnel can then run from first pageview to paid invoice, and revenue can be broken down by the UTM properties PostHog stored on the first visit. Credit notes can be captured as their own event with a negative amount; PostHog will not net them out on its own.

The usual mistake is capturing the payment with the billing contact's email as distinct_id when the browser session was identified with the enquirer's address. That produces two persons and a funnel that never connects. If your site is five pages and a contact form, PostHog adds little that a paid-clients-by-source spreadsheet does not; skip it.

FreshBooks → PostHog · what breaks

Why this join usually fails — FreshBooks → PostHog

  1. 01

    The distinct_id never reaches FreshBooks

    The client relationship starts on your website and the invoice is created weeks later by you, in an app, with no session anywhere near it.

  2. 02

    Invoices sent counted as revenue earned

    For a service business with payment terms this systematically reports revenue a month or more early, and it never corrects for the invoices that are simply never paid.

  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.

FreshBooks → PostHog · the fix

What working looks like — FreshBooks → PostHog

  • The distinct_id on every invoice

  • Conversions arriving in PostHog

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

  • Reconciled against the source

FreshBooks → PostHog · architecture

How FreshBooks and PostHog actually connect

  1. 1

    FreshBooks holds the truth

    An invoice sent is a claim; an invoice paid is revenue. On thirty-day terms those are different months, and reporting the first as a conversion books income you have not received and may not.

  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 FreshBooks invoice.

  4. 4

    The event source decides reliability

    Send invoices at the point of payment, at the amount received after any processing fee.

  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.

FreshBooks → PostHog · normal or broken

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

Normal, not a fault

  • The distinct_id present on the invoice

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

    The client relationship starts on your website and the invoice is created weeks later by you, in an app, with no session anywhere near it.

  • Sent from the browser

    For a service business with payment terms this systematically reports revenue a month or more early, and it never corrects for the invoices that are simply never paid.

  • 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

FreshBooks → PostHog · diagnose

Diagnostic order — FreshBooks → PostHog

  1. 01

    Count invoices carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Measure your average days-to-payment and your write-off rate

    Two numbers. Together they tell you how far your reported revenue sits from your bank balance.

  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.

FreshBooks → PostHog · prove

How it gets proven — FreshBooks → PostHog

Source of truth

FreshBooks invoices by payment date, not by issue date.

  • The distinct_id confirmed present on a live invoice.
  • Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
  • Payments received reconciled against imported conversions over a window longer than your payment terms.

FreshBooks → PostHog · free audit

What we check in the free audit

  • Count invoices carrying the distinct_id
  • Follow one real conversion end to end
  • Measure your average days-to-payment and your write-off rate
  • Check ingestion health and disk before debugging any missing event
  • Read the match rate, not the success message

Checked against

FreshBooks invoices by payment date, not by issue date.

Get my free conversion tracking audit

Free30 minutesNo obligation

FreshBooks → PostHog · when not to buy

When you don't need this — FreshBooks → PostHog

  • Measure identifier coverage yourself first — pull your last hundred invoices and count how many carry the distinct_id.
  • If you take payment upfront, issue and payment coincide and this whole distinction disappears.
  • 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.

FreshBooks → PostHog · what we deliver

What gets built — FreshBooks → PostHog

  • Identifier capture into FreshBooks

    Store the identifier on the client record at first enquiry and carry it onto every invoice raised against that client.

  • Event source: the FreshBooks payment record

    Send invoices at the point of payment, at the amount received after any processing fee.

  • 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

    Credit notes and refunds reverse. Written-off invoices should reverse too, and usually never do.

Written guarantee

95%+ tracking accuracy

Measured against FreshBooks invoices by payment date, not by issue date.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

FreshBooks → PostHog questions, answered

Identify the visitor at enquiry, store the distinct_id on the FreshBooks client, and capture an event for each FreshBooks payment against that distinct_id. Revenue then sits on the same person as the first-visit UTMs.

Free · 30 min

Get FreshBooks and PostHog joined properly

Free30 minutesNo obligation