Skip to main content
Clerk → AppsFlyerIntegration guide

Connecting Clerk to AppsFlyer

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. AppsFlyer exists because mobile app attribution is a different problem from web attribution, and on iOS a large share of it is now aggregated and delayed by design rather than by accident. The join between them succeeds or fails on one thing: whether the AppsFlyer device identifier, appsflyer_id reaches the Clerk user and organisation before the conversion happens, because AppsFlyer can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Clerk user IDs as the AppsFlyer customer user ID

Set the Clerk user ID as AppsFlyer's customer user ID in the SDK once a user signs in. Post the paid conversion to the server-to-server events API only for the user whose install created the organization, with their device identifier, and tag installs from invited colleagues with an invite property so networks aren't credited.

AppsFlyer earns its place when your product has a mobile app and paid campaigns driving installs. Clerk provides the identifier AppsFlyer cannot get on its own: once a user signs in, set the Clerk user ID as AppsFlyer's customer user ID in the SDK, so the device that installed from a campaign is tied to the account that later pays.

Paid conversion is where B2B breaks the mobile model. AppsFlyer's revenue events assume a device bought something; in a Clerk organization the subscription is usually bought by an admin on the web. Post the paid conversion to the server-to-server events API only for the user whose install created the organization, with the device identifier AppsFlyer recorded for them, and send nothing for colleagues who installed later to join, or AppsFlyer forwards one customer's revenue to ad networks once per seat.

If the app is only a companion to a web product, check whether AppsFlyer is telling you anything your web attribution does not. Installs by people invited into an existing Clerk organization are not acquisition and should carry an invite property, so downstream networks are not credited with team growth your product or sales team produced. On iOS without ATT consent, part of these installs will only ever be aggregated, which makes the organization-level join impossible for them.

Clerk → AppsFlyer · what breaks

Why this join usually fails — Clerk → AppsFlyer

  1. 01

    The AppsFlyer device identifier, appsflyer_id 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

    Web conversions sent to a mobile attribution platform

    This is the common error and it produces confident nonsense. A purchase made on your website has no device identifier and no install behind it. AppsFlyer will either discard it or attribute it to nothing, and the revenue disappears somewhere between the two systems without anyone noticing it went.

  4. 04

    Nothing reconciles afterwards

    AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.

Clerk → AppsFlyer · the fix

What working looks like — Clerk → AppsFlyer

  • The AppsFlyer device identifier, appsflyer_id on every account

  • Conversions arriving in AppsFlyer

    The event is attributed to the install source, forwarded to whichever networks are configured, and appears in the cohort reporting.

  • Reconciled against the source

Clerk → AppsFlyer · architecture

How Clerk and AppsFlyer 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

    AppsFlyer needs a click to match

    AppsFlyer needs the device identifier and an event name it recognizes, plus the revenue value for in-app purchases. A server event about a user with no linked device cannot be attributed to an install.

  3. 3

    The identifier is the bridge

    The AppsFlyer device identifier, appsflyer_id, 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

    AppsFlyer deduplicates in-app events by its own event identifier. Sending the same purchase from both the SDK and your server produces two events and double-counts revenue in every dashboard downstream, including the ad networks AppsFlyer forwards to.

Clerk → AppsFlyer · normal or broken

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

Normal, not a fault

  • The AppsFlyer device identifier, appsflyer_id present on the account

  • Sent from your billing system, keyed on the organisation

  • Deduplicated correctly

    AppsFlyer deduplicates in-app events by its own event identifier. Sending the same purchase from both the SDK and your server produces two events and double-counts revenue in every dashboard downstream, including the ad networks AppsFlyer forwards to.

  • Reconciles with the source

Actually broken

  • The AppsFlyer device identifier, appsflyer_id 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

    This is the common error and it produces confident nonsense. A purchase made on your website has no device identifier and no install behind it. AppsFlyer will either discard it or attribute it to nothing, and the revenue disappears somewhere between the two systems without anyone noticing it went.

  • Nobody has reconciled it

Clerk → AppsFlyer · diagnose

Diagnostic order — Clerk → AppsFlyer

  1. 01

    Count accounts carrying the AppsFlyer device identifier, appsflyer_id

  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 what share of your revenue happens in the app at all

    If most purchases are on the web, AppsFlyer is not your conversion destination and the work belongs somewhere else entirely.

  5. 05

    Read the match rate, not the success message

    AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.

Clerk → AppsFlyer · prove

How it gets proven — Clerk → AppsFlyer

Source of truth

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

  • The AppsFlyer device identifier, appsflyer_id confirmed present on a live account.
  • In-app revenue events reconciled per transaction against your billing system, with the organic share stated rather than assumed away.
  • Paid conversions reconciled per organisation against imported conversions, deduplicated across users.

Clerk → AppsFlyer · free audit

What we check in the free audit

  • Count accounts carrying the AppsFlyer device identifier, appsflyer_id
  • Follow one real conversion end to end
  • Compare user signups against paying organisations
  • Check what share of your revenue happens in the app at all
  • 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 → AppsFlyer · when not to buy

When you don't need this — Clerk → AppsFlyer

  • Measure identifier coverage yourself first — pull your last hundred accounts and count how many carry the AppsFlyer device identifier, appsflyer_id.
  • Consumer products where one user is one customer do not have this distinction.
  • If you have no mobile app, this is not a destination for you. If you have one but sell mostly on the web, send web conversions to your ad platforms directly and use AppsFlyer only for install and in-app events.

Clerk → AppsFlyer · what we deliver

What gets built — Clerk → AppsFlyer

  • 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 AppsFlyer

    The AppsFlyer server-to-server events API, posted from your billing system with the device identifier and revenue.

  • 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 → AppsFlyer questions, answered

Yes, right after sign-in. It lets you join a campaign-attributed install to the account and organization that later pays.

Free · 30 min

Get Clerk and AppsFlyer joined properly

Free30 minutesNo obligation