Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions content/docs/api-reference/track-lead.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Track Lead
description: Record a signup or lead event that links a customer to an affiliate click.
kind: reference
last_updated: 2026-11-07
last_updated: 2026-11-16
---

`POST /api/v1/track/lead`
Expand Down Expand Up @@ -55,7 +55,7 @@ A browser lead settles directly only on a program set to `browser_allowed`. A br
Your internal customer or user ID. Send it with the `click_id`: when the lead settles, Affitor saves it on that customer, so later sales can find the customer by your own id. On its own it finds no customer on a first lead, because the key is saved only when a lead settles.
</ParamField>
<ParamField name="email" type="string">
Customer email address. Used for hashed/masked attribution support.
The buyer's email address. Send it on every lead. When the lead settles, Affitor saves a one-way hash of it and a masked form (`j***@example.com`) on the customer, only if the customer has none yet; the lead never stores the address itself. It is the fallback that keeps a sale with the right partner: a Stripe Checkout payment that carries no click id (the buyer paid on another device or cleared their cookies) is matched to this customer by its checkout email, so it can still go to the partner who referred them. A provisional browser lead does not save it.
</ParamField>
<ParamField name="additional_data" type="object">
Optional metadata. Supports `test_mode` (boolean), `program_id` (number), and `event_name` (string).
Expand Down
2 changes: 2 additions & 0 deletions public/docs/skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ Attribution only works if **one stable internal user ID** is identical across ev

If signup uses `user.id` but checkout uses `user.email`, sales will not attribute. **Same id, every time.**

**Also send the buyer's email on every lead** (`signup(customerKey, email)` 2nd arg, `trackLead({ email })`, `email` on the wire). Affitor keeps only a one-way hash and a masked form (`j***@example.com`). It is the fallback that keeps a sale with the right partner: a Stripe Checkout payment without a click id (other device, cleared cookies) is matched to the customer by its checkout email.

---

## 3. Install the SDK
Expand Down
Loading