Skip to Content
TrichiDataTrichiData
Sources

Supabase

Send a sign-up event for every new Supabase Auth user, without app code.

The Supabase source adds a database trigger to your Supabase project. Every new Supabase Auth user then arrives in TrichiData as a signed_up event.

Set up

  1. Open Sources in your TrichiData project (Configuration → Sources) and click Connect on Supabase.
  2. Open your project in Supabase → SQL Editor.
  3. Run the SQL shown in TrichiData. It creates the trichidata_on_auth_user_created function and a trigger on auth.users.
  4. Sign up a test user. The Supabase card turns Active when the first sign-up arrives.

The setup SQL contains a secret. Do not commit it or share it. If it leaks, click Rotate secret and run the new SQL in Supabase.

A failing request never blocks the sign-up in Supabase.

What is sent

FieldValue
Eventsigned_up with source supabase
user_idThe Supabase auth.users.id
method propertyThe sign-in provider (email when none is set)
TimestampThe sign-up time

Email, phone and profile data stay in Supabase.

Use the same auth.users.id in identify({ userId }) in your app and in Stripe metadata.user_id, so sign-ups, app activity and payments belong to the same user.

Disconnect

When you disconnect Supabase in TrichiData, new sign-ups are rejected and events already collected are kept. Remove the trigger by running the SQL shown in TrichiData in Supabase → SQL Editor:

drop trigger if exists trichidata_auth_user_created on auth.users;
drop function if exists public.trichidata_on_auth_user_created();

See also

On this page