Skip to main content
Auth0 → AppsFlyerIntegration guide

Connecting Auth0 to AppsFlyer

Auth0 issues the user identity that everything downstream joins on, which makes it the system that decides whether an anonymous visitor and a paying customer can ever be connected. 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 Auth0 user identity 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

Auth0 in the app, AppsFlyer on the device: set the customer user ID

Set AppsFlyer's customer user ID to the Auth0 user_id right after in-app login, before sending the signup event. For server-to-server billing events, store the appsflyer_id against the user when the app first sees a login, with a written rule for users with two devices. Do not post web-only Auth0 signups and payments to AppsFlyer.

The join between Auth0 and AppsFlyer is AppsFlyer's customer user ID. After the Auth0 SDK completes login in your app, set it to the Auth0 user_id so every later in-app event carries both the appsflyer_id and your own user key. Set it before sending the login or signup event, not after, or the first and most important event goes out without it.

Server-to-server events are where this pair breaks. Your billing system knows the Auth0 user ID; AppsFlyer's S2S API wants the appsflyer_id of a device. Store the appsflyer_id against the user, in app metadata or your own users table, when the app first sees a login, and look it up when billing fires a renewal. A user with two phones has two appsflyer_ids under one Auth0 account, so pick a rule (most recent device, or the install that created the account) and write it down.

People who sign up on your website through Auth0's web login, pay on the web, and only later install the app have no install to attribute those payments to. Do not post them to AppsFlyer. Send web purchases to your ad platforms directly, and let AppsFlyer measure installs and what happens inside the app after them.

Auth0 → AppsFlyer · what breaks

Why this join usually fails — Auth0 → AppsFlyer

  1. 01

    The AppsFlyer device identifier, appsflyer_id never reaches Auth0

    Login flows redirect to a hosted Auth0 domain and back, which breaks the session and can lose an identifier captured before login.

  2. 02

    The login redirect losing the acquisition source

    The visitor arrives from an ad, clicks sign in, goes to Auth0's domain and comes back as a fresh session. Without deliberate persistence the campaign that produced them is gone at exactly the moment they became identifiable.

  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.

Auth0 → AppsFlyer · the fix

What working looks like — Auth0 → 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

Auth0 → AppsFlyer · architecture

How Auth0 and AppsFlyer actually connect

  1. 1

    Auth0 holds the truth

    Auth0 holds identity, not money. Its value to measurement is that it provides the stable key which lets a pre-signup session and a later subscription be recognised as one person.

  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 Auth0 user identity.

  4. 4

    The event source decides reliability

    Send paid conversions keyed on the user identity. Signups are a stage, not revenue.

  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.

Auth0 → AppsFlyer · normal or broken

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

Normal, not a fault

  • The AppsFlyer device identifier, appsflyer_id present on the account

  • Sent from your billing system, keyed on the Auth0 user ID

  • 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

    Login flows redirect to a hosted Auth0 domain and back, which breaks the session and can lose an identifier captured before login.

  • Sent from the browser

    The visitor arrives from an ad, clicks sign in, goes to Auth0's domain and comes back as a fresh session. Without deliberate persistence the campaign that produced them is gone at exactly the moment they became identifiable.

  • 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

Auth0 → AppsFlyer · diagnose

Diagnostic order — Auth0 → AppsFlyer

  1. 01

    Count accounts carrying the AppsFlyer device identifier, appsflyer_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Check whether the identifier survives the login round trip

    Test it on a live login. This is the single most common identity break in products that use hosted authentication.

  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.

Auth0 → AppsFlyer · prove

How it gets proven — Auth0 → AppsFlyer

Source of truth

Your billing system, joined to the Auth0 user ID.

  • 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 user identity against imported conversions, with identifier survival verified across login.

Auth0 → 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
  • Check whether the identifier survives the login round trip
  • 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 Auth0 user ID.

Get my free conversion tracking audit

Free30 minutesNo obligation

Auth0 → AppsFlyer · when not to buy

When you don't need this — Auth0 → AppsFlyer

  • Measure identifier coverage yourself first — pull your last hundred accounts and count how many carry the AppsFlyer device identifier, appsflyer_id.
  • If your product has no authentication, there is no identity to join and session-level attribution is all there is.
  • 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.

Auth0 → AppsFlyer · what we deliver

What gets built — Auth0 → AppsFlyer

  • Identifier capture into Auth0

    Persist the identifier before the redirect and write it onto the user's app metadata at first login, so it survives every subsequent session.

  • Event source: your billing system, keyed on the Auth0 user ID

    Send paid conversions keyed on the user identity. Signups are a stage, not revenue.

  • 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 same identity.

Written guarantee

95%+ tracking accuracy

Measured against Your billing system, joined to the Auth0 user ID.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Auth0 → AppsFlyer questions, answered

The Auth0 user_id. It stays constant when the user changes their email, and it keeps raw email addresses out of your attribution exports.

Free · 30 min

Get Auth0 and AppsFlyer joined properly

Free30 minutesNo obligation