Skip to main content
Clerk → AmplitudeIntegration guide

Connecting Clerk to Amplitude

Clerk handles both authentication and organisation membership, which matters for B2B products where the paying entity is a company and the signing-up entity is a person. Amplitude is built around behavioural cohorts, which makes the identity resolution and the event taxonomy load-bearing in a way they never are for an ad pixel. The join between them succeeds or fails on one thing: whether the user ID and device ID pair reaches the Clerk user and organisation before the conversion happens, because Amplitude can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Clerk to Amplitude: user IDs, org groups and paid revenue

Set Amplitude's user_id to the Clerk user ID in both the browser SDK and server events, and attach events to a group keyed on the Clerk organization ID, updating it when users switch workspaces. Send a server-side revenue event per organization from billing, and store original UTMs and click IDs on the creating user.

Amplitude is where a Clerk-based product's activation and retention get measured, so the join that matters is identity rather than ad attribution. Set Amplitude's user_id to the Clerk user ID (the user_ string) as soon as Clerk confirms the session, in the browser SDK and in every server-side event. If the server sends email while the browser sends the Clerk ID, Amplitude merges nothing and creates a second person with half the history.

The organization is the paying customer, and Amplitude models that with groups. Attach each event to a group keyed on the Clerk organization ID, so retention and revenue can be read per company instead of per seat. Check that your Amplitude plan includes account-level reporting before designing dashboards around it. When a user flips workspaces in Clerk's organization switcher, the group on subsequent events has to change too, or one customer's activity lands on another.

Paid conversion comes from billing, not from Clerk: send a server-side revenue event per organization with price and quantity filled in, attributed to the user who created the org, and send cancellations as their own event against the same group. Store the original UTMs and ad click IDs as user properties on that creating user at sign-up, so cohorts by acquisition source are possible later, and pass consent state so users who declined are not profiled.

Clerk → Amplitude · what breaks

Why this join usually fails — Clerk → Amplitude

  1. 01

    The user ID and device ID pair never reaches Clerk

    Several people from one company sign up separately, each carrying a different acquisition source.

  2. 02

    Counting seats instead of customers

    Five colleagues signing up from one company is one paying customer and five conversions if attribution sits on the user. Cost per acquisition then reads as a fifth of reality.

  3. 03

    Revenue events that carry no revenue

    Amplitude will happily accept a purchase event with no price field. The event count looks correct, the funnel looks correct, and the revenue reporting stays at zero — which people usually discover a quarter later when someone asks what a cohort is worth.

  4. 04

    Nothing reconciles afterwards

    Amplitude shows the event in the user's activity stream with its properties expanded. Read the properties, because an event that arrives without its revenue fields still looks like a success.

Clerk → Amplitude · the fix

What working looks like — Clerk → Amplitude

  • The user ID and device ID pair on every account

  • Conversions arriving in Amplitude

    The event lands on the user, joins their behavioural history, and becomes available for cohorts, funnels and retention.

  • Reconciled against the source

Clerk → Amplitude · architecture

How Clerk and Amplitude actually connect

  1. 1

    Clerk holds the truth

    In B2B SaaS the subscription belongs to an organisation and several users belong to it. Attributing revenue per user counts one customer several times.

  2. 2

    Amplitude needs a click to match

    Amplitude needs a device or user identifier, an event type and its properties. Revenue events need the price and quantity fields specifically, or the revenue reporting stays empty while events flow normally.

  3. 3

    The identifier is the bridge

    The user ID and device ID pair, captured at the visit and carried into the Clerk user and organisation.

  4. 4

    The event source decides reliability

    Send paid conversions per organisation, deduplicated across its users.

  5. 5

    Deduplication at the destination

    Amplitude deduplicates on insert_id. Omit it and a retried batch is counted twice, which shows up as a phantom spike that someone will eventually build a hypothesis on.

Clerk → Amplitude · normal or broken

Working vs. broken, side by side — Clerk → Amplitude

Normal, not a fault

  • The user ID and device ID pair present on the account

  • Sent from your billing system, keyed on the organisation

  • Deduplicated correctly

    Amplitude deduplicates on insert_id. Omit it and a retried batch is counted twice, which shows up as a phantom spike that someone will eventually build a hypothesis on.

  • Reconciles with the source

Actually broken

  • The user ID and device ID pair missing on most records

    Several people from one company sign up separately, each carrying a different acquisition source.

  • Sent from the browser

    Five colleagues signing up from one company is one paying customer and five conversions if attribution sits on the user. Cost per acquisition then reads as a fifth of reality.

  • Counted twice, or not at all

    Amplitude will happily accept a purchase event with no price field. The event count looks correct, the funnel looks correct, and the revenue reporting stays at zero — which people usually discover a quarter later when someone asks what a cohort is worth.

  • Nobody has reconciled it

Clerk → Amplitude · diagnose

Diagnostic order — Clerk → Amplitude

  1. 01

    Count accounts carrying the user ID and device ID pair

  2. 02

    Follow one real conversion end to end

  3. 03

    Compare user signups against paying organisations

    The ratio is the size of the overcount, and in B2B products it is rarely close to one.

  4. 04

    Check a purchase event for the price and quantity fields specifically

    Not whether the event arrived — whether the revenue fields are populated, in the exact names Amplitude expects.

  5. 05

    Read the match rate, not the success message

    Amplitude shows the event in the user's activity stream with its properties expanded. Read the properties, because an event that arrives without its revenue fields still looks like a success.

Clerk → Amplitude · prove

How it gets proven — Clerk → Amplitude

Source of truth

Your billing system, joined to the Clerk organisation rather than the user.

  • The user ID and device ID pair confirmed present on a live account.
  • Revenue reconciled per transaction against your billing system, with identity merge behaviour verified across signup.
  • Paid conversions reconciled per organisation against imported conversions, deduplicated across users.

Clerk → Amplitude · free audit

What we check in the free audit

  • Count accounts carrying the user ID and device ID pair
  • Follow one real conversion end to end
  • Compare user signups against paying organisations
  • Check a purchase event for the price and quantity fields specifically
  • Read the match rate, not the success message

Checked against

Your billing system, joined to the Clerk organisation rather than the user.

Get my free conversion tracking audit

Free30 minutesNo obligation

Clerk → Amplitude · when not to buy

When you don't need this — Clerk → Amplitude

  • Measure identifier coverage yourself first — pull your last hundred accounts and count how many carry the user ID and device ID pair.
  • Consumer products where one user is one customer do not have this distinction.
  • If nobody is building cohorts or retention analysis, this is a large amount of instrumentation for reporting a dashboard already gives you.

Clerk → Amplitude · what we deliver

What gets built — Clerk → Amplitude

  • Identifier capture into Clerk

    Store the identifier on the user and attribute at the organisation, using the first user's source with the others recorded as supporting.

  • Event source: your billing system, keyed on the organisation

    Send paid conversions per organisation, deduplicated across its users.

  • Dispatch to Amplitude

    The Amplitude HTTP V2 API, posted server-side with the identity, event type and properties.

  • Reversals where they exist

    Cancellations reverse against the organisation.

Written guarantee

95%+ tracking accuracy

Measured against Your billing system, joined to the Clerk organisation rather than the user.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Clerk → Amplitude questions, answered

The Clerk user ID. Emails change and get reused across workspaces; the Clerk ID does not, and it has to be identical in the browser SDK and server events.

Free · 30 min

Get Clerk and Amplitude joined properly

Free30 minutesNo obligation