# Supabase

> Connect Supabase to see which links bring in sign ups, how people sign up and which plan they choose.

Connect Supabase to see which links bring in sign ups, how people sign up and which plan they choose.

## What you can do

- Count the sign ups each link brings in.
- See how people sign up, like Google, Apple or email.
- See which plan people choose after they sign up.
- Use sign ups and plans as steps in your funnels.

## Before you begin

> **Tip:** You need a Supabase project you can run SQL in. It takes about two minutes: you run one query and paste two values.

## Connecting Supabase

To connect Supabase:

1. Click **Add-ons** in the sidebar.
2. Find **Supabase** under **Connections** and click **Connect**.
3. To count plans too, turn on **Also track which plan people choose** and enter the **Table**, **Plan column** and **User ID column** where your app keeps each person’s plan.
4. Copy the SQL, click **Open SQL editor**, paste it in and click **Run**.
5. Click **Open Connect** and copy your **Project URL** and **Publishable key** into the form.
6. Click **Connect**.

The SQL only lets Link Studio read sign-up dates, sign-up methods and plans, and nothing else.

> **Tip:** Only paste the publishable key. Link Studio refuses the secret key, because it can change your whole project.

## What comes in

| Event | When |
| --- | --- |
| `sign_up` | Someone creates an account. |
| `sign_up_with_Google`, `sign_up_with_email` and so on | The same sign up, named by how they signed up. |
| `chose_Pro_plan` and so on | The plan they’re on, when you track plans. |

Once connected, the last 60 days of sign ups come in. After that, Link Studio checks for new sign ups every few seconds.

> **Note:** Link Studio only sees when people sign up, how they sign up and which plan they pick. Never their emails or names.

## Crediting sign ups to your links

On your site, call `linkStudio.identify(user.id)` right after someone signs up or logs in. You can also pass `linkStudio.attribution()` as `options.data` when you call `signUp`. Link Studio then credits each sign up to the link the person came from. See [Signed in people and sales](https://linkstudio.link/docs/tracking-script/#people).

## Disconnecting Supabase

On the **Add-ons** page, click **Disconnect** on the Supabase card and confirm. Disconnecting deletes Link Studio’s key. To remove the SQL as well, open **Remove access** in the Supabase form and run the SQL it shows.

## FAQs

### Does Link Studio see my users’ emails in Supabase?

No. Link Studio only sees when people sign up in Supabase, how they signed up and which plan they pick. Never their emails or names.

### How many events does a Supabase sign up make in Link Studio?

Two: one `sign_up`, and one named by how they signed up, like `sign_up_with_Google`. It makes three when you track plans, with one like `chose_Pro_plan`. Each counts toward your Link Studio events.

### Can my AI agent connect Supabase to Link Studio?

Yes. Ask the AI agent you connected to Link Studio to connect your Supabase sign ups. It walks you through running one SQL query in your Supabase project, then finishes the connection with your project URL and publishable key. Link Studio refuses secret keys, so your agent never needs one.

Source: https://linkstudio.link/docs/supabase/
