Skip to main content
Supabase Auth → MatomoIntegration guide

Connecting Supabase Auth to Matomo

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. Matomo can be self-hosted with no third party in the chain, which makes it the one analytics destination where the data genuinely never leaves infrastructure you control. The join between them succeeds or fails on one thing: whether the first-party visitor ID reaches the Supabase user before the conversion happens, because Matomo can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Matomo User ID from Supabase, across the OAuth round trip

Set Matomo's User ID to the Supabase auth UUID once a session exists, never email. Send paid conversions through the Tracking API with that UUID and the stored visitor ID, as a goal or order keyed on subscription or invoice ID. Add the identity providers and your supabase.co callback domain to referrer exclusions, so logins aren't credited as referrals.

Matomo's User ID feature fits Supabase cleanly: set it to the auth user's UUID once a session exists, and every later visit on any device joins the same person in Matomo's reports. Do not use the email, which a user can change and which then sits in your analytics database in plain text. Send the paid conversion server-side through the Tracking API with the same UUID and the Matomo visitor ID you stored on the user row before login, recorded as a goal or an ecommerce order keyed on the subscription or invoice ID.

The specific breakage with this pair is the OAuth bounce. A user leaves your site for Google or GitHub, passes through your Supabase project's callback domain, and returns. Matomo can treat that return as a new visit referred by the identity provider or by your project's supabase.co address, so signups get credited to a referral source that is really your own login flow. Check your Matomo version's referrer exclusion settings and add both, then confirm in a test that campaign attribution survives login.

If both Supabase and Matomo are self-hosted, this is one of the few setups where no third party sees any of the data, which matters if that is why you chose them. It also means a full Matomo database on a weekend loses the signups and nothing in Supabase will tell you.

Supabase Auth → Matomo · what breaks

Why this join usually fails — Supabase Auth → Matomo

  1. 01

    The first-party visitor ID 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

    Owning the pipeline means owning the outage

    The advantage is that nothing blocks it. The cost is that when the tracking database fills or falls behind on a weekend, the data is gone and no vendor is paging anyone. Hosted tools fail more visibly.

  4. 04

    Nothing reconciles afterwards

    Matomo exposes raw visit logs, so you can inspect the actual hit rather than an aggregate. Check the log, and check ingestion lag alongside it.

Supabase Auth → Matomo · the fix

What working looks like — Supabase Auth → Matomo

  • The first-party visitor ID on every account

  • Conversions arriving in Matomo

    The event lands in your own database and is queryable directly, including the raw log, which most analytics products do not expose.

  • Reconciled against the source

Supabase Auth → Matomo · architecture

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

    Matomo needs a click to match

    The site ID, the visitor identifier and the event or ecommerce order. Self-hosted instances additionally need the tracker endpoint reachable and the database keeping up, which hosted tools do not fail at.

  3. 3

    The identifier is the bridge

    The first-party visitor ID, 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

    Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.

Supabase Auth → Matomo · normal or broken

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

Normal, not a fault

  • The first-party visitor ID present on the account

  • Sent from your own database

  • Deduplicated correctly

    Matomo deduplicates ecommerce orders on order ID. Without one, a refreshed confirmation page records a second order.

  • Reconciles with the source

Actually broken

  • The first-party visitor ID 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

    The advantage is that nothing blocks it. The cost is that when the tracking database fills or falls behind on a weekend, the data is gone and no vendor is paging anyone. Hosted tools fail more visibly.

  • Nobody has reconciled it

Supabase Auth → Matomo · diagnose

Diagnostic order — Supabase Auth → Matomo

  1. 01

    Count accounts carrying the first-party visitor ID

  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 tracker reachability and database lag before debugging any tag

    On self-hosted analytics the answer is infrastructure more often than instrumentation.

  5. 05

    Read the match rate, not the success message

    Matomo exposes raw visit logs, so you can inspect the actual hit rather than an aggregate. Check the log, and check ingestion lag alongside it.

Supabase Auth → Matomo · prove

How it gets proven — Supabase Auth → Matomo

Source of truth

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

  • The first-party visitor ID confirmed present on a live account.
  • Orders reconciled against the Matomo ecommerce log with order-ID deduplication verified.
  • Paid conversions reconciled by query against imported conversions, with identifier survival verified across OAuth.

Supabase Auth → Matomo · free audit

What we check in the free audit

  • Count accounts carrying the first-party visitor ID
  • Follow one real conversion end to end
  • Check whether identity and billing are in the same database
  • Check tracker reachability and database lag before debugging any tag
  • 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 → Matomo · when not to buy

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

  • Measure identifier coverage yourself first — pull your last hundred accounts and count how many carry the first-party visitor ID.
  • If billing lives in a separate system, the join is a real integration again and the advantage disappears.
  • If you have no privacy or ownership requirement and no team to run it, a hosted product removes the only real cost of this one.

Supabase Auth → Matomo · what we deliver

What gets built — Supabase Auth → Matomo

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

    The Matomo HTTP Tracking API, posted server-side from your order system.

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

Use the auth user's UUID. It never changes, it is not personal data in plain text, and the same value can be sent server-side when the paid conversion happens.

Free · 30 min

Get Supabase Auth and Matomo joined properly

Free30 minutesNo obligation