Connecting Firebase Authentication to BigQuery
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. BigQuery has no attribution model, no deduplication rules and no opinion about your data — which makes it the only destination on this site where every number is exactly as good as the query that produced it. The join between them succeeds or fails on one thing: whether whatever join key you decide on reaches the Firebase user identity before the conversion happens, because BigQuery can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Firebase Auth users in BigQuery: the uid as the join key
Firebase Auth has no BigQuery export, so load a users table yourself via an Auth trigger or scheduled Admin SDK job, with uid, creation time, providers and anonymous status. Call setUserId with the uid so Analytics exports join, and add click-ID and billing tables keyed on uid. Record a row when anonymous accounts are linked.
Firebase can link Analytics, Crashlytics and several other products to BigQuery, but Firebase Auth has no export of its own. If you want a users table, you load it yourself: an Auth trigger on account creation, or a scheduled job using the Admin SDK's user listing, writing uid, creation time, sign-in providers and whether the account started anonymous.
The uid is the join key for everything else. The Analytics export only carries it if the app calls setUserId with the uid; without that, app events sit on a pseudonymous ID you cannot tie to billing. Add a table of ad click IDs (gclid, fbc, ttclid) captured on the web before sign-in and written to the user document at first auth, plus a billing table keyed on the same uid, and you have the whole chain from click to paid account in queries you control.
Write a row when an anonymous account is linked, not only when it is created. Otherwise the anonymous-to-real transition is invisible and your funnel counts one person as both a drop-off and a new signup. Keep email addresses and phone numbers out of the tables analysts query unless they need them; the uid joins everything without them.
Firebase Auth → BigQuery · what breaks
Why this join usually fails — Firebase Auth → BigQuery
- 01
Whatever join key you decide on 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
The warehouse quietly disagreeing with every platform
This is not a bug — it is the point. Your warehouse counts orders; Google counts click-attributed conversions in its window; Meta counts differently again. When the four numbers differ, the warehouse is usually right about revenue and wrong about attribution, and knowing which question you are answering is the whole skill.
- 04
Nothing reconciles afterwards
BigQuery will not tell you anything is wrong. Verify by querying the table directly against your source system's own totals, and check for duplicate rows on the join key before trusting any aggregate.
Firebase Auth → BigQuery · the fix
What working looks like — Firebase Auth → BigQuery
Whatever join key you decide on on every account
Conversions arriving in BigQuery
The row lands in a table you own, joinable to every other table you own, with no window and no expiry.
Reconciled against the source
Firebase Authentication's own records are the reference, not either dashboard.
Firebase Auth → BigQuery · architecture
How Firebase Auth and BigQuery 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
BigQuery needs a click to match
BigQuery needs a schema and consistent types. The failure mode is not rejection, it is silent divergence: a column that arrives as a string in one load and an integer in the next, or a timestamp in the wrong zone, which produces answers that look plausible and are not.
- 3
The identifier is the bridge
Whatever join key you decide on, 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
Nothing deduplicates for you. Streaming inserts are at-least-once, so a retried load can create duplicate rows, and the only protection is a deduplication step you write and actually run.
Firebase Auth → BigQuery · normal or broken
Working vs. broken, side by side — Firebase Auth → BigQuery
Normal, not a fault
Whatever join key you decide on 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
Nothing deduplicates for you. Streaming inserts are at-least-once, so a retried load can create duplicate rows, and the only protection is a deduplication step you write and actually run.
Reconciles with the source
BigQuery's count and Firebase Authentication's records agree within a few percent over a closed window.
Actually broken
Whatever join key you decide on 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 not a bug — it is the point. Your warehouse counts orders; Google counts click-attributed conversions in its window; Meta counts differently again. When the four numbers differ, the warehouse is usually right about revenue and wrong about attribution, and knowing which question you are answering is the whole skill.
Nobody has reconciled it
The dashboard shows a number and no one has compared it to Firebase Authentication.
Firebase Auth → BigQuery · diagnose
Diagnostic order — Firebase Auth → BigQuery
- 01
Count accounts carrying whatever join key you decide on
- 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
Reconcile warehouse order counts against each platform for one closed window
The gaps localize the problem: a gap against all platforms is a collection issue, a gap against one is that platform's window or matching.
- 05
Read the match rate, not the success message
BigQuery will not tell you anything is wrong. Verify by querying the table directly against your source system's own totals, and check for duplicate rows on the join key before trusting any aggregate.
Firebase Auth → BigQuery · prove
How it gets proven — Firebase Auth → BigQuery
Against Firebase Authentication's own records, not against either platform's dashboard.
Source of truth
Your billing system, keyed on the Firebase user ID.
- Whatever join key you decide on confirmed present on a live account.
- Warehouse order counts and revenue reconciled against the source system for a fully closed window, with duplicates checked on the join key.
- Paid conversions reconciled per linked user identity against imported conversions.
Firebase Auth → BigQuery · free audit
What we check in the free audit
- Count accounts carrying whatever join key you decide on
- Follow one real conversion end to end
- Check whether anonymous accounts are linked or orphaned at signup
- Reconcile warehouse order counts against each platform for one closed window
- Read the match rate, not the success message
Checked against
Your billing system, keyed on the Firebase user ID.
Free30 minutesNo obligation
Firebase Auth → BigQuery · when not to buy
When you don't need this — Firebase Auth → BigQuery
- If BigQuery 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 whatever join key you decide on.
- If you do not use anonymous auth, the linking problem does not arise.
- If you have one store and one ad platform, a warehouse is infrastructure you will maintain for a reconciliation you could do in a spreadsheet.
Firebase Auth → BigQuery · what we deliver
What gets built — Firebase Auth → BigQuery
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 BigQuery
Streaming inserts or scheduled batch loads from your order system, with the raw event retained alongside whatever you derive from it.
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 → BigQuery questions, answered
Not with a built-in link. Use an Auth trigger or a scheduled Admin SDK job to write user records to a table you control.
Call setUserId with the Firebase uid in the app, then join the export's user_id to your users and billing tables on that uid.
Almost always because whatever join key you decide on 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.
There is no vendor identifier here. You choose the key — order ID, user ID, click identifier, hashed email — and you live with the consequences. That is the whole appeal and the whole risk: nothing is standardised for you and nothing is silently wrong in a vendor's favour either.
Your billing system, keyed on the user ID. Send paid conversions keyed on the user identity. Signups and anonymous sessions are stages, not revenue.
BigQuery will not tell you anything is wrong. Verify by querying the table directly against your source system's own totals, and check for duplicate rows on the join key before trusting any aggregate.
More on Firebase Auth → BigQuery
- 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 → BigQuery fits in the rest of your tracking
- Auth0 → BigQueryConnecting Auth0 to BigQuery
- Supabase Auth → BigQueryConnecting Supabase Auth to BigQuery
- Okta → BigQueryConnecting Okta to BigQuery
- Firebase Auth → SnowflakeConnecting Firebase Authentication to Snowflake
- Firebase Auth → SegmentConnecting Firebase Authentication to Segment
- SaaSConversion tracking for SaaS, from signup through to the payment that matters
- Clerk → BigQueryConnecting Clerk to BigQuery
Free · 30 min
Get Firebase Auth and BigQuery joined properly
Free30 minutesNo obligation
