Skip to main content
ShipStation → PostHogIntegration guide

Connecting ShipStation to PostHog

ShipStation is where the shipping cost of an order finally becomes known, which is the number that decides whether the conversion your ad platform reported was actually profitable. 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 ShipStation shipment 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

ShipStation to PostHog: judge shipping experiments on real cost

Use ShipStation with PostHog to judge shipping experiments on margin. Record the feature flag variant and distinct_id on the order at checkout; when ShipStation reports the shipment, post an order shipped event to the capture API with the variant, shipment cost and service, using order plus shipment number as the event UUID. Compare revenue minus shipping per visitor.

PostHog runs experiments, and the one most ShipStation merchants should run is on shipping: free-shipping threshold, flat rate against calculated rates, or a faster default service. PostHog measures the conversion side through a feature flag on checkout. ShipStation holds the other side, what those orders actually cost to send. Read on conversion rate alone, the experiment will pick free shipping almost every time.

Record the flag variant on the order at checkout, alongside the distinct_id. When ShipStation reports the shipment, post an order shipped event to the PostHog capture API with the same distinct_id, the variant, shipment cost and carrier service, using order number plus shipment number as the event UUID so a retried webhook does not double it. Then compare variants on revenue minus shipping per visitor, not just conversion rate.

Two traps. Marketplace orders in your ShipStation account have no distinct_id and must be filtered out, or they pile onto one anonymous person. And shipping cost lands days after the conversion, so analyze the experiment only once most variant orders have shipped. If you never change shipping policy, this pair adds little beyond a margin column.

ShipStation → PostHog · what breaks

Why this join usually fails — ShipStation → PostHog

  1. 01

    The distinct_id never reaches ShipStation

    The shipment is created after the order, in a different system, with no session behind it.

  2. 02

    Free shipping absorbing the whole margin

    An order that reported forty pounds of revenue and cost twelve to ship to a remote postcode is a different outcome from the same order shipped locally. Optimizing on revenue steers spend toward whichever geography is most expensive to serve.

  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.

ShipStation → PostHog · the fix

What working looks like — ShipStation → PostHog

  • The distinct_id on every shipment

  • Conversions arriving in PostHog

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

  • Reconciled against the source

ShipStation → PostHog · architecture

How ShipStation and PostHog actually connect

  1. 1

    ShipStation holds the truth

    Shipping is frequently the difference between margin and none, and it varies by weight, destination and carrier in ways the order value does not predict.

  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 ShipStation shipment.

  4. 4

    The event source decides reliability

    Send orders at contribution margin where you can compute it — order value minus cost of goods and actual shipping.

  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.

ShipStation → PostHog · normal or broken

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

Normal, not a fault

  • The distinct_id present on the shipment

  • Sent from your order system, enriched with shipping cost

  • 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 shipment is created after the order, in a different system, with no session behind it.

  • Sent from the browser

    An order that reported forty pounds of revenue and cost twelve to ship to a remote postcode is a different outcome from the same order shipped locally. Optimizing on revenue steers spend toward whichever geography is most expensive to serve.

  • 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

ShipStation → PostHog · diagnose

Diagnostic order — ShipStation → PostHog

  1. 01

    Count shipments carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Compare average shipping cost by campaign and by region

    The spread is usually larger than expected and it can reverse which campaigns look profitable.

  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.

ShipStation → PostHog · prove

How it gets proven — ShipStation → PostHog

Source of truth

Orders joined to their actual shipping cost and delivery outcome.

  • The distinct_id confirmed present on a live shipment.
  • Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
  • Orders reconciled at contribution margin against imported conversions for a settled month.

ShipStation → PostHog · free audit

What we check in the free audit

  • Count shipments carrying the distinct_id
  • Follow one real conversion end to end
  • Compare average shipping cost by campaign and by region
  • Check ingestion health and disk before debugging any missing event
  • Read the match rate, not the success message

Checked against

Orders joined to their actual shipping cost and delivery outcome.

Get my free conversion tracking audit

Free30 minutesNo obligation

ShipStation → PostHog · when not to buy

When you don't need this — ShipStation → PostHog

  • Measure identifier coverage yourself first — pull your last hundred shipments and count how many carry the distinct_id.
  • If you sell digital goods or charge shipping at cost, this refinement does not apply.
  • 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.

ShipStation → PostHog · what we deliver

What gets built — ShipStation → PostHog

  • Identifier capture into ShipStation

    Join on the order identifier. There is no identifier to capture here — the work is carrying the order's one through.

  • Event source: your order system, enriched with shipping cost

    Send orders at contribution margin where you can compute it — order value minus cost of goods and actual shipping.

  • 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

    Returns reverse, and should carry the return shipping cost too.

Written guarantee

95%+ tracking accuracy

Measured against Orders joined to their actual shipping cost and delivery outcome.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

ShipStation → PostHog questions, answered

Use a feature flag on checkout, store the variant on the order, and send ShipStation shipment cost to PostHog so you compare margin, not just conversion.

Free · 30 min

Get ShipStation and PostHog joined properly

Free30 minutesNo obligation