Skip to main content
Firebase Auth → AppsFlyerIntegration guide

Connecting Firebase Authentication to AppsFlyer

Firebase Auth is usually the identity layer in a mobile-first product, which means the user ID it issues is the only thing connecting a web visit to an in-app purchase. 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 Firebase 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

Firebase UID as AppsFlyer customer user ID for server-side events

Set the Firebase UID as AppsFlyer's customer user ID in the SDK as soon as auth completes, and store the appsflyer_id on the Firebase user document, updating it on reinstall, so your server can post renewals and web purchases. Pick one source per event, SDK or billing. Link anonymous accounts at sign-up so the paying UID keeps its install.

AppsFlyer attributes the install to a device; Firebase Auth names the person on that device. Set the Firebase UID as the AppsFlyer customer user ID in the SDK as soon as auth completes, and store the appsflyer_id on the Firebase user document so your server can post purchase events later without the app running.

Renewals and web purchases are where this pays off. A subscription renewal happens server-side with no app open, and the server-to-server event needs the appsflyer_id you stored. A reinstall produces a new one, so update the stored value on each fresh install rather than keeping the first. Choose one source per event: if the SDK logs the first purchase, do not also post it from billing.

Anonymous auth at first launch helps, because the SDK can attach the anonymous UID immediately. But if sign-up creates a new UID instead of linking, AppsFlyer holds a customer user ID that never pays while the paying UID has no install behind it. Check a sample of paying users for an AppsFlyer record carrying their current UID.

Firebase Auth → AppsFlyer · what breaks

Why this join usually fails — Firebase Auth → AppsFlyer

  1. 01

    The AppsFlyer device identifier, appsflyer_id never reaches Firebase Auth

    Anonymous authentication creates users before signup, and linking an anonymous account to a real one is a step teams frequently skip.

  2. 02

    Anonymous accounts never linked to real ones

    Firebase's anonymous auth is convenient and creates a separate user. If it is not linked at signup, the pre-signup activity and the paying customer are two different people in every downstream system.

  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.

Firebase Auth → AppsFlyer · the fix

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

    Firebase Authentication's own records are the reference, not either dashboard.

Firebase Auth → AppsFlyer · architecture

How Firebase Auth and AppsFlyer actually connect

  1. 1

    Firebase Authentication holds the truth

    Firebase holds identity, not revenue. Its value to measurement is that it gives a stable key that survives the web-to-app transition where every cookie dies.

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

  4. 4

    The event source decides reliability

    Send paid conversions keyed on the user identity. Signups and anonymous sessions are stages, 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.

Firebase Auth → AppsFlyer · normal or broken

Working vs. broken, side by side — Firebase Auth → AppsFlyer

Normal, not a fault

  • The AppsFlyer device identifier, appsflyer_id present on the account

    Visible on the record itself in Firebase Authentication, not merely captured somewhere on the site.

  • Sent from your billing system, keyed on the 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

    AppsFlyer's count and Firebase Authentication's records agree within a few percent over a closed window.

Actually broken

  • The AppsFlyer device identifier, appsflyer_id missing on most records

    Anonymous authentication creates users before signup, and linking an anonymous account to a real one is a step teams frequently skip.

  • Sent from the browser

    Firebase's anonymous auth is convenient and creates a separate user. If it is not linked at signup, the pre-signup activity and the paying customer are two different people in every downstream system.

  • 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

    The dashboard shows a number and no one has compared it to Firebase Authentication.

Firebase Auth → AppsFlyer · diagnose

Diagnostic order — Firebase Auth → 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 anonymous accounts are linked or orphaned at signup

    Orphaned anonymous users are the most common Firebase identity failure and they silently break every cross-signup funnel.

  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.

Firebase Auth → AppsFlyer · prove

How it gets proven — Firebase Auth → AppsFlyer

Against Firebase Authentication's own records, not against either platform's dashboard.

Source of truth

Your billing system, keyed on the Firebase 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 linked user identity against imported conversions.

Firebase Auth → 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 anonymous accounts are linked or orphaned at signup
  • 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, keyed on the Firebase user ID.

Get my free conversion tracking audit

Free30 minutesNo obligation

Firebase Auth → AppsFlyer · when not to buy

When you don't need this — Firebase Auth → AppsFlyer

  • If AppsFlyer already reports conversions that reconcile against Firebase Authentication's records within a few percent, this join is working and there is nothing to buy.
  • Measure identifier coverage yourself first — pull your last hundred accounts and count how many carry the AppsFlyer device identifier, appsflyer_id.
  • If you do not use anonymous auth, the linking problem does not arise.
  • 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.

Firebase Auth → AppsFlyer · what we deliver

What gets built — Firebase Auth → AppsFlyer

  • Identifier capture into Firebase Auth

    Capture the identifier on the web, write it to custom claims or your own user document at first auth, and link anonymous accounts rather than creating duplicates.

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

    Send paid conversions keyed on the user identity. Signups and anonymous sessions are stages, 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, keyed on the Firebase user ID.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Firebase Auth → AppsFlyer questions, answered

Usually yes; it is stable across sessions and matches your billing system. Set it as soon as Firebase auth completes.

Free · 30 min

Get Firebase Auth and AppsFlyer joined properly

Free30 minutesNo obligation