Skip to main content
Supabase Auth → TikTokIntegration guide

Connecting Supabase Auth to TikTok Events 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. TikTok's audience skews to exactly the browsers and app contexts where browser-side tracking performs worst. The join between them succeeds or fails on one thing: whether the ttclid reaches the Supabase user before the conversion happens, because TikTok can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Supabase Auth to TikTok: Google sign-in fails in the webview

Google blocks OAuth in TikTok's in-app browser, so lead with email sign-up for TikTok visitors. Persist ttclid server-side and pass it in signUp or signInWithOtp options data before magic links open elsewhere. Send CompletePayment from a Database Webhook on billing with ttclid, hashed auth email, order or subscription ID as event_id, value and currency.

Google blocks OAuth sign-in from embedded webviews, and TikTok's in-app browser is one. A visitor who taps Continue with Google on your Supabase sign-in page inside TikTok can hit a disallowed_useragent error, and that sign-up is lost before any ttclid question arises. Check your sign-up completion rate on TikTok traffic specifically, and lead with email sign-up for in-app visitors.

Email sign-up has its own trap. A magic link opens from the mail app, often in Safari or Chrome, where TikTok's cookies do not exist. Persist the ttclid server-side on landing, and pass it in the options data of signUp or signInWithOtp, so it is written into user metadata before the user ever leaves TikTok's browser. From there it is a column you can query.

Send CompletePayment from a Database Webhook or Edge Function on your billing table, with the ttclid, the hashed email from auth.users, the order or subscription ID as event_id, and value and currency. Send account creation as CompleteRegistration only if you want an upper-funnel signal; with a free tier, sign-ups far outnumber payments, and optimizing on them finds free users.

Supabase Auth → TikTok · what breaks

Why this join usually fails — Supabase Auth → TikTok

  1. 01

    The ttclid 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 ttclid is lost in the in-app browser

    TikTok traffic arrives through an in-app webview whose storage behavior is inconsistent. An identifier captured but not immediately persisted server-side often is not there by the time the conversion happens.

  4. 04

    Nothing reconciles afterwards

    TikTok Events Manager shows received events and their match status. As with Meta, arriving is not the test — deduplicated and matched is. Reconcile TikTok's reported conversions against the source system for the same window.

Supabase Auth → TikTok · the fix

What working looks like — Supabase Auth → TikTok

  • The ttclid on every account

  • Conversions arriving in TikTok

    Events appear in TikTok Events Manager, deduplicated against the pixel, and become usable for optimization.

  • Reconciled against the source

Supabase Auth → TikTok · architecture

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

    TikTok Events API needs a click to match

    TikTok matches server events using ttclid where available, falling back to hashed contact information. Both should be sent — the fallback is what carries the events where the click ID did not survive.

  3. 3

    The identifier is the bridge

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

    TikTok deduplicates on event_id, the same pattern as Meta: the pixel and the Events API must send the same event_id for the same conversion. Mismatched IDs mean double counting.

Supabase Auth → TikTok · normal or broken

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

Normal, not a fault

  • The ttclid present on the account

  • Sent from your own database

  • Deduplicated correctly

    TikTok deduplicates on event_id, the same pattern as Meta: the pixel and the Events API must send the same event_id for the same conversion. Mismatched IDs mean double counting.

  • Reconciles with the source

Actually broken

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

    TikTok traffic arrives through an in-app webview whose storage behavior is inconsistent. An identifier captured but not immediately persisted server-side often is not there by the time the conversion happens.

  • Nobody has reconciled it

Supabase Auth → TikTok · diagnose

Diagnostic order — Supabase Auth → TikTok

  1. 01

    Count accounts carrying the ttclid

  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

    Measure ttclid capture rate on TikTok traffic specifically

    Not on all traffic. TikTok's in-app browser is the failure case, so a healthy overall capture rate can hide a poor one on exactly the traffic that matters.

  5. 05

    Read the match rate, not the success message

    TikTok Events Manager shows received events and their match status. As with Meta, arriving is not the test — deduplicated and matched is. Reconcile TikTok's reported conversions against the source system for the same window.

Supabase Auth → TikTok · prove

How it gets proven — Supabase Auth → TikTok

Source of truth

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

  • The ttclid confirmed present on a live account.
  • Deduplication confirmed in Events Manager, and ttclid capture rate measured on TikTok traffic specifically.
  • Paid conversions reconciled by query against imported conversions, with identifier survival verified across OAuth.

Supabase Auth → TikTok · free audit

What we check in the free audit

  • Count accounts carrying the ttclid
  • Follow one real conversion end to end
  • Check whether identity and billing are in the same database
  • Measure ttclid capture rate on TikTok traffic specifically
  • 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 → TikTok · when not to buy

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

  • Measure identifier coverage yourself first — pull your last hundred accounts and count how many carry the ttclid.
  • If billing lives in a separate system, the join is a real integration again and the advantage disappears.
  • If TikTok is a small share of spend, the effort is hard to justify. It pays when TikTok is a channel you are actively scaling.

Supabase Auth → TikTok · what we deliver

What gets built — Supabase Auth → TikTok

  • 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 TikTok

    Server events to the TikTok Events API with the ttclid, hashed contact information and a matching event_id.

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

Google blocks OAuth from embedded webviews such as TikTok's in-app browser. Offer email sign-up, or prompt users to open the page in their default browser.

Free · 30 min

Get Supabase Auth and TikTok joined properly

Free30 minutesNo obligation