Skip to main content
Supabase Auth → Google AdsIntegration guide

Connecting Supabase Auth to Google Ads

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. Google Ads knows what you spent and which click it came from, and nothing at all about what happened afterwards. The join between them succeeds or fails on one thing: whether the GCLID reaches the Supabase user before the conversion happens, because Google Ads can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Supabase Auth to Google Ads: gclid upload from a SQL query

Persist the gclid before signInWithOAuth, or pass it in signUp or signInWithOtp options data for magic links, and write it onto the profile row. A scheduled query then uploads newly paid users to an import conversion action with the order ID. Clicks older than 90 days are rejected, so add enhanced conversions for leads using hashed auth.users email.

Persist the gclid before signInWithOAuth redirects to Google or GitHub, then write it onto the user's profile row at first login. Once it is there, the offline import is a scheduled query: users with a gclid who went paid since the last run, joined to the billing table, uploaded to an import conversion action with the order or subscription ID as the order ID.

The 90-day window shapes this. A product with a free tier and a slow upgrade path will see users pay after their click has aged out, and those uploads are rejected. Enhanced conversions for leads covers part of that gap by matching on hashed email, and auth.users already holds an email for every account; trim and lowercase it before hashing, and check that the pgcrypto extension is enabled if you hash in SQL. It also needs your Google tag to capture the email at sign-up, so add that before you need it.

Two traps specific to Supabase. A trigger on auth.users fires at sign-up, not at payment, so do not upload from it unless sign-up is the conversion. And magic-link sign-ins open the app from an email, often in another browser, so a gclid kept only in browser storage is gone by then; pass it in the options data of signUp or signInWithOtp so it lands in user metadata server-side.

Supabase Auth → Google Ads · what breaks

Why this join usually fails — Supabase Auth → Google Ads

  1. 01

    The GCLID 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

    The conversion action is the wrong type

    Uploads against a standard website conversion action fail. The action has to be created as 'Import' — and existing actions cannot be converted, so this is discovered late and requires starting a new action with no history.

  4. 04

    Nothing reconciles afterwards

    Google Ads reports uploads in Goals → Conversions → Uploads, with rows accepted and rows failed. A green result means the file parsed, not that the clicks matched. The number to watch is how many conversions actually appear against campaigns afterwards.

Supabase Auth → Google Ads · the fix

What working looks like — Supabase Auth → Google Ads

  • The GCLID on every account

  • Conversions arriving in Google Ads

    Conversions appear against the campaign, ad group and keyword that produced the click, with the value you sent — which is what lets Smart Bidding optimize toward revenue instead of toward form fills.

  • Reconciled against the source

Supabase Auth → Google Ads · architecture

How Supabase Auth and Google Ads 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

    Google Ads needs a click to match

    Google Ads matches an uploaded conversion back to a click using the GCLID. The conversion action must be created as an import type — an upload against a website-tag conversion action is rejected. Uploads must also land inside Google's window: the click has to be within the last 90 days.

  3. 3

    The identifier is the bridge

    The GCLID, 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

    Google deduplicates on the combination of GCLID, conversion action and conversion time. Uploading the same click twice against the same action at the same timestamp is rejected rather than double-counted, but uploading it against a second conversion action counts twice — which is how most double-counting here actually happens.

Supabase Auth → Google Ads · normal or broken

Working vs. broken, side by side — Supabase Auth → Google Ads

Normal, not a fault

  • The GCLID present on the account

  • Sent from your own database

  • Deduplicated correctly

    Google deduplicates on the combination of GCLID, conversion action and conversion time. Uploading the same click twice against the same action at the same timestamp is rejected rather than double-counted, but uploading it against a second conversion action counts twice — which is how most double-counting here actually happens.

  • Reconciles with the source

Actually broken

  • The GCLID 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

    Uploads against a standard website conversion action fail. The action has to be created as 'Import' — and existing actions cannot be converted, so this is discovered late and requires starting a new action with no history.

  • Nobody has reconciled it

Supabase Auth → Google Ads · diagnose

Diagnostic order — Supabase Auth → Google Ads

  1. 01

    Count accounts carrying the GCLID

  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

    Check the conversion action type and the upload diagnostics

    In Google Ads, Goals → Conversions → Uploads shows every upload with its error rows. Read the errors rather than the success count; a file can import successfully with most rows rejected.

  5. 05

    Read the match rate, not the success message

    Google Ads reports uploads in Goals → Conversions → Uploads, with rows accepted and rows failed. A green result means the file parsed, not that the clicks matched. The number to watch is how many conversions actually appear against campaigns afterwards.

Supabase Auth → Google Ads · prove

How it gets proven — Supabase Auth → Google Ads

Source of truth

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

  • The GCLID confirmed present on a live account.
  • The Uploads diagnostics read row by row, with the accepted count reconciled against conversions appearing in campaign reporting.
  • Paid conversions reconciled by query against imported conversions, with identifier survival verified across OAuth.

Supabase Auth → Google Ads · free audit

What we check in the free audit

  • Count accounts carrying the GCLID
  • Follow one real conversion end to end
  • Check whether identity and billing are in the same database
  • Check the conversion action type and the upload diagnostics
  • 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 → Google Ads · when not to buy

When you don't need this — Supabase Auth → Google Ads

  • Measure identifier coverage yourself first — pull your last hundred accounts and count how many carry the GCLID.
  • If billing lives in a separate system, the join is a real integration again and the advantage disappears.
  • If your sales close inside a few days and your website tag already reports accurately, you may not need offline import at all. It exists to solve the delay between click and revenue.

Supabase Auth → Google Ads · what we deliver

What gets built — Supabase Auth → Google Ads

  • 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 Google Ads

    Offline Conversion Import through the Google Ads API, or a scheduled upload. Enhanced conversions for leads where GCLID coverage is poor and you have consented email addresses.

  • 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 → Google Ads questions, answered

Save it before the OAuth redirect and write it to a profile row at first login, or pass it in the options data on email sign-up so it lands in user metadata. Then it can be queried with the billing table.

Free · 30 min

Get Supabase Auth and Google Ads joined properly

Free30 minutesNo obligation