Files
supabase/packages/common
Sean OliverandJoshen Lim a7cf044118 feat(telemetry): capture ChatGPT Ads oppref click id (GROWTH-1278) (#51397)
## Problem

ChatGPT Ads appends an `oppref` click id to landing URLs. We don't read
it, so ChatGPT ad signups show up in PostHog with no click id and the
first-referrer cookie doesn't treat the visit as paid.

GROWTH-1278

## Solution

- Add `oppref` to the first-touch click ids sent with PostHog events
(`telemetry.tsx`)
- Add `oppref` to `CLICK_ID_KEYS` in `first-referrer-cookie.ts`, so it
is stored in `_sb_first_referrer` and counts as a paid signal

Conversion reporting to OpenAI itself goes through GTM, so it isn't part
of this PR.

## Review instructions

1. Run `pnpm exec vitest run first-referrer-cookie` in
`packages/common`. The `hasPaidSignals` test now covers `oppref`.
2. On the preview, load any page with `?oppref=test` and check the
first-touch event in PostHog carries `oppref`.

## Checklist

Check all before review:

- [ ] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-10-08 08:26:17 -07:00
..
2026-07-08 23:21:48 +08:00
2022-04-26 12:44:07 +02:00