Skip to main content
Teachable → PostHogIntegration guide

Connecting Teachable to PostHog

Teachable hosts courses and their checkout, so the sale happens inside the platform and the creator's own site is usually just a front door. 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 Teachable transaction 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

Teachable to PostHog: one distinct_id from sales page to lesson

Set a PostHog distinct_id on your site, pass it on the Teachable checkout URL, and alias it to the Teachable user ID or email when the transaction webhook arrives. Send the enrollment with the transaction ID as event UUID, plus plan type and full plan value. Add lesson progress if your plan exposes it, and record refunds separately.

PostHog is useful here for something Teachable's reports cannot show: the path from your marketing site through checkout and into course consumption as one funnel. That needs one distinct_id across two domains. Set it on your site, pass it on the Teachable checkout URL, and when the transaction webhook arrives, alias it to the Teachable user ID or email so the anonymous visitor and the student become one person.

Send the enrolment from the webhook with the transaction ID as the event UUID, so a retried webhook does not create a second purchase. Add plan type and full plan value as properties; a payment plan's first charge is not the enrolment's value. Lesson progress is the part ad platforms never use and PostHog can: pulled from Teachable's webhooks or API (check which completion events your plan exposes), it shows which campaigns produce students who actually finish.

The common break is a PostHog snippet that runs on your site but not on the school, so the funnel ends at the checkout click. Check whether your plan permits code snippets on Teachable pages; if not, the server events are the only bridge. Record refunds as their own event and exclude refunded students from activation funnels.

Teachable → PostHog · what breaks

Why this join usually fails — Teachable → PostHog

  1. 01

    The distinct_id never reaches Teachable

    Checkout is hosted on Teachable, so an identifier captured on your own marketing site does not automatically reach the enrolment. It has to be carried through the checkout URL and read back from the transaction.

  2. 02

    A hosted checkout on another domain

    Your marketing site and the checkout are separate origins, so nothing carries across on its own and the enrolment arrives with no trace of the campaign.

  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.

Teachable → PostHog · the fix

What working looks like — Teachable → PostHog

  • The distinct_id on every enrolment

  • Conversions arriving in PostHog

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

  • Reconciled against the source

Teachable → PostHog · architecture

How Teachable and PostHog actually connect

  1. 1

    Teachable holds the truth

    Teachable distinguishes one-time purchases, payment plans and subscriptions. As with any course platform, valuing a payment plan at its first instalment is the standard mistake.

  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 Teachable transaction.

  4. 4

    The event source decides reliability

    Send from the webhook on completed transactions, distinguishing plan types so each carries an appropriate value.

  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.

Teachable → PostHog · normal or broken

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

Normal, not a fault

  • The distinct_id present on the enrolment

  • Sent from the Teachable transaction 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 is hosted on Teachable, so an identifier captured on your own marketing site does not automatically reach the enrolment. It has to be carried through the checkout URL and read back from the transaction.

  • Sent from the browser

    Your marketing site and the checkout are separate origins, so nothing carries across on its own and the enrolment arrives with no trace of the campaign.

  • 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

Teachable → PostHog · diagnose

Diagnostic order — Teachable → PostHog

  1. 01

    Count enrolments carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Open a recent transaction and look for the identifier

    Absent means the checkout URL is not carrying it, which is the usual cause.

  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.

Teachable → PostHog · prove

How it gets proven — Teachable → PostHog

Source of truth

Teachable's transaction records for the same window, net of refunds.

  • The distinct_id confirmed present on a live enrolment.
  • Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
  • An enrolment confirmed to carry both the identifier and the correct plan value.

Teachable → PostHog · free audit

What we check in the free audit

  • Count enrolments carrying the distinct_id
  • Follow one real conversion end to end
  • Open a recent transaction and look for the identifier
  • Check ingestion health and disk before debugging any missing event
  • Read the match rate, not the success message

Checked against

Teachable's transaction records for the same window, net of refunds.

Get my free conversion tracking audit

Free30 minutesNo obligation

Teachable → PostHog · when not to buy

When you don't need this — Teachable → PostHog

  • Measure identifier coverage yourself first — pull your last hundred enrolments and count how many carry the distinct_id.
  • For a single course at modest volume, Teachable's own reporting is adequate.
  • 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.

Teachable → PostHog · what we deliver

What gets built — Teachable → PostHog

  • Identifier capture into Teachable

    Append the identifier to the course checkout URL and verify it is retrievable from the resulting transaction before building anything downstream.

  • Event source: the Teachable transaction webhook

    Send from the webhook on completed transactions, distinguishing plan types so each carries an appropriate value.

  • 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

    Refunds are recorded, and course refund windows generate a real volume of them.

Written guarantee

95%+ tracking accuracy

Measured against Teachable's transaction records for the same window, net of refunds.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Teachable → PostHog questions, answered

Yes, by sending transaction and enrollment events from Teachable's webhooks to the PostHog capture API with a consistent distinct_id. Browser tracking on the school itself depends on whether your plan allows custom code.

Free · 30 min

Get Teachable and PostHog joined properly

Free30 minutesNo obligation