Connecting Firebase Authentication to X Ads
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. X is a conversation platform where a large share of engagement is discussion rather than intent, which makes the gap between engagement metrics and conversions unusually wide. The join between them succeeds or fails on one thing: whether the twclid click identifier reaches the Firebase user identity before the conversion happens, because X Ads can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Firebase sign-ups to X Ads: twclid and the in-app browser
Store twclid first-party on the landing page before any sign-in call, since X's in-app browser complicates OAuth, then copy it to the Firebase user document. Send the sign-up to X's Conversions API with a uid-derived conversion ID shared with the pixel, plus hashed email, and send paid conversions separately from billing. Judge X on payments.
Many X ad clicks open inside the X app's browser, and sign-in is where that hurts a Firebase product. Some providers, Google among them, can refuse or complicate OAuth in embedded browsers, and redirect flows lose storage there. A visitor who gives up and finishes signing up later in Safari arrives without a twclid, so hashed email on the server event is what recovers part of that loss.
Store twclid first-party on the landing page before any sign-in call, copy it to the user document at account creation, and send the sign-up from your backend to the X Conversions API with a conversion ID derived from the uid and the same ID on the X pixel event. Paid conversions go separately from billing on the same uid.
If signups are cheap and paying users rare, optimizing X on signups will find people who sign up and never pay, and anonymous-first apps make the signup number even softer. Send the paid event and judge X on it, even at low volume. App-install campaigns on X are a separate measurement path through a mobile measurement partner, not through Firebase Auth.
Firebase Auth → X Ads · what breaks
Why this join usually fails — Firebase Auth → X Ads
- 01
The twclid click identifier 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
Engagement mistaken for intent
A post can be quoted, argued with and shared widely by people with no interest in buying anything. Optimising toward engagement on this platform reliably finds an audience that will never convert, and the engagement numbers look excellent throughout.
- 04
Nothing reconciles afterwards
Read the delivered and matched counts in X's reporting rather than assuming a 200 response means the event was usable.
Firebase Auth → X Ads · the fix
What working looks like — Firebase Auth → X Ads
The twclid click identifier on every account
Conversions arriving in X Ads
The conversion is matched to a click or an engagement and becomes available for optimisation and reporting.
Reconciled against the source
Firebase Authentication's own records are the reference, not either dashboard.
Firebase Auth → X Ads · architecture
How Firebase Auth and X Ads 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
X Ads needs a click to match
An event X recognises, a conversion identifier for deduplication, hashed customer information, and the click identifier where you have it.
- 3
The identifier is the bridge
The twclid click identifier, 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
X deduplicates browser and server events on a shared conversion ID. Send both without pairing them and every conversion counts twice — worth testing deliberately, because X volumes are often small enough that a doubling reads as a good week.
Firebase Auth → X Ads · normal or broken
Working vs. broken, side by side — Firebase Auth → X Ads
Normal, not a fault
The twclid click identifier 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
X deduplicates browser and server events on a shared conversion ID. Send both without pairing them and every conversion counts twice — worth testing deliberately, because X volumes are often small enough that a doubling reads as a good week.
Reconciles with the source
X Ads's count and Firebase Authentication's records agree within a few percent over a closed window.
Actually broken
The twclid click identifier 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
A post can be quoted, argued with and shared widely by people with no interest in buying anything. Optimising toward engagement on this platform reliably finds an audience that will never convert, and the engagement numbers look excellent throughout.
Nobody has reconciled it
The dashboard shows a number and no one has compared it to Firebase Authentication.
Firebase Auth → X Ads · diagnose
Diagnostic order — Firebase Auth → X Ads
- 01
Count accounts carrying the twclid click identifier
- 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
Compare engagement rate against conversion rate by campaign
On X the two frequently move in opposite directions, and that divergence is the finding rather than a measurement fault.
- 05
Read the match rate, not the success message
Read the delivered and matched counts in X's reporting rather than assuming a 200 response means the event was usable.
Firebase Auth → X Ads · prove
How it gets proven — Firebase Auth → X Ads
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 twclid click identifier confirmed present on a live account.
- Conversions reconciled per order against imported figures, with deduplication verified on a live test.
- Paid conversions reconciled per linked user identity against imported conversions.
Firebase Auth → X Ads · free audit
What we check in the free audit
- Count accounts carrying the twclid click identifier
- Follow one real conversion end to end
- Check whether anonymous accounts are linked or orphaned at signup
- Compare engagement rate against conversion rate by campaign
- Read the match rate, not the success message
Checked against
Your billing system, keyed on the Firebase user ID.
Free30 minutesNo obligation
Firebase Auth → X Ads · when not to buy
When you don't need this — Firebase Auth → X Ads
- If X Ads 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 twclid click identifier.
- If you do not use anonymous auth, the linking problem does not arise.
- If X is a brand and community channel for you rather than a performance one, measure it that way and do not force a conversion pipeline onto it.
Firebase Auth → X Ads · what we deliver
What gets built — Firebase Auth → X Ads
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 X Ads
The X Conversions API, posted server-side with the click identifier and hashed customer data.
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 → X Ads questions, answered
Sign-ins that fail or are abandoned in X's in-app browser often finish later in another browser without the twclid. Hashed email on the server event recovers some of them.
Paid conversions from billing where volume allows. Sign-ups, especially with anonymous auth, are too easy to get to be a useful target.
Almost always because the twclid click identifier 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.
X appends twclid to the landing URL and the pixel stores it. It behaves like other click identifiers, with the usual caveat that a large share of X traffic arrives through the in-app browser, where storage is partitioned and short-lived.
Your billing system, keyed on the user ID. Send paid conversions keyed on the user identity. Signups and anonymous sessions are stages, not revenue.
Read the delivered and matched counts in X's reporting rather than assuming a 200 response means the event was usable.
More on Firebase Auth → X Ads
- Firebase Auth → Google AdsConnecting Firebase Authentication to Google Ads
- Firebase Auth → Microsoft AdsConnecting Firebase Authentication to Microsoft Ads
- Firebase Auth → Apple Search AdsConnecting Firebase Authentication to Apple Search Ads
RELATED GUIDES
Where Firebase Auth → X Ads fits in the rest of your tracking
- X Ads · B2BX Ads conversion tracking for B2B companies
- X Ads · SaaSX Ads conversion tracking for SaaS companies
- X Ads × SubscriptionsHow to reconcile X Ads against your billing system
- X Ads · Freemium → paidHow to track freemium signup to paid upgrade for X Ads
- Auth0 → X AdsConnecting Auth0 to X Ads
- Firebase Auth → Google AdsConnecting Firebase Authentication to Google Ads
- SaaSConversion tracking for SaaS, from signup through to the payment that matters
- Supabase Auth → X AdsConnecting Supabase Auth to X Ads
Free · 30 min
Get Firebase Auth and X Ads joined properly
Free30 minutesNo obligation
