Connecting Firebase Authentication to Amplitude
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. 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 Firebase user identity 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
Firebase Auth to Amplitude: link anonymous users, keep one uid
Set Amplitude's user ID to the Firebase uid as soon as onAuthStateChanged reports a signed-in user, on web and in the app, so device history merges into one person. Upgrade anonymous users with linkWithCredential to keep the uid. Send paid events from billing keyed on the uid, with price, quantity and insert_id from the invoice ID.
Amplitude's user ID should be the Firebase uid, set as soon as onAuthStateChanged reports a signed-in user, on the web and in the app. Because Amplitude merges the device ID into that user ID, the pre-login web visit and the later in-app sessions end up on one person, which is the main reason to pair these two at all.
Anonymous auth decides whether that works. Upgrading an anonymous user with linkWithCredential keeps the same uid, so if you set it as Amplitude's user ID early, the history survives signup. Signing the user in with a fresh credential instead of linking hands back a different uid, and Amplitude now holds two users with half the history each, which shows up as day-one retention that looks worse than it is.
Revenue does not come from Firebase. Send paid events from your billing system keyed on the uid, with price and quantity populated and insert_id set to the invoice or transaction ID, and keep signup and trial start as ordinary events. If you also attach ad click IDs captured before sign-in as user properties, Amplitude can split cohorts by acquisition source without pretending to be an attribution tool.
Firebase Auth → Amplitude · what breaks
Why this join usually fails — Firebase Auth → Amplitude
- 01
The user ID and device ID pair 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.
- 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.
- 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.
- 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.
Firebase Auth → Amplitude · the fix
What working looks like — Firebase Auth → 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
Firebase Authentication's own records are the reference, not either dashboard.
Firebase Auth → Amplitude · architecture
How Firebase Auth and Amplitude actually connect
- 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
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
The identifier is the bridge
The user ID and device ID pair, captured at the visit and carried into the Firebase user identity.
- 4
The event source decides reliability
Send paid conversions keyed on the user identity. Signups and anonymous sessions are stages, not revenue.
- 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.
Firebase Auth → Amplitude · normal or broken
Working vs. broken, side by side — Firebase Auth → Amplitude
Normal, not a fault
The user ID and device ID pair 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
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
Amplitude's count and Firebase Authentication's records agree within a few percent over a closed window.
Actually broken
The user ID and device ID pair 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
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
The dashboard shows a number and no one has compared it to Firebase Authentication.
Firebase Auth → Amplitude · diagnose
Diagnostic order — Firebase Auth → Amplitude
- 01
Count accounts carrying the user ID and device ID pair
- 02
Follow one real conversion end to end
- 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.
- 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.
- 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.
Firebase Auth → Amplitude · prove
How it gets proven — Firebase Auth → Amplitude
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 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 linked user identity against imported conversions.
Firebase Auth → 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
- Check whether anonymous accounts are linked or orphaned at signup
- Check a purchase event for the price and quantity fields specifically
- Read the match rate, not the success message
Checked against
Your billing system, keyed on the Firebase user ID.
Free30 minutesNo obligation
Firebase Auth → Amplitude · when not to buy
When you don't need this — Firebase Auth → Amplitude
- If Amplitude 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 user ID and device ID pair.
- If you do not use anonymous auth, the linking problem does not arise.
- If nobody is building cohorts or retention analysis, this is a large amount of instrumentation for reporting a dashboard already gives you.
Firebase Auth → Amplitude · what we deliver
What gets built — Firebase Auth → Amplitude
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 Amplitude
The Amplitude HTTP V2 API, posted server-side with the identity, event type and properties.
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.
From $400 · See packages
FAQ
Firebase Auth → Amplitude questions, answered
Yes, set it as soon as Firebase reports a signed-in user. If you use anonymous auth, upgrade anonymous users with account linking so the uid does not change.
Usually the anonymous account was replaced by a new one instead of being linked, so the uid changed. Linking keeps the uid and lets Amplitude keep one history.
Almost always because the user ID and device ID pair never reached the Firebase user identity. Anonymous authentication creates users before signup, and linking an anonymous account to a real one is a step teams frequently skip. Measure coverage before debugging the dispatch.
Amplitude tracks both a device ID and a user ID and merges them when a user identifies. The merge rules decide who counts as one person, so a mistake here does not produce a small error — it changes every retention curve and cohort size in the account.
Your billing system, keyed on the user ID. Send paid conversions keyed on the user identity. Signups and anonymous sessions are stages, not revenue.
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.
More on Firebase Auth → Amplitude
- Firebase Auth → Google AdsConnecting Firebase Authentication to Google Ads
- Firebase Auth → MetaConnecting Firebase Authentication to Meta Conversions API
- Firebase Auth → GA4Connecting Firebase Authentication to GA4
RELATED GUIDES
Where Firebase Auth → Amplitude fits in the rest of your tracking
- Supabase Auth → AmplitudeConnecting Supabase Auth to Amplitude
- Okta → AmplitudeConnecting Okta to Amplitude
- Clerk → AmplitudeConnecting Clerk to Amplitude
- Firebase Auth → MatomoConnecting Firebase Authentication to Matomo
- Firebase Auth → PostHogConnecting Firebase Authentication to PostHog
- SaaSConversion tracking for SaaS, from signup through to the payment that matters
- Auth0 → AmplitudeConnecting Auth0 to Amplitude
Free · 30 min
Get Firebase Auth and Amplitude joined properly
Free30 minutesNo obligation
