Skip to main content
Supabase Auth → MetaIntegration guide

Connecting Supabase Auth to Meta Conversions API

Supabase Auth sits directly on your own Postgres database, which means the identity and the revenue can be joined with a query rather than through an integration. Meta's pixel loses a large share of conversions to Safari, ad blockers and iOS, and the Conversions API exists because of it. The join between them succeeds or fails on one thing: whether the fbc and fbp values reaches the Supabase user before the conversion happens, because Meta can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Supabase Auth to Meta CAPI: store fbc, fbp and user agent

Write fbc, fbp, user agent and IP onto the Supabase profile row at first login, persisting fbc server-side before OAuth redirects or in signInWithOtp options data. Send Purchase from a Database Webhook or Edge Function on the billing table, not an auth.users trigger, with the order or subscription ID as event_id, within Meta's seven-day limit.

Meta requires client_user_agent on website events, and fbc and fbp lift match quality, but all three exist only in the browser. By the time a Supabase user pays, often days after signing up, your server has none of them unless you stored them. Write fbc, fbp, the user agent and the IP address onto the profile row at first login, and send them with the Purchase event when the billing table changes.

OAuth is the hop that drops them. signInWithOAuth redirects to the provider and back, and if the app sits on a different domain from your landing page, the _fbc cookie set there is not readable in the app. Persist it server-side before the redirect. If you use magic links, put it in the options data of signInWithOtp so it lands in user metadata before the email is opened.

Use the order or subscription ID as event_id, and send Purchase from a Database Webhook or Edge Function on the billing table, not from a trigger on auth.users, which fires at sign-up. If the browser pixel also fires Purchase on your success page, it needs that same ID or Meta counts twice. Consider keeping renewals out of the optimization event. Send within seven days of payment, which a webhook does and a weekly query does not.

Supabase Auth → Meta · what breaks

Why this join usually fails — Supabase Auth → Meta

  1. 01

    The fbc and fbp values never reaches Supabase Auth

    OAuth flows redirect off-site and back, which can lose an identifier captured before login.

  2. 02

    Building a pipeline for a join you could write in SQL

    Teams reach for a CDP or an event pipeline to connect identity to revenue when both tables sit in the same database. The simplest correct answer is usually a scheduled query.

  3. 03

    Double counting from broken deduplication

    Server and browser both fire, the event_id does not match, and Meta counts two purchases. Reported ROAS goes up, the business does not, and it can run for months before anyone reconciles against the store.

  4. 04

    Nothing reconciles afterwards

    Events Manager shows received events, the deduplication state and an Event Match Quality score per event. Events arriving is not the test — deduplicated, well-matched events arriving is. Compare Meta's reported purchases against your store's order count for the same window.

Supabase Auth → Meta · the fix

What working looks like — Supabase Auth → Meta

  • The fbc and fbp values on every account

  • Conversions arriving in Meta

    Events appear in Events Manager with an Event Match Quality score, deduplicated against the pixel, and become usable for optimization and attribution.

  • Reconciled against the source

Supabase Auth → Meta · architecture

How Supabase Auth and Meta actually connect

  1. 1

    Supabase Auth holds the truth

    Because everything is in one Postgres instance, the join that most products build a pipeline for is a SQL statement here. That is a genuine advantage and it is frequently unused.

  2. 2

    Meta Conversions API needs a click to match

    Meta matches server events to people using whatever identifiers you send, hashed with SHA-256 where required. There is no single mandatory key, which is why quality varies so much between implementations — a poorly matched event is accepted, reported, and worth much less than it appears.

  3. 3

    The identifier is the bridge

    The fbc and fbp values, captured at the visit and carried into the Supabase user.

  4. 4

    The event source decides reliability

    Send paid conversions from a query joining auth users to billing.

  5. 5

    Deduplication at the destination

    Meta deduplicates on the pair of event_name and event_id. The browser pixel and the server event must send the same event_id for the same conversion, within the deduplication window. Get this wrong and every purchase counts twice — which is by far the most common Conversions API failure and it inflates reported ROAS rather than reducing it.

Supabase Auth → Meta · normal or broken

Working vs. broken, side by side — Supabase Auth → Meta

Normal, not a fault

  • The fbc and fbp values present on the account

  • Sent from your own database

  • Deduplicated correctly

    Meta deduplicates on the pair of event_name and event_id. The browser pixel and the server event must send the same event_id for the same conversion, within the deduplication window. Get this wrong and every purchase counts twice — which is by far the most common Conversions API failure and it inflates reported ROAS rather than reducing it.

  • Reconciles with the source

Actually broken

  • The fbc and fbp values missing on most records

    OAuth flows redirect off-site and back, which can lose an identifier captured before login.

  • Sent from the browser

    Teams reach for a CDP or an event pipeline to connect identity to revenue when both tables sit in the same database. The simplest correct answer is usually a scheduled query.

  • Counted twice, or not at all

    Server and browser both fire, the event_id does not match, and Meta counts two purchases. Reported ROAS goes up, the business does not, and it can run for months before anyone reconciles against the store.

  • Nobody has reconciled it

Supabase Auth → Meta · diagnose

Diagnostic order — Supabase Auth → Meta

  1. 01

    Count accounts carrying the fbc and fbp values

  2. 02

    Follow one real conversion end to end

  3. 03

    Check whether identity and billing are in the same database

    If they are, most of the usual integration complexity is unnecessary.

  4. 04

    Read Event Match Quality and the deduplication indicator

    In Events Manager, open the event and check both. A low match quality means weak identifiers; a missing deduplication indicator means your event_id pairing is broken.

  5. 05

    Read the match rate, not the success message

    Events Manager shows received events, the deduplication state and an Event Match Quality score per event. Events arriving is not the test — deduplicated, well-matched events arriving is. Compare Meta's reported purchases against your store's order count for the same window.

Supabase Auth → Meta · prove

How it gets proven — Supabase Auth → Meta

Source of truth

Your own database, joining the auth user to the subscription or order table.

  • The fbc and fbp values confirmed present on a live account.
  • Deduplication confirmed in Events Manager on a real purchase, with the browser and server events visibly paired rather than counted twice.
  • Paid conversions reconciled by query against imported conversions, with identifier survival verified across OAuth.

Supabase Auth → Meta · free audit

What we check in the free audit

  • Count accounts carrying the fbc and fbp values
  • Follow one real conversion end to end
  • Check whether identity and billing are in the same database
  • Read Event Match Quality and the deduplication indicator
  • Read the match rate, not the success message

Checked against

Your own database, joining the auth user to the subscription or order table.

Get my free conversion tracking audit

Free30 minutesNo obligation

Supabase Auth → Meta · when not to buy

When you don't need this — Supabase Auth → Meta

  • Measure identifier coverage yourself first — pull your last hundred accounts and count how many carry the fbc and fbp values.
  • If billing lives in a separate system, the join is a real integration again and the advantage disappears.
  • If you are not running Meta ads at meaningful spend, the Conversions API is effort without payoff. It earns its cost when the optimization signal is worth improving.

Supabase Auth → Meta · what we deliver

What gets built — Supabase Auth → Meta

  • Identifier capture into Supabase Auth

    Persist the identifier before the OAuth redirect and write it onto the user row at first login, where it is then permanently queryable.

  • Event source: your own database

    Send paid conversions from a query joining auth users to billing.

  • Dispatch to Meta

    Server-side events to the Conversions API with the event_id matched to the pixel, action_source set correctly, and customer data hashed before it leaves your infrastructure.

  • Reversals where they exist

    Cancellations reverse against the same user row.

Written guarantee

95%+ tracking accuracy

Measured against Your own database, joining the auth user to the subscription or order table.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Supabase Auth → Meta questions, answered

Store fbc, fbp and user agent on the user row at first login, then send CompleteRegistration at sign-up and Purchase from the billing table, each with its own event_id. Hash the email from auth.users with SHA-256 after normalizing it.

Free · 30 min

Get Supabase Auth and Meta joined properly

Free30 minutesNo obligation