# Branding & white-label
Source: https://doc.trackrev.io/account/branding
White-label the pages your partners and visitors see: put your logo, colour and domain on the affiliate signup page, partner portal and link-in-bio pages.
TrackRev white-labels the surfaces your audience sees — your affiliate signup page, the partner
portal, expired-link and password pages, and link-in-bio pages — so they carry your brand, not
TrackRev's.
## Set your brand
Go to **Configuration → Branding** to set:
* **Logo** — PNG, JPG, SVG or WebP, up to 1 MB.
* **Accent colour** — a hex value like `#e63e2e`. Used across your affiliate pages and portal.
* **Subdomain** — `yourbrand.trackrev.io` for your affiliate home.
These apply to the affiliate signup page, partner login, and the whole partner portal, including
the browser tab title and favicon.
## What's branded where
| Surface | Branding |
| - | - |
| Affiliate signup page | Logo, colour, name, subdomain/custom domain |
| Partner portal | Logo, colour, name (footer: *"Powered by TrackRev"*) |
| Short links | Your [custom domain](/link-tracking/custom-domains) |
| Expired / password pages | TrackRev-branded, on your link's domain |
| Link-in-bio pages | Your theme and (optionally) custom domain |
## Custom domains
For the strongest white-label, connect a [custom domain](/link-tracking/custom-domains). It powers
both your branded short links (`go.yourbrand.com/slug`) and your affiliate signup page
(`go.yourbrand.com/join`).
> [!NOTE]
>
> The default brand colour is TrackRev's coral `#e63e2e`. Set your own to match your product; the
> colour propagates to buttons, links and accents across the branded surfaces.
# Plans & billing
Source: https://doc.trackrev.io/account/plans-and-billing
Two paid plans, no cap on tracked revenue: Indie at $29/month for one site and Growth at $299/year for up to 10 sites. Compare limits, upgrade or cancel.
Every **paid** plan unlocks the *entire* product — unlimited link tracking, full revenue
attribution, and the complete affiliate and partner programme. There are two paid plans, and
they differ on how much of your account they cover: **how many workspaces** (sites) you can run,
**how many tracked domains** you can connect, and **how many team members** can join. Nothing
else is gated behind a higher tier, and neither plan caps the affiliate revenue you track.
## Plans at a glance
| Plan | Price | Workspaces | Tracked domains | Team members | Revenue attribution |
| - | - | - | - | - | - |
| **Free** | \$0 | 1 | — | — | Hidden |
| **Indie** | \$29 per month, billed monthly | 1 | 1 | Just you (single seat) | ✅ |
| **Growth** | \$299 per year, billed yearly | Up to 10 | Up to 10 | Unlimited | ✅ |
> [!NOTE]
>
> Each paid plan is sold on one billing cadence: **Indie is monthly** and **Growth is yearly**.
> There is no monthly Growth plan, no yearly Indie plan, and no annual discount to toggle.
> **Indie** is one site billed month to month, which makes it the low-commitment way to start.
> **Growth** is built for managing multiple sites, with up to 10 workspaces and 10 tracked
> domains. It works out to about $25 a month, which is less than the $348 that twelve months of
> Indie costs, so Growth is the better deal once you are staying.
### What every paid plan includes
> [card] Links & Analytics
>
> Unlimited tracking links and events, branded custom domains, first-party server-side
> tracking, UTM management, QR codes, bulk creation, and geo/device analytics.
> [card] Revenue Attribution
>
> Stripe, Paddle, Polar, Lemon Squeezy, Creem and Dodo Payments revenue sync; last-touch, first-touch and linear
> models; channel LTV; refund handling; the visitor journey.
> [card] Affiliate & Partners
>
> Unlimited partners and programmes, multi-tier network commissions, cash or credit
> rewards, the commission ledger, PayPal and Wise payout CSV exports, and white-label partner pages.
> [card] Everything else
>
> The public REST API, outbound webhooks, and the free tools (link-in-bio, QR generator,
> UTM builder). Unlimited team members are included on Growth.
## The Free tier
Free is a real, indefinite plan — not a trial. It's for trying link tracking before you
connect revenue.
| Limit | Free tier |
| - | - |
| Tracked events / month | 1,000 |
| Links (running total) | 50 |
| Workspaces | 1 |
| Attribution model | Last-touch only |
| Revenue & attribution figures | Hidden |
| Affiliate & partner programme | Locked (your own referral link only) |
Tracked events reset every month on your workspace's signup anniversary. The link cap is a
running total, not monthly. Upgrading to any paid plan lifts all of these limits at once and
reveals revenue.
## No cap on affiliate revenue
> [!NOTE]
>
> **No plan caps the affiliate revenue or commission you track.** Indie and Growth both record
> every sale, every partner and every commission, however large your programme grows. You never
> pay more because your partners sell more.
Sale revenue and partner commissions are tracked in full on every paid plan. The only things
that change between Indie and Growth are workspaces, tracked domains and team members, so you can
choose a plan on how many sites you run rather than on the volume of your programme.
## Tracked domains
A **tracked domain** is a custom domain connected to a workspace: the branded short-link or
partner-signup host you add under **Settings → Domains**. The allowance counts across all of the
workspaces you own. Indie includes **1** tracked domain; Growth includes up to **10**.
## Upgrade, downgrade or cancel
Billing is handled through **Paddle**, which acts as merchant of record (it collects tax and
issues invoices on TrackRev's behalf).
**1. Open Billing**
Go to **Settings → Billing** (or **Billing** in the sidebar).
**2. Pick a plan**
Choose **Indie** ($29 a month, one site) or **Growth** ($299 a year, up to 10 sites). Click
**Subscribe** (or **Change plan**).
**3. Complete checkout**
A Paddle overlay opens for payment. When it finishes, your workspace is upgraded
immediately — the new entitlements apply as soon as Paddle confirms.
**4. Move from Indie to Growth any time**
Starting on Indie is the low-commitment way in, and you can move up whenever you add a
second site. On Indie, **Settings → Billing** shows **Upgrade to Growth**. It switches your
existing subscription to the Growth yearly price in place: the yearly charge is taken
immediately and Paddle credits the unused part of your current Indie month against it. You
are never billed for both plans. To go from Growth back to Indie, cancel Growth (it stays
active until the end of the paid year) and subscribe to Indie.
**5. Manage the subscription later**
From **Billing**, open the customer portal to update your card, change plan, download
invoices, or cancel. Cancelling keeps your plan active until the end of the paid period,
then reverts the workspace to Free.
## Frequently asked
> [accordion] Do I need a separate plan per product?
>
> No. One subscription unlocks all of TrackRev: the affiliate program, with link tracking and
> revenue attribution built in. You never buy them separately. On Growth, that single subscription also covers up
> to 10 workspaces.
> [accordion] Which plan should I pick?
>
> Pick on how many sites you run. Is it one site with one custom domain, and you want to pay
> month to month? **Indie** is the whole product for one workspace and one tracked domain, and
> it is the low-commitment way to start. Do you manage more than one site, brand or product,
> or need more than one tracked domain? Choose **Growth**, which covers up to 10 workspaces and
> 10 tracked domains from one account, with unlimited team members included as a plus. Growth
> is $299 a year, about $25 a month, which is less than twelve months of Indie, so if you plan
> to stay, Growth is the cheaper choice. The size of your affiliate programme does not matter,
> because revenue and commission tracking are uncapped on both.
> [accordion] What is a tracked domain?
>
> A tracked domain is a custom domain connected to a workspace, such as a branded short-link
> host or a partner-signup domain you add under **Settings → Domains**. The count spans every
> workspace you own, so Indie allows one in total and Growth allows up to ten in total.
> [accordion] What happens to team members if I downgrade to Indie?
>
> Indie is a single-seat plan. Members who are already in your workspace keep their access,
> but new invitations are blocked until you are on Growth again. If you want to bring in
> teammates later, switch to Growth.
> [accordion] What happens if I go past a workspace or domain limit?
>
> TrackRev blocks the action that would exceed the limit and prompts you to upgrade. On
> Indie, creating a second workspace or connecting a second tracked domain is refused; on
> Growth, the same applies past 10. Your existing links, clicks and attribution keep working
> normally.
> [accordion] Is there a cap on affiliate revenue or commission tracked?
>
> No. Neither plan limits the affiliate revenue or commission you track, and sale revenue is
> never capped either.
> [accordion] What happens to my data if I downgrade to Free?
>
> Your links keep redirecting and clicks keep being recorded, but revenue and attribution
> figures are hidden and the event/link caps re-apply. Nothing is deleted; upgrading again
> restores full visibility.
> [accordion] Is there a free trial of paid features?
>
> There is no free trial of the paid plans. The Free tier lets you use link tracking
> indefinitely. To evaluate revenue attribution and affiliates, start **Indie** month to month
> (\$29 a month), cancel any time and keep access until the period ends, or upgrade to
> **Growth** when you are ready for the yearly plan.
# Security & privacy
Source: https://doc.trackrev.io/account/security
How TrackRev handles your data — first-party by design, read-only payment access, and a GDPR-ready architecture.
TrackRev is built first-party by design: your tracking data stays on your domain, and TrackRev
never gets write access to your payment provider. This page summarises the posture; the canonical
statements live at [trackrev.io/security](https://www.trackrev.io/security) and
[trackrev.io/privacy](https://www.trackrev.io/privacy).
## Your data stays on your domain
Tracking is **first-party and server-side**. A click hits TrackRev's server, the click is logged,
and the visitor cookie is set on **your** domain — there's no third-party tracking script in the
browser, no cross-site profiling, and no ad-network data sharing. You own the tracking domain and
its DNS.
## Read-only payment access
TrackRev connects to your payment processor with a **restricted, read-only key** — it can read
charges, checkout sessions, customers and payment intents, and nothing else. It cannot create
charges, issue refunds, move money or change settings, and it never stores the full secret key in
plain text (keys are encrypted). Revoke access any time from your processor's dashboard.
## GDPR & privacy
* The first-party architecture is GDPR-compatible by default. **You are the data controller;
TrackRev is the processor.** A DPA is available on request at
[maruf@trackrev.io](mailto:maruf@trackrev.io).
* The visitor cookie lifetime is tied to your attribution window. There's no sale of data and no ad
profiles.
* No third-party analytics or ad trackers run on the marketing site or dashboard — TrackRev
dogfoods its own first-party analytics.
## Infrastructure
TrackRev runs on **Vercel** (edge redirects) and **Supabase** (PostgreSQL, in the US region), with
workspace isolation enforced at the database layer and daily backups. Redirects are served from the
edge and tracking is written asynchronously, so a database hiccup never blocks a redirect.
> [!NOTE]
>
> Sub-processors include Stripe (PCI DSS Level 1), Vercel and Supabase. A formal SOC 2 report isn't
> available yet (it's on the roadmap); the underlying infrastructure providers are SOC 2 Type II.
## Data requests
For data-deletion requests, DPAs, or security disclosures, contact
[maruf@trackrev.io](mailto:maruf@trackrev.io). Good-faith vulnerability research is welcomed under a
safe-harbour policy.
# Team & roles
Source: https://doc.trackrev.io/account/team-and-roles
Invite teammates into a TrackRev workspace so everyone can see what's working, and give each person a role that controls what they can change.
Bring teammates into a workspace so everyone can see what's working — and control who can change
settings.
> [!NOTE]
>
> Unlimited team members are included on the **Growth** plan, which also covers up to 10 workspaces. **Indie** is a single-seat
> plan, so invitations are blocked there; members who are already in a workspace keep their access
> if you downgrade. See [Plans & billing](/account/plans-and-billing).
## Roles
| Role | Can do |
| - | - |
| **Admin** | Everything, including inviting/removing members and changing workspace settings |
| **Member** | Use the workspace and view its data; cannot change workspace-level settings |
Workspace-settings changes (domains, branding, integrations, billing) are limited to Admins —
*"Only workspace admins can change these settings."*
## Invite teammates
**1. Open Team**
Go to **Settings → Team**.
**2. Enter emails and a role**
Add one or more email addresses and choose **Member** (default) or **Admin**.
**3. Send the invitations**
Each invitee receives an email invitation link. Pending invitations are listed and can be
revoked before they're accepted.
> [!NOTE]
>
> Invitations are delivered by email and are single-use. Accepting an invitation adds the person to
> that workspace with the role you set. Revoking a pending invitation invalidates its link.
## Members across workspaces
Team membership is per workspace. Someone can be an Admin in one workspace and a Member in another,
or belong to only one. Switching workspaces changes which team a person is acting within. See
[Workspaces](/account/workspaces).
# Workspaces
Source: https://doc.trackrev.io/account/workspaces
A workspace is one brand or product in TrackRev. See what it scopes, from links and clicks to events and visitors, how to switch, and when you need another.
A **workspace** is one brand or product you're tracking. Everything you do in TrackRev happens
inside a workspace, and data never crosses between them.
## What a workspace scopes
A workspace contains all of its own:
* Links, clicks, events and visitors
* Orders and revenue attribution (model, window)
* Programmes, partners, commissions, credit grants and payouts
* Domains, branding, and integrations (payment keys, retargeting pixels, fulfilment)
* Webhooks, API keys, bio pages and team members
Your **workspace ID** is the UUID you put in the [pixel's](/getting-started/install-pixel)
`data-id`. Find it under **Settings**.
## The one-domain rule
Every own-site link and affiliate destination in a workspace must share one **registrable
domain** — the domain your pixel fires on. This keeps a workspace's clicks, visitors and revenue
reconciled to a single product. Links to sites you don't own are exempt. To track a second product
on a different domain, use a second workspace.
## Switching workspaces
Switch the active workspace from the workspace switcher at the top of the dashboard sidebar. The
whole dashboard re-scopes to the selected workspace instantly.
## Creating more workspaces
> [!NOTE]
>
> The number of workspaces you can run depends on your plan: **Free** and **Indie** are one
> workspace; **Growth** allows up to 10, so one account can manage several sites. Creating a second
> workspace on Free or Indie, or an eleventh on Growth, is refused with a prompt to upgrade
> where one is available. See
> [Plans & billing](/account/plans-and-billing).
Agencies and multi-product teams typically run one workspace per client or product, then switch
between them. Because each is fully isolated, a client only ever sees their own data.
# Commission structures
Source: https://doc.trackrev.io/affiliate/commissions
Percentage vs flat, one-time vs recurring, per-partner coupons, caps, and how the commission ledger works.
Commissions are the heart of a cash programme. TrackRev computes them from real orders, so they
reconcile with your revenue and reverse automatically on refunds.
## Commission type & rate
Set these in the programme form (cash programmes only):
| Setting | Options | Default |
| - | - | - |
| **Commission type** | Percent of sale · Flat amount per sale | Percent |
| **Commission rate** | 1–100% (percent) or a \$ amount (flat) | 20% |
> [!NOTE]
>
> Enter percentages as whole numbers — `30` means 30%. The seller can never earn more than the
> programme allows (percent is capped at 100%; in a [multi-tier](/affiliate/multi-tier) programme
> the whole chain is capped at the pool).
## Recurring commissions
Decide whether renewals keep paying:
> [card] One-time
>
> Commission on the **first sale only**. The default.
> [card] Lifetime
>
> Commission on **every renewal, forever**.
> [card] Custom (N months)
>
> Commission for a set number of renewal months (default 6).
Renewals are ingested as [orders](/revenue-attribution/orders) and inherit the original sale's
partner, so recurring commissions follow the subscription's real lifecycle. See
[Refunds & renewals](/revenue-attribution/refunds-and-renewals).
## Coupon-code tracking
Not every partner drives clicks — a podcaster or creator may only give out a code. Each
enrollment can carry two codes:
* **Coupon code** — the code TrackRev credits the partner on. When a sale uses this code, the
commission is written even with no referral-link click.
* **Referee promo code** — a discount code the partner shares with their audience (for two-sided
programmes).
Codes are uppercased and must be 3–40 characters of letters, numbers, hyphens or underscores, and
unique within a programme. Edit them per partner from the **Partners** table.
> [!TIP]
>
> Coupon tracking is the answer to *"how do I attribute a YouTube sponsor read or a podcast ad?"*
> — give that partner a unique code, connect it in your processor, and the sale credits them
> automatically.
## The commission ledger
Open **Affiliate program → Commissions** to see every commission. The table shows **When,
Partner, Source, Tier, Type, Sale, Earnings, Status**.
* **Source** — Link, Coupon (with the code), or Manual.
* **Tier** — *Direct* for the seller; *Tier N (from )* for network commissions.
* **Type** — click, lead, sale, recurring or manual.
### Commission statuses
| Status | Meaning |
| - | - |
| **pending** | Newly accrued, not yet batched |
| **eligible** | Included in an open payout batch |
| **paid** | Settled and marked paid |
| **refunded** | Reversed because the sale was refunded |
| **void** / **fraud** | Cancelled or flagged; excluded from payouts |
> [!NOTE]
>
> Commissions are **idempotent per order and partner** — re-syncing never double-credits, and a
> partner appears at most once per order (even across multiple tiers). Refunds flip a sale's
> commissions to `refunded` and back out the partner's totals automatically.
## No cap on commission tracked
No plan caps the commission you track. Indie and Growth both record every partner earning, however
large your programme grows, and sale revenue is never capped either. See
[Plans & billing](/account/plans-and-billing#no-cap-on-affiliate-revenue).
# Create an affiliate programme
Source: https://doc.trackrev.io/affiliate/create-program
Create an affiliate programme: set the commission structure, publish a branded signup page and partner portal, and run cash and credit programmes side by side.
A **programme** (called a *campaign* in the UI) defines how partners are rewarded and where they
sign up. You can run several side by side — for example one cash programme and one credit
programme. Create one from **Affiliate program → Program → New campaign**.
## Create a programme
**1. Choose a reward type**
* **Cash rewards** (default) — pay a monetary commission via your funding method.
* **Non-cash rewards** — reward partners with product credit or coupons instead of cash. See
[Credits & fulfilment](/affiliate/credits-and-fulfilment).
**2. Choose how partners are approved**
* **Review each application** (default) — applicants wait in *Pending*; commissions count once
you approve them.
* **Auto-approve instantly** — every signup is approved on the spot and starts earning from
their first click.
**3. Name it and set the signup link**
* **Program name** (required) — shown to partners on signup.
* **Signup link** — the slug for this programme's signup page (blank auto-generates from the
name).
**4. Set the destination URL**
The product partners promote — every referral link sends visitors here. It must be on your
workspace's [registrable domain](/link-tracking/overview#the-workspace-boundary) so
conversions attribute; a panel live-checks that your pixel is present on it.
**5. Configure the reward**
For **cash**, set the [commission structure](/affiliate/commissions). For **credit**, describe
the reward and its delivery amounts.
**6. Set the cookie window and minimum payout**
* **Cookie window (days)** — how long after a click a sale still credits the partner. Default
**60**.
* **Min payout (\$)** — balances below this roll over. Default **100**.
**7. Save**
Click **Create campaign**. You're taken to the affiliate overview, where your public signup
link is ready to share.
## Optional sections
The programme form also has collapsible sections for:
* **Referral link formats** — which URL styles partners can share (hosted subdomain, your custom
domain, or a TrackRev short link) and which is the default. See
[The partner portal & branding](/affiliate/partner-portal).
* **Multi-tier commissions** — pay up the recruiting chain. See [Multi-tier](/affiliate/multi-tier).
* **Two-sided referral** — give referred customers a discount code too.
* **Description & welcome message** — the pitch on the signup page and the greeting at the top of
the partner portal.
* **Payment terms & funding** — how you fund payouts (currently **Manual**; see
[Payouts](/affiliate/payouts)).
## Program-level fields at a glance
| Field | Default | Notes |
| - | - | - |
| Reward kind | Cash | Cash or non-cash (credit) |
| Approval mode | Review each application | Or auto-approve |
| Commission type | Percent of sale | Or flat amount |
| Commission rate | 20% | 1–100% for percent |
| Recurring | One-time | One-time / Lifetime / N months |
| Cookie window | 60 days | 1+ |
| Min payout | \$100 | Cash only |
| Currency | USD | USD only today |
> [!NOTE]
>
> **Deleting a campaign archives it** — commissions, enrollments and payouts are kept, and the
> slug is freed for reuse. It's a soft delete, so historical earnings are never lost.
> [card] [Next: design your commission structure](/affiliate/commissions)
>
> Percentages vs flat, recurring vs one-time, caps, and coupon tracking.
# Credit rewards & fulfilment
Source: https://doc.trackrev.io/affiliate/credits-and-fulfilment
Reward partners and referred customers with product credit delivered straight into your own backend — no cash payout.
Instead of paying cash, a **non-cash** programme rewards partners (and optionally the customers
they refer) with **product credit** — free days, AI credits, account balance — delivered
automatically into your own database. This is the model for product-led SaaS referral programmes.
## How credit programmes work
**1. Create a non-cash programme**
In the programme form, choose **Non-cash rewards** and describe the reward (e.g. *"50 credits
per referred customer"*).
**2. Define the delivery amounts**
* **Credit label** — the unit, e.g. `ai_credits` or `free_days`.
* **Referee bonus** — credit the new signup receives (0 = none).
* **Free user reward** / **Paid user reward** — what the inviter earns depending on the
referred user's tier.
**3. Connect a fulfilment backend**
Credit can only be delivered once you connect a backend (see below). Until then, grants are
recorded as *earned* but not delivered.
When a referral qualifies, TrackRev writes a **credit grant** (status `earned` → `delivered`, or
`revoked` if refunded or blocked for [self-referral](/affiliate/fraud-detection)). Grants are
idempotent, and refunds revoke them just like cash commissions.
## Fulfilment connectors
Set up delivery under **Configuration → Integrations → "5 · Credit fulfilment"**. Choose a driver
and map where credit lands:
| Connector | Notes |
| - | - |
| **Supabase** | Your **public anon key** + a one-time SQL snippet — no service-role key (see below) |
| **Postgres** | Direct SQL delivery |
| **MongoDB** | Specify database + collection |
| **Airtable** | Base + table |
| **Webhook** | Receive a signed event and apply credit yourself |
| **MySQL** / **Firestore** | Coming soon |
Config fields include the users table, the match column (how to find the user), the credit column,
and driver-specific values (database, base ID, webhook). Credentials are encrypted. Use **Test
connection** to confirm it's healthy before going live.
### Direct database connectors: allow network access
The **Postgres**, **MongoDB**, and **MySQL** connectors have TrackRev connect *out* to your database
to write the credit, so your database has to accept the connection:
* **Allow TrackRev's servers through your firewall.** TrackRev runs on serverless infrastructure with
dynamic egress IPs, so there's no single IP to allow. On **MongoDB Atlas**, add `0.0.0.0/0` to
**Network Access → IP Access List** (or use PrivateLink / a static-egress proxy if you need to
restrict it). Managed Postgres (Neon, Railway, Render, Supabase) is reachable over the public
internet by default — just don't have an IP allowlist that excludes us.
* **Use a user with write permission** on the target table/collection. A read-only connection string
will connect and **Test connection** may pass, but delivery then fails with a permission error.
If a MongoDB connector shows `broken` with a *server selection timeout* right after saving, it's
almost always the Atlas IP Access List — add `0.0.0.0/0` and test again. (Note: **Test connection**
proves TrackRev can reach and read your database; it does not exercise the exact match column, so
also confirm the first real referral lands.)
### Supabase: anon key, not service-role
TrackRev **never asks for your Supabase service-role key** — that key bypasses Row Level Security
and can touch your whole database, so a leak would be catastrophic. Instead:
1. Fill in your **users table**, **match column**, and **credit column** in the connector form.
2. Copy the **one-time SQL snippet** it generates and run it once in **Supabase → SQL Editor**. It
creates a single locked-down `security definer` function whose only ability is *"add credit to
that one column of that one table"*, and grants access to it to the public **anon** role.
3. Paste your **public anon key** (Project Settings → API) into the connector and **Test
connection**.
The credential TrackRev stores can call only that one function — it cannot read your users or modify
any other data. Even if it leaked, the worst anyone could do is add credits. Re-run the snippet if
you later change the table or columns.
> [!NOTE]
>
> Most non-technical setups use **Supabase** or **Airtable** directly; teams that want full control
> use the **Webhook** driver and apply the credit in their own code.
## The Credits dashboard
Open **Affiliate program → Credits** to monitor delivery:
* Stat cards: **Awaiting delivery**, **Delivered**, **Delivery issues**, **Blocked
(self-referral)**.
* A table of Inviter, Kind, Amount, Status and Earned-at.
## API & webhooks
Credit grants are also available programmatically:
* List grants and balances: [`GET /api/v1/credits`](/developers/endpoints/credits).
* Mark a grant delivered: [`POST /api/v1/credits/{id}/mark-delivered`](/developers/endpoints/credits#mark-a-grant-delivered).
* Subscribe to `credit.earned` and `credit.delivered` [webhooks](/developers/webhooks).
> [card] [Drive referrals from inside your product](/affiliate/referral-widget)
>
> The referral widget and API turn every signed-in user into a referrer automatically.
# Embeddable Refer & Earn dashboard
Source: https://doc.trackrev.io/affiliate/dashboard-embed
Give every user a full referral dashboard inside your product — link, clicks, signups, purchases, conversion rate and rewards.
The dashboard embed puts a complete **Refer & Earn** page inside your own app. Your users see
their personal referral link, how it's performing — clicks, signups, purchases, conversion rate —
and the credits or cash they've earned, all without leaving your product. You paste one snippet;
TrackRev renders and maintains the dashboard.
## Set it up
**1. Create a programme with rewards**
[Create a programme](/affiliate/create-program) that rewards referrers with
[credits](/affiliate/credits-and-fulfilment) (e.g. AI credits, free months) or cash
[commissions](/affiliate/commissions). The `free` / `paid` tier you pass in the snippet decides
which credit amount each user earns.
**2. Get a publishable key**
In **Settings → Developers**, create a **publishable** key (`pk_…`). It's browser-safe, and the
Developers page shows a ready-made embed snippet.
**3. Paste the snippet in your app**
Drop the script into your authenticated app, filling in the signed-in user's id, email and
tier:
```html theme={null}
```
**4. Users see their dashboard**
Each user is enrolled automatically on first view and gets their own dashboard — nothing else
to build. Theme and accent-color options let it match your brand; see the
[developer reference](/developers/dashboard-embed) for every attribute.
## What your users see
* **Their referral link**, ready to copy and share.
* **Performance over a selectable window** (7–90 days, default 30): clicks, signups, purchases and
conversion rate, with a day-by-day trend.
* **Their rewards**: credits earned, delivered and pending, or cash pending and paid out —
lifetime totals.
> [!NOTE]
>
> The embed composes with the [referral widget](/affiliate/referral-widget): the widget is a
> lightweight share card for enrolling users and spreading their link, while the dashboard embed
> is the full analytics view. Use either on its own, or the widget on high-traffic pages and the
> dashboard on a dedicated "Refer & Earn" page.
## Referrers vs affiliates
TrackRev distinguishes two kinds of partner:
* **Affiliates** join through your public partner join page and earn cash commissions — that's
the only mode a join-page partner has.
* **Referrers** are your own users, enrolled through the widget or dashboard embed, earning
[credits](/affiliate/credits-and-fulfilment).
The dashboard embed can bridge the two: let your credit-earning users **upgrade to affiliate
in-product**, without ever visiting the join page or leaving your app.
To enable it, open your campaign in **Affiliates → Program** and turn on **Allow customers to
become affiliates** (in the credit-rewards section — the option only applies to credit
campaigns; cash campaigns already pay cash, so no toggle is shown). Turning it on reveals the
**affiliate commission** fields: set the percent of sale (or flat amount per sale) that switched
affiliates earn. Once saved, users see a choice inside the embed: keep earning credits, or
switch to cash.
What changes for a user who switches:
* Their **future** conversions earn cash at the affiliate commission you set instead of credits —
everything they've already earned in credits is kept.
* They get an embedded portal view: cash balance, recent commissions, payout-method setup and
payout history.
* Payouts run through your normal [payout flow](/affiliate/payouts), and your program's minimum
payout threshold applies.
* The switch is reversible — they can go back to earning credits at any time.
> [!NOTE]
>
> Only render the snippet to the signed-in user it belongs to — TrackRev trusts the user identity
> your page provides, under your API key, and in affiliate mode that includes the payout email
> the user sets. Details in the [developer reference](/developers/dashboard-embed).
# Fraud detection
Source: https://doc.trackrev.io/affiliate/fraud-detection
How TrackRev catches self-referral abuse in credit programmes, and the commission controls for cash programmes.
The most common affiliate abuse is **self-referral** — someone referring themselves to farm a
signup reward. For credit (non-cash) programmes, TrackRev runs automatic self-referral checks and
blocks grants that look self-dealt.
## Self-referral checks (credit programmes)
When a referral qualifies, TrackRev compares the referee against the inviter. If any of these
match, the credit grant is written as **revoked** with a recorded reason:
| Reason | What it catches |
| - | - |
| **Same browser marker** | The referee's browser holds the inviter's local marker — the strongest signal. |
| **Device match** | Identical device fingerprint on both sides. |
| **Same IP, different device** | Same IP address but two different devices — the classic roommate/NAT pattern. |
> [!NOTE]
>
> A plain IP match with no device information is deliberately **not** blocked — it's too noisy on
> shared office and NAT networks. Blocks require a stronger signal than IP alone.
Blocked grants appear on the **Credits** page under *"Blocked (self-referral)"* with a
human-readable reason such as *"Same browser as inviter"* or *"Same IP as inviter, different
device."* An admin can override a hard block if it's a legitimate case (e.g. genuine housemates).
## Controls for cash programmes
Cash commissions don't run the credit self-referral engine, but you have direct control via
commission statuses and approval:
* Use **Review each application** approval mode so you vet who joins before they can earn.
* Mark a suspicious commission **void** or **fraud** to exclude it from payouts.
* **Refunds** automatically reverse commissions, so a partner can't profit from a refunded sale.
> [!TIP]
>
> For programmes that pay a signup or lead reward (not just a sale), keep approval manual and
> watch the Customers list for patterns — a cluster of signups from one source that never convert
> is worth a closer look.
# Messaging & email kits
Source: https://doc.trackrev.io/affiliate/messaging-and-email-kits
Chat one-to-one with your partners and give them ready-made email templates that carry their own tracking link.
Keeping partners active is mostly about communication. TrackRev gives you a direct message channel
to each partner and reusable email kits they can personalise and send from their own tools.
## Messages
Open **Affiliate program → Messages** to chat one-to-one with any partner in your programme. It's a
simple thread list plus a conversation pane. Unread replies raise a red badge on the Messages nav
item.
Partners reply from their own portal at **Messages**, where their threads are grouped by brand — so
a partner who works with several merchants keeps each conversation separate.
## Email kits
Email kits are templates you write once and partners send themselves — each partner gets a copy
with **their own tracking link pre-embedded**.
**1. Create a kit**
Go to **Affiliate program → Email Kits → New** and write the campaign (name, subject, body).
**2. Partners grab it from their portal**
Each partner opens the kit, sees it personalised with their referral link, and sends it from
their own email tool.
> [!NOTE]
>
> **TrackRev never sends email on your behalf.** Email kits are copy-and-send templates — partners
> send from their own tools, which keeps deliverability and compliance with the sender. The kit
> just guarantees every partner uses a correctly-tracked link.
> [!TIP]
>
> Pair email kits with a [welcome message](/affiliate/create-program#optional-sections) on the
> programme and an occasional broadcast via Messages to keep newly-approved partners active in
> their first week — the period when most affiliate programmes lose people.
# Assisted migration
Source: https://doc.trackrev.io/affiliate/migration/assisted
For PartnerStack, Impact, ShareASale/Awin, Post Affiliate Pro, and Everflow — send us what you have and we'll map and load it.
Some platforms don't give merchants a self-serve export of their partner data. Networks in
particular (Impact, ShareASale/Awin) hand it over as reports whose shape depends on your contract,
and PartnerStack, Post Affiliate Pro, and Everflow all need per-account mapping before the data
means anything.
For those, use **Contact support** next to the platform in **Settings → Migration**.
## What we need
**1. Your partner list**
Whatever export the platform gives you — partner names, emails, referral codes, and status.
**2. Your terms**
Commission rates, and which partners are on non-standard ones. If your programme has tiers,
say which partner is in which — we'll build them as [groups](/affiliate/commissions).
**3. Outstanding balances**
What you still owe each partner, so their first TrackRev payout is correct.
**4. Whether codes must be preserved**
Tell us if partners have published links you can't afford to break — it changes the order we
do things in.
## What happens next
1. You submit the request from **Settings → Migration** with a reply-to email. It's recorded on
your workspace and appears in your **Import history**.
2. We reply within one business day with exactly which files we need.
3. We map and load the data into a campaign you've set up, and send you the same per-row result
summary a self-serve import produces.
4. You review the imported affiliates before you switch your signup link over.
> [!NOTE]
>
> Assisted migrations are free on every paid plan. The import itself is the same code path as the
> self-serve one — the difference is who does the column mapping.
## Prefer to do it yourself?
If you can get a CSV of partners out of the platform — even a partial one — the self-serve
importer takes it. Choose **Any other platform** and map the columns yourself; see
[Migrate from any other platform](/affiliate/migration/other-platforms).
> [card] [Back to the migration overview](/affiliate/migration/overview)
>
> The full before/after checklist for moving a programme.
# Migrate from FirstPromoter
Source: https://doc.trackrev.io/affiliate/migration/firstpromoter
Move your FirstPromoter promoters, ref IDs (the ?fpr= value), promo codes and unpaid balances to TrackRev from a CSV, so promoters keep their codes.
FirstPromoter calls affiliates **promoters** and their referral code a **ref ID** (the `?fpr=`
parameter). Both come across.
## Export your promoters
**1. Open your campaign's promoter list**
In FirstPromoter, go to the campaign you're moving and open its **Promoters** list.
**2. Filter if you need to**
Leave it on **All** to move everyone, or filter first — the export follows your filter.
**3. Download as CSV**
Use the export/download action on the list. Keep the **ref ID** and **promo code** columns:
they're what preserve links and coupon attribution.
> [!NOTE]
>
> Running several FirstPromoter campaigns? Export them one at a time and import each into its own
> TrackRev campaign — that keeps each campaign's terms attached to the right affiliates.
## Import it
In TrackRev, go to **Settings → Migration**, pick **FirstPromoter**, and upload the file.
The mapping is auto-detected:
| FirstPromoter column | TrackRev field |
| - | - |
| `email` | Email — the affiliate's identity |
| `name` / `first_name` + `last_name` | Name |
| `ref_id` / referral token | Tracking parameter → their referral link slug |
| `promo_code` | Coupon code |
| `state` / status | Approval status |
| `paypal_email` | PayPal email |
| `current_balance` / unpaid earnings | Carried-over balance |
| `sales_volume`, `customers_count`, `referrals_count` | Opening revenue / sales / leads |
Anything auto-detection misses you re-point yourself in the preview step.
## Keeping `?fpr=` links working
FirstPromoter links look like `https://yourapp.com/?fpr=sarah`. With **Keep their existing
referral codes** on, `sarah` becomes the affiliate's TrackRev link slug, so the same code follows
them across.
The `fpr` **parameter** itself is FirstPromoter's. On TrackRev the affiliate's link is
`yourdomain.com/sarah` (or your [custom domain](/link-tracking/custom-domains)), and coupon codes
keep working regardless of link format — which is why bringing promo codes across matters as much
as the codes themselves.
> [!WARNING]
>
> Turn off the FirstPromoter script only after your TrackRev pixel is live and recording sales, or
> you'll have a window with no attribution on either side. See
> [Install the pixel](/getting-started/install-pixel).
## What doesn't transfer
* Individual historical referrals and commission rows — settle outstanding payouts in
FirstPromoter, then let TrackRev's ledger start at go-live.
* Promoter tax forms — collect them again from the [partner portal](/affiliate/tax-forms).
* Campaign assets and email templates — rebuild them in
[email kits](/affiliate/messaging-and-email-kits).
> [card] [Back to the migration overview](/affiliate/migration/overview)
>
> The full before/after checklist for moving a programme.
# Migrate from any other platform
Source: https://doc.trackrev.io/affiliate/migration/other-platforms
Import affiliates from Tapfiliate, Dub, LeadDyno, Refersion, Partnero, Trackdesk, Reditus, UpPromote, GrowSurf — or any CSV at all.
The importer isn't limited to the platforms listed by name. Any CSV with an email column can be
imported — you map the columns yourself in the preview step, and the mapping updates the preview
live so you can see you've got it right before anything is written.
Presets exist for **Tapfiliate**, **Dub**, **LeadDyno**, **Refersion**, **Partnero**,
**Trackdesk**, **Reditus**, **UpPromote**, and **GrowSurf**. For anything else, choose
**Any other platform**.
## The only required column
**Email.** Everything else is optional — an affiliate with just an email imports fine and gets a
generated referral link.
## Columns you can map
| Field | What it does |
| - | - |
| Email | The affiliate's identity. Required |
| Name (or First + Last name) | Display name. Falls back to the email handle |
| Tracking parameter | Their old referral code — re-used as their TrackRev link slug |
| Coupon code | Sales using this code credit the affiliate |
| Referee code | The discount code they share with their audience |
| Status | `active`/`approved` → approved, `pending` → pending, `rejected`/`banned` → rejected |
| PayPal email | Saved on the partner for payouts |
| Country | Two-letter code |
| Their ID | The affiliate's id on the old platform — makes re-running the file safe |
| Joined date | Preserves how long they've been a partner |
| Clicks, leads, sales, revenue | Opening balances shown on their card |
| Unpaid earnings | Written as a carried-over commission for your next payout |
## File format
* **CSV**, up to 1,000 rows and 900 KB per file. Split larger programmes and import twice.
* Comma, semicolon, or tab separated — the delimiter is detected from the header row.
* Quoted fields, escaped quotes, and newlines inside quotes are all handled, so an export with a
multi-line address column won't shift your columns.
* Amounts can carry currency symbols and either decimal convention: `$1,234.56` and `1.234,56`
both read as 1234.56.
> [!TIP]
>
> Not sure what your export looks like? Upload it anyway. Nothing is written until you confirm the
> preview, and the preview names every row that would be skipped and why.
## Download a template
The **CSV format requirements** panel in **Settings → Migration** has a **Download template CSV**
link. Its header row is:
```
email,name,tracking_parameter,coupon,status,paypal_email,country,unpaid_earnings,clicks,sales,revenue,created_at
```
Use it as-is if you're building the file by hand — every column is auto-detected.
## Rows the importer skips
| Reason | What to do |
| - | - |
| No email, or an email that isn't valid | Fix the row and re-upload — re-runs skip anyone already imported |
| The same email twice in one file | The first row wins; merge the duplicates in your export |
| Already an affiliate on this campaign | Nothing — they're already here, and the import leaves them untouched |
Codes that clash (a referral slug already in use, a coupon already assigned) never skip the row.
The affiliate imports, the clashing value is dropped, and the change is listed on the results
screen.
> [card] [Back to the migration overview](/affiliate/migration/overview)
>
> The full before/after checklist for moving a programme.
# Migrate from another platform
Source: https://doc.trackrev.io/affiliate/migration/overview
Import your affiliates, their referral codes, coupon codes, and unpaid balances from FirstPromoter, Rewardful, Tolt, and other affiliate platforms.
Moving an affiliate programme is mostly one job: getting your affiliates here with the links
they've already shared still working. TrackRev does that from a CSV export of your current
platform — no API keys, no re-onboarding your partners.
> [card] [Settings → Migration](https://app.trackrev.io/affiliates/settings/migration)
>
> The import lives under **Settings → Migration** in either dashboard.
## What comes across
| Data | Imported | Notes |
| - | - | - |
| Affiliates (name, email) | ✅ | Email is the identity — it's the only required column |
| Referral codes | ✅ | Re-used as their TrackRev link slug when the slug is still free |
| Coupon codes | ✅ | Both their attribution coupon and their referee discount code |
| Approval status | ✅ | Approved stays approved, pending stays pending |
| PayPal / payout email | ✅ | Saved on the partner for payout runs |
| Country and join date | ✅ | Join date preserves how long they've been with you |
| Lifetime clicks, leads, sales, revenue | ✅ | Carried as opening balances on their card |
| Unpaid balance | ✅ | Written as one carried-over commission, ready for your next payout |
| Historical individual orders | ✗ | Sales history stays in your old tool — TrackRev's ledger starts at go-live |
> [!NOTE]
>
> Opening balances are historical context, not attribution. TrackRev recomputes commissions from
> your own charges, so everything **after** the import is calculated from real revenue.
## Before you import
**1. Connect your revenue**
TrackRev commissions come from actual charges, so
[connect your payment processor](/revenue-attribution/connect-stripe) first.
**2. Re-create your terms**
In [Create a programme](/affiliate/create-program), match your existing commission type, rate,
recurring policy, and **cookie window**. Affiliates you import join this campaign.
**3. Set up groups (optional)**
If your old platform had tiers with different rates, create matching
[groups](/affiliate/commissions) first — the import can drop everyone into one.
## Run the import
**1. Export from your current platform**
Pick your platform in the **Migration** list to see exactly where its export lives.
**2. Upload the CSV**
Drop the file in as-is. Up to 1,000 affiliates per file — split larger programmes and run the
import twice.
**3. Check the column mapping**
TrackRev auto-detects the columns from the platform you chose. Anything it got wrong (or
couldn't find) you re-point yourself from a dropdown, and the preview updates live.
**4. Choose what to bring across**
Four switches: keep referral codes, keep coupon codes, carry unpaid balances, and approve
everyone on import.
**5. Confirm**
The preview shows every row, including the ones that will be skipped and why. Import writes
the affiliates, their referral links, and any carried balances in one go.
## Keeping existing links working
Your affiliates have already shared links. Two things preserve them:
1. **Keep their referral codes.** The import re-uses each affiliate's old code as their TrackRev
link slug, so `sarah` stays `sarah`. If a code is already taken in your workspace, that
affiliate gets a fresh link and the import tells you which ones.
2. **Repoint the domain.** Once you've imported, point the domain (or subdomain) your old links
used at TrackRev — see [Custom domains](/link-tracking/custom-domains).
A code that can't be reused never fails the affiliate: they import with a new link, and you'll see
the change listed on the results screen.
## Re-running an import
Imports are safe to re-run. An affiliate who's already on the campaign is **skipped**, never
overwritten — so a second upload of a slightly newer export adds the new people without touching
live coupon codes or balances on the existing ones.
## Per-platform guides
> [card] [FirstPromoter](/affiliate/migration/firstpromoter)
> [card] [Rewardful](/affiliate/migration/rewardful)
> [card] [Tolt](/affiliate/migration/tolt)
> [card] [Any other platform](/affiliate/migration/other-platforms)
> [card] [We'll do it for you](/affiliate/migration/assisted)
## After the import
**1. Tell your affiliates**
They sign in to the [partner portal](/affiliate/partner-portal) with the same email — no
password to set up front. Use [messaging](/affiliate/messaging-and-email-kits) to send the
portal link to everyone at once.
**2. Check carried balances**
Carried-over balances appear as **manual** commissions in your next
[payout run](/affiliate/payouts). Review them before you approve the batch.
**3. Collect tax forms**
[Tax forms](/affiliate/tax-forms) don't transfer between platforms — affiliates fill theirs in
from the portal.
**4. Cut over**
Keep the old tool read-only for a short window to reconcile in-flight referrals, then repoint
your signup link and switch off its tracking script.
# Migrate from Rewardful
Source: https://doc.trackrev.io/affiliate/migration/rewardful
Move your Rewardful affiliates, link tokens (the ?via= value), coupon codes and unpaid balances to TrackRev, so every affiliate keeps the same code.
Rewardful identifies an affiliate's link by its **token** — the `?via=` value. Import it and your
affiliates keep the same code on TrackRev.
## Export your affiliates
**1. Open Affiliates**
In Rewardful, open the campaign you're moving and go to its **Affiliates** list.
**2. Export as CSV**
Use the export action to download the list.
**3. Keep the token column**
The token is what makes `?via=` links portable — don't strip it from the file.
## Import it
In TrackRev, go to **Settings → Migration**, pick **Rewardful**, and upload the file:
| Rewardful column | TrackRev field |
| - | - |
| `email` | Email — the affiliate's identity |
| `first_name` + `last_name` | Name |
| `token` | Tracking parameter → their referral link slug |
| `coupon` | Coupon code |
| `state` | Approval status |
| `paypal_email` | PayPal email |
| `visitors`, `leads`, `conversions` | Opening clicks / leads / sales |
| unpaid earnings / balance | Carried-over balance |
If your export splits names across two columns, both are mapped and joined. If it has one `name`
column instead, that's mapped directly.
## Keeping `?via=` links working
A Rewardful link is `https://yourapp.com/?via=sarah`. With **Keep their existing referral codes**
on, the token `sarah` becomes the slug of the affiliate's TrackRev link, so the code an affiliate
has printed in their newsletter, video description, or blog post is still theirs.
Where a token can't be reused — it's already taken in your workspace, or it isn't a valid link
slug — that affiliate imports with a freshly generated link and the results screen lists exactly
which ones changed, so you can tell them.
## Commission terms
Rewardful's per-affiliate overrides don't come across as rules; TrackRev models bands rather than
per-person rates. Recreate them as [groups](/affiliate/commissions) before importing and select
the group in the import step — every affiliate in the file joins it, and changing the band's terms
later updates all of them at once.
## What doesn't transfer
* Referral and commission history — reconcile and pay out in Rewardful before cutting over.
* Stripe coupon objects — the codes are imported as attribution codes; the coupons themselves
still live in [your Stripe account](/affiliate/commissions).
* Affiliate tax forms and payout details beyond the PayPal email.
> [card] [Back to the migration overview](/affiliate/migration/overview)
>
> The full before/after checklist for moving a programme.
# Migrate from Tolt
Source: https://doc.trackrev.io/affiliate/migration/tolt
Move your Tolt affiliates, referral links, coupon codes and unpaid balances to TrackRev from a CSV. Referral codes are pulled out of Tolt links for you.
Tolt exports affiliates with their referral link rather than a bare code. TrackRev pulls the code
out of the link for you — `https://yourapp.com/?ref=sarah` and `https://tolt.io/r/sarah` both
resolve to `sarah`.
## Export your affiliates
**1. Open Affiliates**
In Tolt, open the programme you're moving and go to its **Affiliates** (or **Partners**) list.
**2. Export as CSV**
Download the list. If the export lets you choose columns, include the referral link/code and
any coupon or discount code.
## Import it
In TrackRev, go to **Settings → Migration**, pick **Tolt**, and upload the file:
| Tolt column | TrackRev field |
| - | - |
| `email` | Email — the affiliate's identity |
| `name` / `first_name` + `last_name` | Name |
| referral link or code | Tracking parameter → their referral link slug |
| `coupon` / discount code | Coupon code |
| `status` | Approval status |
| `paypal_email` | PayPal email |
| unpaid / available balance | Carried-over balance |
## Link formats
TrackRev accepts any of these in the tracking-parameter column and stores the code:
| In your file | Imported as |
| - | - |
| `sarah` | `sarah` |
| `https://yourapp.com/?ref=sarah` | `sarah` |
| `https://tolt.io/r/sarah` | `sarah` |
| `?ref=sarah` | `sarah` |
Codes that aren't valid link slugs (spaces, symbols) are normalised where possible, and otherwise
the affiliate gets a new link — listed on the results screen so you know who to notify.
## What doesn't transfer
* Referral and commission history — settle balances in Tolt, then start TrackRev's ledger at
go-live. The **unpaid** total does come across as a carried-over commission.
* Programme assets and affiliate-facing copy — rebuild those in
[branding](/affiliate/partner-portal) and [email kits](/affiliate/messaging-and-email-kits).
> [card] [Back to the migration overview](/affiliate/migration/overview)
>
> The full before/after checklist for moving a programme.
# Multi-tier & network commissions
Source: https://doc.trackrev.io/affiliate/multi-tier
Pay partners on the sales of the partners they recruit, with a pool that can never mathematically overpay.
Multi-tier commissions let a partner earn not just on their own sales, but on the sales of
partners they bring in — a network that grows itself. TrackRev's model is designed so the **total
paid across an entire chain can never exceed the pool you set**, no matter how deep it goes.
## Turn it on
In the programme form (cash programmes only), open the **Multi-tier commissions** section and
enable it. Configure:
| Setting | Meaning | Default |
| - | - | - |
| **Total pool** | Max share of a sale paid across the entire chain, combined | 30% |
| **Tier 1 rate** | What the partner who made the sale earns | 10% |
| **Min level payout** | Stop paying up the chain once a level rounds below this | \$1 |
| **Max levels** | Safety cap on chain depth (1–50) | 8 |
| **Auto-enrol every customer** | Give each buyer their own referral link automatically | On |
A live **decay preview** shows the rate and payout at each level for a sample sale.
## How the maths works
Each level up the chain earns a decaying share:
* `decay ratio = 1 − (tier 1 rate ÷ total pool)`
* `rate at level N = tier 1 rate × decay ratio^(N−1)`
Because the infinite series converges exactly to the **total pool**, the chain can never pay out
more than the pool you set — the seller earns the most, and each level above earns geometrically
less until the dollar floor or level cap stops it.
> [!NOTE]
>
> With the defaults (10% tier-1, 30% pool), the direct seller earns 10%, their recruiter \~6.7%,
> the next level \~4.4%, and so on — summing toward 30% but never exceeding it.
## Auto-enrolling customers
With **Auto-enrol every customer** on, every buyer silently gets their own referral link placed
under the partner who sold to them. This turns happy customers into a self-expanding referral
network without them having to opt in — the essence of product-led referrals.
## The Network dashboard
Open **Affiliate program → Network** to see the tree in action:
* Stat cards: **Affiliates in tree**, **Active (have sold)**, **Deepest chain**, **Auto-enrolled
customers**.
* A revenue-mix card, a list of network sales, and the indented **Referral tree**.
Network commissions carry the actual seller as their source, and the first time a partner earns
passively from their downline, a `partner.first_commission` webhook fires (see
[Webhooks](/developers/webhooks)).
> [!NOTE]
>
> Banned or rejected partners in the middle of a chain drop out of the payout but don't sever the
> chain — the levels above them still earn.
# Affiliate & Partners overview
Source: https://doc.trackrev.io/affiliate/overview
Run your SaaS affiliate program with no limit on tracked revenue: recurring commissions, a white-label partner portal, multi-tier networks and payout exports.
TrackRev is SaaS affiliate software for indie hackers and small SaaS teams: **run your SaaS
affiliate program with no limit on tracked revenue**. It's a full affiliate and partner
platform, the alternative to Rewardful, FirstPromoter, Tolt and Tapfiliate, with the link
tracking and revenue attribution built in. Commissions are computed from the **same orders** as
your attribution, so every partner click is tied to the real charge it produced, a refund
reverses a commission automatically and every number reconciles.
## What you can run
> [card] Cash or credit programmes
>
> Pay partners a cash commission, or reward them (and referred customers) with product credit
> delivered into your own backend.
> [card] Recurring & one-time
>
> Commission the first sale, every renewal for life, or a fixed number of months.
> [card] Multi-tier networks
>
> Pay partners on the sales of the partners they recruit, with a mathematically-capped pool.
> [card] Coupon & link tracking
>
> Attribute sales by referral link *or* by the partner's own coupon code — for podcasts and
> creators with no click.
> [card] White-label portal
>
> A branded partner portal and signup page on your subdomain or custom domain, under your logo
> and colours.
> [card] Payout batches & exports
>
> Batch what's owed, export PayPal and Wise CSVs, collect tax forms, and mark paid with a
> reference.
## The two sides
TrackRev has a **merchant** side (you, running the programme, in the dashboard) and an
**affiliate** side (your partners, in their own portal).
> [card] [For merchants](/affiliate/create-program)
>
> Create a programme, set commissions, recruit and approve partners, run payouts.
> [card] [For affiliates](/partner-portal/for-affiliates)
>
> How your partners sign up, grab their links, and get paid.
## Switching to the affiliate side
In the dashboard sidebar, use the **context switcher** at the top to toggle between **Links &
analytics** and **Affiliate program**. The affiliate context has its own navigation: Overview,
Analytics, Network, Partners, Messages, Email Kits, Customers, Commissions, Payouts, Program and
Configuration.
## How a partner sale becomes a commission
**1. A partner shares their referral link (or coupon)**
Each approved partner gets a unique referral link (channel `affiliate`) and, optionally, a
coupon code.
**2. A referred visitor buys**
The sale is attributed to the partner by their link's click, or by their coupon code on the
charge.
**3. A commission is recorded**
TrackRev writes a commission — the partner's cut — on the ledger, in `pending` status. In a
multi-tier programme, their upline earns a decaying share too.
**4. You pay out**
Batch commissions on your schedule, export the PayPal or Wise CSV, pay from your own account and
mark them paid. Refunds reverse commissions automatically.
> [!NOTE]
>
> The affiliate programme is included on **every paid plan**. The Free tier can create one
> programme and share its own link; invites, payouts, branding and email kits are paid features.
> No plan caps the affiliate revenue or commission you track, so your programme can grow without
> moving you up a tier. See [Plans & billing](/account/plans-and-billing).
# The partner portal & branding
Source: https://doc.trackrev.io/affiliate/partner-portal
White-label your signup page and partner portal under your logo, colours, subdomain or custom domain.
Your partners get a full portal to track links, sales and payouts — and you can put your brand on
all of it. This page covers the **merchant** side: branding, signup URLs and link formats. For
what partners actually see, read [For affiliates](/partner-portal/for-affiliates).
## Brand your affiliate pages
Go to **Affiliate program → Configuration → Branding** to set:
> [card] Affiliate address
>
> One card, two ways to set it: a hosted subdomain (`acme.trackrev.io`, 2–40 lowercase
> characters, no DNS) or your own domain. It names the live one and lets you rename the
> subdomain in place.
> [card] Logo & colour
>
> Upload a logo (PNG/JPG/SVG/WebP, up to 1 MB) and set an accent colour (a hex value like
> `#e63e2e`). These brand the signup page, partner login and the whole portal.
The signup landing page, partner login and portal all render your logo, colour and name — even
the browser tab title and favicon. The portal footer shows a small *"Powered by TrackRev."*
## Signup URLs
Your programme's signup page is reachable at several URLs, depending on what you've configured:
| URL | When |
| - | - |
| `https://.trackrev.io/` | Your homepage programme on the hosted subdomain |
| `https://.trackrev.io/` | A specific programme by slug |
| `https:///join` | On a connected custom domain |
| `https:///join/` | A specific programme on your domain |
| `https://trackrev.io/` | A global short fallback |
If you run several programmes, pin which one your subdomain homepage shows from the **Programs &
signup links** card (the "Homepage" pin).
## Referral link formats
In the programme form's **Referral link formats** section, choose which URL styles partners may
share and which is the default:
* **Hosted subdomain** — `acme.trackrev.io/yourname`
* **Your domain** — `go.yourbrand.com/yourname`
* **TrackRev short link** — `trackrev.io/r/yourname`
Only formats you've actually configured appear (never a dead link), and partners always keep at
least one — to switch formats, tick the one you want before unticking the last one you have.
Every partner link carries `channel=affiliate`, `utm_source=partner`, `utm_medium=affiliate`.
The addresses themselves aren't edited here — this section only picks which of them partners are
offered. Use the **Rename this subdomain** and **Manage your domains** links beside each format to
change the hosted address (`contoso.trackrev.io` → `partners.trackrev.io`) or connect a different
domain. Both live under **Configuration → Branding → Affiliate address**, which also shows which
of the two affiliates currently see.
> [!WARNING]
>
> Renaming your subdomain changes every hosted link at once: signup, portal and every partner
> referral link already shared on the old address stop resolving. Rename early, or keep the old
> address if partners are actively promoting it.
Hosted subdomains are first-come, first-served across all of TrackRev: each one can belong to only
one workspace, and a name another workspace already uses — or one of our reserved names (`app`,
`www`, `api`, `partner`, `support`, …) — is rejected with *"That subdomain is already taken."*
## Custom domain for the portal
Add a custom domain under **Configuration → Domains** (same flow as
[custom tracking domains](/link-tracking/custom-domains)). A verified custom domain serves your
signup pages at `/join` and takes priority over the subdomain.
> [!NOTE]
>
> Custom domains currently serve link slugs and the `/join` signup pages. The signed-in **partner
> portal** is served on your hosted `*.trackrev.io` subdomain, where it's scoped to your workspace
> so a partner who works with several brands only sees your data.
# Payouts
Source: https://doc.trackrev.io/affiliate/payouts
See exactly what each partner is owed, batch payouts, export PayPal or Wise CSVs, settle through any payment method, then mark partners paid in TrackRev.
TrackRev tracks exactly what each partner is owed and helps you pay it. Today payouts are
**manual-funded** — TrackRev totals the balances and generates the files; you settle through your
own PayPal, Wise, bank or other rail, then mark each partner paid. One-click automatic payouts are
on the roadmap.
## How payouts work
**1. Run the month-end batch**
On **Affiliate program → Payouts**, create a batch. TrackRev groups every un-batched commission
by partner and creates one payout row per partner who has cleared the programme's **minimum
payout** (default \$100). Balances below the minimum roll over to next time.
**2. Export or read payment details**
* **PayPal or Wise partners** — export the matching CSV and upload it to PayPal's *Pay multiple
people* or Wise's *Batch Payments*.
* **Wire / ACH / WebMoney / Other** — read each partner's payment details from the table and
settle outside the platform.
**3. Settle the money**
Pay through your chosen rail.
**4. Mark paid**
Click **Mark paid** on each row and optionally record the rail's confirmation reference. The
partner's linked commissions close to `paid`.
## Payout methods
Partners choose how they want to be paid (from the methods your programme accepts):
| Method | CSV export | Notes |
| - | - | - |
| **PayPal** | ✅ (`Email, Amount, Currency, Note`) | For PayPal *Pay multiple people* |
| **Wise** | ✅ (`Name, Amount, Currency, Email address, Payment reference`) | For Wise *Batch Payments* |
| **Payoneer** | Manual | Settle outside, read details from the row |
| **Wire transfer** | Manual | Bank details on the row |
| **ACH** | Manual | Bank details on the row |
| **WebMoney** | Manual | Wallet ID on the row |
| **Other** | Manual | Freeform details |
> [!NOTE]
>
> Partners with incomplete payment details are flagged *"Payment details incomplete — excluded
> from this batch"* and left out until they finish their [portal settings](/partner-portal/for-affiliates#settings-and-payouts).
## The Payouts page
Two tabs, each with a count badge:
* **Ready to Pay** — open batches (pending + processing).
* **History** — closed batches (paid / failed / canceled), with paid date and reference.
Columns include Period, Partner (with method chip), Payment details, Amount, Fee and Status
(pending / processing / paid / failed / canceled).
## Funding methods
The programme's **funding method** is currently **Manual** — *"You pay each partner yourself.
TrackRev just tracks who's owed what and shows you a CSV."* Stripe invoice, one-click PayPal and
auto-charge-card funding are shown as coming soon.
> [!TIP]
>
> Collect [tax forms](/affiliate/tax-forms) before your first payout run — US tax rules require a
> W-9 or W-8 on file, and the Partners table shows each partner's tax-form status at a glance.
# Recruit & approve partners
Source: https://doc.trackrev.io/affiliate/recruiting
Grow your affiliate programme: share your public signup link, invite partners directly, and choose whether applications are auto-approved or reviewed.
There are two ways partners join your programme — they apply through your public signup page, or
you invite them directly. Either way you control whether they're auto-approved or reviewed.
## Your public signup link
Every programme has a shareable signup link, shown on the **Partners** page and the affiliate
**Overview**. Share it anywhere — your footer, your customer emails, a "become an affiliate"
page. It resolves to a branded, conversion-optimised signup page (see
[The partner portal & branding](/affiliate/partner-portal)).
Depending on your approval mode, the page tells partners either that *"signups are approved
automatically and start earning immediately"* or that *"new applicants land in Pending for your
approval."*
## Invite a partner directly
**1. Open Partners → invite**
On **Affiliate program → Partners**, use **Or invite a partner directly**.
**2. Fill in their details**
Email (required), name, an optional custom slug, and optional coupon codes.
**3. Send**
TrackRev creates the partner and a **pending** enrollment with a unique referral link. Approve
them to make the link live.
## Approve or reject applications
When a programme reviews applications, new signups land in a **Pending review** section on the
Partners page.
**1. Review the applicant**
Each row shows their name/email and *"Promotes on: …"* — the answer they gave to *"Where will
you promote?"*
**2. Approve or reject**
* **Approve** activates their referral link and starts crediting their sales.
* **Reject** declines the application (they can re-apply later).
> [!NOTE]
>
> Rejected or archived partners can re-apply as a fresh application. **Banned** partners cannot
> re-join — their signup shows *"This email can't join the program."*
## The Partners table
Active partners appear in a table with: **Partner** (name/email, tax-form badge, where they
promote), **Campaign** (if you run several), **Referral link**, **Coupon**, **Ref. code**,
**Clicks**, **Sales**, **Revenue** and **Earned**. Coupon and referee codes are editable inline.
## Customers your partners referred
The **Customers** page auto-populates from partner-attributed sales — nothing to set up. It shows
each referred customer, who referred them, their orders, revenue, commission and first/last order
dates. Click a customer to open their [visitor journey](/revenue-attribution/visitors).
> [card] [Ready to pay?](/affiliate/payouts)
>
> Batch what your partners are owed and settle it.
# Referral credits with MongoDB
Source: https://doc.trackrev.io/affiliate/referral-credits-mongodb
Set up a product-credit referral programme when your users live in MongoDB: connect the collection, then enroll referrers and report signups through the API.
This is the complete, MongoDB-specific walkthrough for a **credit** referral programme: your
referrers earn in-product credit, and TrackRev writes that credit straight into your `users`
collection. Nothing here is Mongo-only except **Half 1** — the API calls in **Half 2** are the same
for every database.
> [!NOTE]
>
> There are two halves that must agree. The **API calls** create the credit; the **MongoDB connector**
> delivers it into your collection. The value that ties them together is `external_user_id`.
Throughout, assume your users look like this:
```js theme={null}
// database: "production", collection: "users"
{ _id: ObjectId("66f…"), email: "alice@example.com", credits: 0 }
```
## Half 1 — Connect MongoDB (delivery, one time)
Open **Configuration → Integrations → Credit fulfilment**, choose **MongoDB**, and fill in:
| Field | Example | What it is |
| - | - | - |
| Connection string | `mongodb+srv://user:pass@cluster.mongodb.net` | Use a database user with **write** access |
| Database name | `production` | |
| Users table | `users` | your **collection** name |
| **Match column** | `_id` | the field `external_user_id` is compared against |
| Credit column | `credits` | numeric field credits are added to |
> [!WARNING]
>
> **Allow network access.** TrackRev connects from serverless functions with no fixed IP. On **MongoDB
> Atlas → Network Access → IP Access List**, add `0.0.0.0/0` (or use PrivateLink / a static-egress
> proxy). Without it, saving connects to nothing and **Test connection** fails with a *server selection
> timeout*.
Then click **Test connection** — it should go healthy. (Test proves TrackRev can reach and read your
database; it does not exercise the match column, so also confirm the first real referral lands.)
### The one rule that makes it work
Whatever you send as **`external_user_id`** in the API **must equal the value stored in your
`match_column`**. Pick one of these and stay consistent:
> [card] Match on \_id
>
> Set **Match column** to `_id` and enroll users with their Mongo `_id` string as
> `external_user_id`. TrackRev matches `{ _id: ObjectId(external_user_id) }`.
> [card] Match on email
>
> Set **Match column** to `email` and enroll users with their email as `external_user_id`.
> TrackRev matches `{ email: external_user_id }`.
The connector matches an `_id` ObjectId, a string id, or a numeric id automatically — the credit
field may be a number, or missing/null (it starts from 0). It just has to be the **same identifier**
on both sides.
## Half 2 — Wire the API in your app
### 1. Install the pixel
```html theme={null}
```
Tracks clicks and keeps the visitor id (`_vid`) alive across the visit.
### 2. Enroll each user to mint their referral link
```bash theme={null}
curl -X POST https://app.trackrev.io/api/v1/referrals/enroll \
-H "Authorization: Bearer sk_live_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "alice@example.com",
"external_user_id": "66f…", // Alice's Mongo _id — matches your Match column
"tier": "paid"
}'
# → { "referral_link": "https://you.trackrev.io/abc123", ... }
```
Show `referral_link` to the user. (Or drop `widget.js`, which enrolls and renders a share card for
you.)
### 3. Report the signup when a referred friend joins
The friend clicks the link, lands on your site with `?_vid=…`, and you store it. When they create
their account, call:
```bash theme={null}
curl -X POST https://app.trackrev.io/api/v1/referrals/report-signup \
-H "Authorization: Bearer sk_live_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"new_user_external_user_id": "70a…", // the new user's Mongo _id
"email": "bob@example.com",
"_vid": "SAVED_VID"
}'
# → { "matched": true } ← a credit is now created for Alice (the referrer)
```
This is the call that actually creates the reward. `_vid` is the resolver, but you can also send
`ref_code` (the link slug) or `referrer_external_user_id` instead.
## What happens automatically
TrackRev creates the credit grant, then the fulfilment cron runs the MongoDB connector against your
collection:
```js theme={null}
db.collection("users").updateOne(
{ _id: ObjectId("66f…") }, // Match column = external_user_id
[ { $set: { credits: { $add: [ { $ifNull: ["$credits", 0] }, 50 ] } } } ]
)
```
Alice's `credits` goes `0 → 50`. No delivery code on your side.
## Verify end to end
**1. Enroll user A**
Call `enroll` for user A and copy the returned `referral_link`.
**2. Click + sign up as user B**
Open the link in a private window (`?_vid=…` appears in the URL), then sign up as B.
**3. Report B's signup**
Your backend calls `report-signup` with B's id and the saved `_vid`.
**4. Check MongoDB**
A's `credits` field has increased — proof the loop closed.
> [!TIP]
>
> If credits appear in the dashboard but never reach the collection, it's almost always the Atlas IP
> Access List (add `0.0.0.0/0`) or a `match_column` that doesn't match the `external_user_id` you
> enrolled with. See the connector's **last error** on the Fulfilment page.
The [credit rewards & fulfilment](/affiliate/credits-and-fulfilment) page covers the other connectors
(Supabase, Postgres, Airtable, Webhook); the API steps above are identical for all of them.
# Product-led referrals (the widget)
Source: https://doc.trackrev.io/affiliate/referral-widget
Run product-led referrals: turn every signed-in user into a referrer with TrackRev's in-app widget and referral API, and reward both sides with credit.
Beyond recruiting dedicated affiliates, TrackRev can turn **every user of your product** into a
referrer — the "invite a friend, you both get credit" model. It's powered by a small in-app widget
and two API endpoints, and it pairs naturally with [credit rewards](/affiliate/credits-and-fulfilment).
## The two-sided model
**1. Enroll each user as a referrer**
When a user signs in, the widget (or a server call) enrolls them into your programme and mints
their personal referral link — no application needed.
**2. They share their link**
Their referral link (and optional promo code) is theirs to share. Referred visitors are tracked
like any other click.
**3. A referred signup rewards both sides**
When a referred person signs up, you report it to TrackRev. The inviter earns their reward, and
(optionally) the new user gets a referee bonus.
## Embed the widget
Add the widget script to your app, authenticated with a **publishable** key:
```html theme={null}
```
* `data-key` — a publishable key from **Settings → Developers** (safe in the browser).
* `data-user-id` — your stable user id (`external_user_id`).
* `data-user-email` / `data-user-tier` — the user's email and `free` / `paid` tier, which
determines their reward amount.
The widget enrolls the user and gives them their referral link and share UI.
## Or drive it with the API
Prefer to build your own UI? Call the referral endpoints directly:
* **Enroll** a user as a referrer: [`POST /api/v1/referrals/enroll`](/developers/endpoints/referrals#enroll-a-referrer).
* **Report a signup** attributed to a referrer: [`POST /api/v1/referrals/report-signup`](/developers/endpoints/referrals#report-a-signup).
* **Report a purchase** so cash commissions are written (custom billing only — connected
providers report purchases automatically):
[`POST /api/v1/referrals/report-purchase`](/developers/endpoints/referrals#report-a-purchase).
Enroll and report-signup accept a publishable **or** secret key; report-purchase requires a
**secret** key. `report-signup` resolves the referrer from a `ref_code`, a `_vid`, or an
explicit referrer id, and runs [self-referral checks](/affiliate/fraud-detection) before
granting a reward.
> [!NOTE]
>
> The full referral flow — enroll, report, reward, credit fulfilment, self-referral protection —
> is covered end-to-end in the [API reference](/developers/endpoints/referrals) and
> [Credits & fulfilment](/affiliate/credits-and-fulfilment).
# Tax forms
Source: https://doc.trackrev.io/affiliate/tax-forms
Collect W-9 and W-8 tax forms from partners in the partner portal before you pay them, see each partner's status in your dashboard and download the forms.
US tax rules require a **W-9** (US persons) or **W-8** (non-US persons) on file before you pay a
partner. TrackRev collects these securely in the partner portal and surfaces each partner's status
in your dashboard.
## What partners submit
From their portal **Settings**, partners complete the **Tax form** card. They choose a form type
and upload a completed, signed PDF:
| Form | Who |
| - | - |
| **W-9** | US person or business |
| **W-8BEN** | Non-US individual |
| **W-8BEN-E** | Non-US entity |
They also enter their **legal name** and **tax residence country**, and upload the signed form
(PDF only, up to 5 MB). The card links out to the official IRS forms.
> [!NOTE]
>
> Uploaded forms are stored in a private bucket. Only you (the merchant the partner is enrolled
> with) can download them, via a short-lived signed link.
## What merchants see
On the **Partners** table, each partner shows a **tax-form badge** indicating whether a form is on
file. When you need the document — for your accountant or 1099 filing — download it from the
partner's row; TrackRev generates a 60-second signed URL after confirming the partner is enrolled
in one of your programmes.
> [!NOTE]
>
> TrackRev collects and stores tax forms; it does **not** generate 1099s for you. Use the
> collected forms with your own accounting/filing process.
> [!WARNING]
>
> Make tax-form collection part of onboarding. A partner without a form on file should be settled
> only after they submit one — the badge makes it easy to catch before a payout run.
# Authentication
Source: https://doc.trackrev.io/developers/authentication
Create secret and publishable TrackRev API keys in Settings → Developers and send them as Bearer tokens. Every key is scoped to one workspace.
The TrackRev API authenticates with an API key sent as a Bearer token. The key — not the request
origin — is what authorises access, and every key is scoped to one workspace.
## Create a key
**1. Open Developers**
Go to **Settings → Developers** and use the **API keys** section.
**2. Choose a scope and label**
Give the key a label (e.g. *"Production widget"*) and pick a scope.
**3. Copy it once**
The full key is shown **once** at creation — *"Copy this key now — it won't be shown again."*
Store it securely.
## Key scopes
> [card] Secret key
>
> Prefix `lk_`. **Server-only, full access.** Use for reading analytics and any endpoint that
> handles your data. Never expose it in a browser.
> [card] Publishable key
>
> Prefix `pk_`. **Browser-safe.** Only permitted on the referral enroll and report-signup
> endpoints. Use it in the in-app [widget](/developers/referral-widget).
## Send the key
Pass the key in the `Authorization` header:
```bash theme={null}
curl "https://app.trackrev.io/api/v1/links?days=30" \
-H "Authorization: Bearer lk_live_3f8a92c1_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```
> [!WARNING]
>
> Secret keys (`lk_…`) grant full read access to your workspace's data — keep them server-side.
> Publishable keys (`pk_…`) are safe in the browser but can only enroll referrers and report
> signups.
## Revoke a key
From **Settings → Developers**, click revoke on any key. Revoked keys stop working immediately —
*"Apps using it will stop working immediately."* Keys also show a **Last used** timestamp so you can
spot unused ones.
> [!NOTE]
>
> TrackRev stores only a hash of each key, never the key itself — which is why it can only be shown
> at creation time. If you lose a key, revoke it and create a new one.
# Command line (CLI)
Source: https://doc.trackrev.io/developers/cli
npm install -g trackrev: run your affiliate program from the terminal, plus channels, links, clicks and visitor journeys. Tables, TSV for pipes, JSON for jq.
The `trackrev` CLI puts your link analytics in the terminal: performance per channel, per link,
the raw click stream, and any single visitor's full journey. It is a thin, zero-dependency client
for the [Analytics API](/developers/introduction), so every number matches the dashboard.
```bash theme={null}
npm install -g trackrev
trackrev channels --days 7 --ltv
```
```text theme={null}
channel clicks visitors conversions revenue ltv
youtube 1,204 980 12.50 2,410.50 9,180.00
newsletter 310 287 9.00 1,890.00 7,240.00
affiliates 512 461 6.00 1,164.00 4,020.00
```
> [!NOTE]
>
> The CLI is free and MIT-licensed on [npm](https://www.npmjs.com/package/trackrev). Link and
> account commands work on **every plan**, including free, and respect the same limits as the
> dashboard (50 links on the free tier). The analytics commands — `channels`, `links perf`,
> `clicks`, `journey` — need a **paid plan**; on a free workspace they exit `3` with an upgrade
> message. Requires Node 20 or newer.
## Install
Install it once and you get a `trackrev` command on your PATH:
```bash npm theme={null}
npm install -g trackrev
```
```bash pnpm theme={null}
pnpm add -g trackrev
```
```bash yarn theme={null}
yarn global add trackrev
```
```bash bun theme={null}
bun add -g trackrev
```
Check it worked:
```bash theme={null}
trackrev --version
```
> [!NOTE]
>
> **Don't want to install it?** `npx` runs an npm package *without* installing it — it downloads the
> CLI into a temporary cache, runs one command, and leaves nothing on your PATH. Useful for a
> one-off check or a CI step:
>
> ```bash theme={null}
> npx trackrev channels
> ```
>
> Everything below assumes the global install, so commands read `trackrev channels`. With `npx`,
> prefix them: `npx trackrev channels`.
## Authenticate
**1. Create a secret key**
Go to **Settings → Developers** and create a **secret** key (`lk_…`). See
[Authentication](/developers/authentication).
**2. Save it**
```bash theme={null}
trackrev login
```
The key is prompted for without echoing, verified against the API before anything is written,
and stored at `~/.config/trackrev/config.json` with mode `0600`. A typo fails here rather than
on your next command.
In CI, set the environment variable instead — it overrides any saved login:
```bash macOS / Linux theme={null}
export TRACKREV_KEY=lk_live_...
```
```powershell Windows (PowerShell) theme={null}
$env:TRACKREV_KEY = "lk_live_..."
```
**3. Check what you are pointed at**
```bash theme={null}
trackrev me
```
Prints the workspace, plan, current limits and which key is in use — the first thing to run
when a command returns something you did not expect.
The key is sent as a Bearer token over HTTPS. Keep several environments side by side with
`--profile`:
```bash theme={null}
trackrev login --profile staging --api-url https://staging.example.com/api/v1
trackrev links list --profile staging
```
| Variable | Meaning |
| - | - |
| `TRACKREV_KEY` | Secret API key from **Settings → Developers**. Overrides any saved login. |
| `TRACKREV_API_URL` | Override the API base (staging, self-hosted). Defaults to `https://app.trackrev.io/api/v1`. |
## Commands
*Generated from `apps/cli/src/registry.js` — edit there, then run `pnpm --filter trackrev sync-docs`.*
### Analytics
#### `trackrev channels`
performance per traffic source *(paid plan)*
```bash theme={null}
trackrev channels --days 7 --ltv
```
| flag | meaning |
| - | - |
| `--days N` | last N days (default 30, max 365) |
| `--from ISO` | explicit start, e.g. 2026-01-01; wins over --days |
| `--to ISO` | explicit end (defaults to now) |
| `--ltv` | add all-time lifetime value per channel |
conversions is a decimal on purpose — attribution splits credit, so one sale touched by two channels counts 0.5 on each.
#### `trackrev links perf`
performance per short link (bare `trackrev links` still works) *(paid plan)*
```bash theme={null}
trackrev links perf --limit 20
```
| flag | meaning |
| - | - |
| `--limit N` | rows to return (max 500) |
| `--days N` | last N days (default 30, max 365) |
| `--from ISO` | explicit start, e.g. 2026-01-01; wins over --days |
| `--to ISO` | explicit end (defaults to now) |
| `--settings` | attach each link's URL, expiry and password flag |
#### `trackrev clicks`
the raw click stream — newest first, bots excluded *(paid plan)*
```bash theme={null}
trackrev clicks --all --json
```
| flag | meaning |
| - | - |
| `--limit N` | page size (default 100, max 500) |
| `--all` | follow the cursor to the end of the stream |
| `--link ID` | one link only |
| `--bots` | include bot traffic |
\--all stops after 200 pages and says so on stderr, so a runaway cursor can never loop forever.
#### `trackrev visitors journey `
one visitor's timeline — every click, identify event and order, in order *(paid plan)*
```bash theme={null}
trackrev journey
```
The visitor caption goes to stderr, so the rows stay pipe-clean.
### Links
#### `trackrev links list`
the links themselves — newest first, no window
```bash theme={null}
trackrev links list --channel youtube
```
| flag | meaning |
| - | - |
| `--limit N` | page size (default 100, max 500) |
| `--all` | follow the cursor to the end |
| `--channel KEY` | one channel only |
| `--q TEXT` | slug contains this text |
#### `trackrev links create`
create a campaign: one link per channel, or one Smart Link
```bash theme={null}
trackrev links create --url https://acme.com/launch --name Launch --channel youtube --channel newsletter
```
| flag | meaning |
| - | - |
| `--url URL` | destination (required) |
| `--name TEXT` | campaign name (required) |
| `--channel KEY` | a channel; repeat for several |
| `--smart` | one link that infers its channel per click |
| `--tag TEXT` | a tag; repeat for several |
| `--folder ID` | put the campaign in this folder |
| `--external` | destination is a site you can't put the pixel on |
| `--slug SLUG` | custom slug (2–64 chars; lowercase, digits, hyphens) |
| `--campaign TEXT` | utm\_campaign (defaults to the name) |
| `--expires ISO` | expire at this time |
| `--max-clicks N` | expire after this many clicks |
| `--expired-url URL` | where to send visitors after expiry |
| `--password TEXT` | require this password before redirecting |
| `--mobile-url URL` | device targeting: send mobile here |
| `--desktop-url URL` | device targeting: send desktop here |
| `--retarget on\|off` | fire the workspace's ad pixels on click |
Prints one row per link created. Channels: facebook instagram youtube linkedin twitter tiktok newsletter website other.
#### `trackrev links get `
one link by id, slug or short code
```bash theme={null}
trackrev links get black-friday
```
#### `trackrev links update `
change a link's slug, UTMs, expiry, password or targeting
```bash theme={null}
trackrev links update --expires 2026-12-31T23:59:59Z --max-clicks 1000
```
| flag | meaning |
| - | - |
| `--term TEXT` | utm\_term |
| `--content TEXT` | utm\_content |
| `--clear-password` | remove the password |
| `--clear-expiry` | remove date and click-cap expiry |
| `--slug SLUG` | custom slug (2–64 chars; lowercase, digits, hyphens) |
| `--campaign TEXT` | utm\_campaign (defaults to the name) |
| `--expires ISO` | expire at this time |
| `--max-clicks N` | expire after this many clicks |
| `--expired-url URL` | where to send visitors after expiry |
| `--password TEXT` | require this password before redirecting |
| `--mobile-url URL` | device targeting: send mobile here |
| `--desktop-url URL` | device targeting: send desktop here |
| `--retarget on\|off` | fire the workspace's ad pixels on click |
#### `trackrev links delete `
delete one link (its campaign and other channels stay) *(asks to confirm; `--yes` in scripts)*
```bash theme={null}
trackrev links delete --yes
```
#### `trackrev links bulk`
create up to 500 links from a CSV
```bash theme={null}
trackrev links bulk --file links.csv
```
| flag | meaning |
| - | - |
| `--file PATH` | CSV with url, name, channel columns (- for stdin) |
Optional columns: utm\_campaign, utm\_term, utm\_content, tags, campaign\_id. Rows that fail are listed with the reason; the rest are created.
#### `trackrev links qr `
the link's QR code as SVG
```bash theme={null}
trackrev links qr black-friday --out black-friday.svg
```
| flag | meaning |
| - | - |
| `--out PATH` | write here instead of stdout |
| `--size N` | size in px (default 512, max 2048) |
### Developers
#### `trackrev keys list`
the workspace's API keys (prefixes only)
```bash theme={null}
trackrev keys list --revoked
```
| flag | meaning |
| - | - |
| `--revoked` | include revoked keys |
#### `trackrev keys create`
mint a key — the plaintext is shown once, never again
```bash theme={null}
trackrev keys create --label 'CI deploy'
```
| flag | meaning |
| - | - |
| `--scope SCOPE` | secret (servers, CLI) or public (browser) |
| `--label TEXT` | what this key is for |
The key goes to stdout and everything else to stderr, so `trackrev keys create > key.txt` captures only the key.
#### `trackrev keys revoke `
revoke a key immediately *(asks to confirm; `--yes` in scripts)*
```bash theme={null}
trackrev keys revoke --yes
```
#### `trackrev webhooks list`
outbound endpoints, with their last delivery status
```bash theme={null}
trackrev webhooks list
```
#### `trackrev webhooks events`
every event an endpoint can subscribe to
```bash theme={null}
trackrev webhooks events
```
#### `trackrev webhooks create`
add an endpoint — the signing secret is shown once
```bash theme={null}
trackrev webhooks create --url https://acme.com/hook --event sale.created
```
| flag | meaning |
| - | - |
| `--url URL` | https endpoint (required) |
| `--event NAME` | an event; repeat for several |
https only. Run `trackrev webhooks events` for the valid names.
#### `trackrev webhooks update `
change the URL or events, or pause and resume delivery
```bash theme={null}
trackrev webhooks update --pause
```
| flag | meaning |
| - | - |
| `--url URL` | new endpoint URL |
| `--event NAME` | replace the event list; repeat |
| `--pause` | stop delivering |
| `--resume` | start delivering again |
#### `trackrev webhooks delete `
remove an endpoint *(asks to confirm; `--yes` in scripts)*
```bash theme={null}
trackrev webhooks delete --yes
```
### Setup
#### `trackrev attribution get`
the model and lookback window this workspace uses
```bash theme={null}
trackrev attribution get --models
```
| flag | meaning |
| - | - |
| `--models` | list the three models and what each credits |
#### `trackrev attribution set`
change the model or the window
```bash theme={null}
trackrev attribution set --model linear --window 60
```
| flag | meaning |
| - | - |
| `--model NAME` | last\_touch, first\_touch or linear |
| `--window N` | lookback in days (1-365) |
Both settings apply retroactively — every past order is re-credited against them.
#### `trackrev folders list`
campaign folders, with how many campaigns each holds
```bash theme={null}
trackrev folders list
```
#### `trackrev folders create`
create a folder to group campaigns under
```bash theme={null}
trackrev folders create --name 'Q4 launch' --start 2026-10-01
```
| flag | meaning |
| - | - |
| `--name TEXT` | folder name (required) |
| `--description TEXT` | what it covers |
| `--start YYYY-MM-DD` | start date |
| `--end YYYY-MM-DD` | end date |
#### `trackrev folders update `
rename a folder or change its dates
```bash theme={null}
trackrev folders update --name 'Q1 launch'
```
| flag | meaning |
| - | - |
| `--name TEXT` | new name |
| `--description TEXT` | new description |
| `--start YYYY-MM-DD` | start date |
| `--end YYYY-MM-DD` | end date |
#### `trackrev folders delete `
delete a folder — its campaigns become ungrouped, not deleted *(asks to confirm; `--yes` in scripts)*
```bash theme={null}
trackrev folders delete --yes
```
#### `trackrev folders assign `
file a campaign under a folder, or un-file it
```bash theme={null}
trackrev folders assign --folder
```
| flag | meaning |
| - | - |
| `--folder ID` | folder to file under; omit to un-file |
The id is a CAMPAIGN (the destination behind a set of links), not a single link.
### Revenue
#### `trackrev revenue list`
connected payment providers and their last sync
```bash theme={null}
trackrev revenue list
```
#### `trackrev revenue providers`
what can be connected, and the credentials each needs
```bash theme={null}
trackrev revenue providers
```
Stripe is absent by design — its restricted key lives on the workspace, not here.
#### `trackrev revenue connect`
connect a provider — credentials are verified before saving
```bash theme={null}
trackrev revenue connect --provider polar --field api_key=polar_oat_…
```
| flag | meaning |
| - | - |
| `--provider NAME` | polar, lemonsqueezy, paddle, creem or dodo |
| `--field K=V` | credential as key=value; repeat per field |
| `--sandbox` | use the provider's sandbox host, where it has one |
#### `trackrev revenue sync`
pull charges now and attribute them *(paid plan)*
```bash theme={null}
trackrev revenue sync
```
| flag | meaning |
| - | - |
| `--connection ID` | one connection only; omit for all + Stripe |
Reports imported and attributed per provider. A provider that fails does not stop the others.
#### `trackrev revenue disconnect `
disconnect a provider; imported orders are kept *(asks to confirm; `--yes` in scripts)*
```bash theme={null}
trackrev revenue disconnect --yes
```
### Audience
#### `trackrev visitors list`
visitors, most recently seen first *(paid plan)*
```bash theme={null}
trackrev visitors list --email @acme.com
```
| flag | meaning |
| - | - |
| `--limit N` | page size (default 100, max 500) |
| `--all` | follow the cursor to the end |
| `--email TEXT` | email contains this text |
#### `trackrev visitors get `
one visitor *(paid plan)*
```bash theme={null}
trackrev visitors get
```
#### `trackrev orders list`
synced purchases, newest first
```bash theme={null}
trackrev orders list --status refunded
```
| flag | meaning |
| - | - |
| `--limit N` | page size (default 100, max 500) |
| `--all` | follow the cursor to the end |
| `--status NAME` | paid or refunded |
| `--email TEXT` | email contains this text |
amount is blank on the free plan, where revenue figures are hidden.
#### `trackrev export`
any dataset as CSV *(paid plan)*
```bash theme={null}
trackrev export --kind orders --days 90 --out orders.csv
```
| flag | meaning |
| - | - |
| `--kind NAME` | channels, links, orders or visitors |
| `--out PATH` | write here instead of stdout |
| `--days N` | last N days (default 30, max 365) |
| `--from ISO` | explicit start, e.g. 2026-01-01; wins over --days |
| `--to ISO` | explicit end (defaults to now) |
### Domains
#### `trackrev domains list`
branded short-link domains and their DNS status
```bash theme={null}
trackrev domains list
```
#### `trackrev domains add `
attach a domain — prints the DNS records to add
```bash theme={null}
trackrev domains add go.acme.com
```
#### `trackrev domains verify `
re-check DNS now; exits non-zero until it is active
```bash theme={null}
trackrev domains verify go.acme.com
```
Exits 1 while still pending, so a deploy script can poll until it passes.
#### `trackrev domains remove `
detach a domain; links keep working on the default host *(asks to confirm; `--yes` in scripts)*
```bash theme={null}
trackrev domains remove go.acme.com --yes
```
#### `trackrev retargeting list`
the ad pixels fired on opted-in link clicks
```bash theme={null}
trackrev retargeting list --providers
```
| flag | meaning |
| - | - |
| `--providers` | show what can be configured instead |
#### `trackrev retargeting set `
set a provider's pixel id
```bash theme={null}
trackrev retargeting set meta --id 1234567890123456
```
| flag | meaning |
| - | - |
| `--id ID` | the pixel/tag id (required) |
The id must match that provider's shape — only validated ids are ever put into a loader snippet.
#### `trackrev retargeting remove `
remove a provider's pixel *(asks to confirm; `--yes` in scripts)*
```bash theme={null}
trackrev retargeting remove meta --yes
```
### Affiliate
#### `trackrev programs list`
the workspace's affiliate programs and their terms
```bash theme={null}
trackrev programs list --archived
```
| flag | meaning |
| - | - |
| `--archived` | include archived programs |
#### `trackrev programs get `
one program in full
```bash theme={null}
trackrev programs get
```
#### `trackrev programs update `
change commission terms, or pause and archive *(paid plan)*
```bash theme={null}
trackrev programs update --rate 0.25 --status paused
```
| flag | meaning |
| - | - |
| `--name TEXT` | program name |
| `--landing-url URL` | where partner links point |
| `--type TYPE` | percent or flat |
| `--rate N` | 0-1 fraction for percent (0.25 = 25%), dollars for flat |
| `--recurring N` | months a commission keeps paying |
| `--cookie N` | attribution window in days |
| `--min-payout N` | minimum balance before a payout |
| `--auto-approve on\|off` | approve signups instantly |
| `--status NAME` | active, paused or archived |
Changes apply to NEW conversions; commissions already earned are untouched.
#### `trackrev partners list`
affiliates with their clicks, sales and earnings *(paid plan)*
```bash theme={null}
trackrev partners list --status pending
```
| flag | meaning |
| - | - |
| `--program ID` | one program only |
| `--status NAME` | pending, approved, rejected, banned or archived |
#### `trackrev partners approve `
approve a pending affiliate *(paid plan)*
```bash theme={null}
trackrev partners approve --program
```
| flag | meaning |
| - | - |
| `--program ID` | the program id (required) |
Does NOT send the approval email the dashboard sends — a re-run would mail them again.
#### `trackrev partners reject `
reject an application *(paid plan)* *(asks to confirm; `--yes` in scripts)*
```bash theme={null}
trackrev partners reject --program --yes
```
| flag | meaning |
| - | - |
| `--program ID` | the program id (required) |
#### `trackrev partners ban `
ban an affiliate *(paid plan)* *(asks to confirm; `--yes` in scripts)*
```bash theme={null}
trackrev partners ban --program --yes
```
| flag | meaning |
| - | - |
| `--program ID` | the program id (required) |
#### `trackrev partners group `
move an affiliate into a group, or back to program terms *(paid plan)*
```bash theme={null}
trackrev partners group --program --group
```
| flag | meaning |
| - | - |
| `--program ID` | the program id (required) |
| `--group ID` | group to move them to; omit to clear |
#### `trackrev groups list `
a program's tiers, showing the terms each one resolves to *(paid plan)*
```bash theme={null}
trackrev groups list
```
### Money
#### `trackrev commissions list`
the commission ledger, newest first *(paid plan)*
```bash theme={null}
trackrev commissions list --status pending
```
| flag | meaning |
| - | - |
| `--limit N` | rows to return (max 500) |
| `--status NAME` | pending, eligible, paid, refunded, void or fraud |
| `--partner ID` | one affiliate only |
level 1 is the affiliate who sold; 2+ is an upline earning from their network.
#### `trackrev commissions add`
record an off-platform deal by hand *(paid plan)*
```bash theme={null}
trackrev commissions add --program --partner --amount 500 --earnings 100
```
| flag | meaning |
| - | - |
| `--program ID` | program id (required) |
| `--partner ID` | affiliate id (required) |
| `--amount N` | gross sale value (required) |
| `--earnings N` | the affiliate's cut (required) |
| `--currency CODE` | defaults to usd |
| `--notes TEXT` | why this was entered by hand |
Earnings is not derived — a manual commission exists because the normal rate did not apply.
#### `trackrev commissions void `
void a commission entered in error *(paid plan)* *(asks to confirm; `--yes` in scripts)*
```bash theme={null}
trackrev commissions void --yes
```
| flag | meaning |
| - | - |
| `--status NAME` | set another status instead of void |
Refused if it is already on a payout batch — cancel the payout first.
#### `trackrev payouts list`
payout batches, with open and all-time totals *(paid plan)*
```bash theme={null}
trackrev payouts list --status pending
```
| flag | meaning |
| - | - |
| `--status NAME` | pending, processing, paid, failed or canceled |
| `--limit N` | rows to return (max 500) |
Creating a batch stays in the dashboard: it applies per-group payout floors and platform fees, and a second implementation would eventually pay someone wrong.
#### `trackrev payouts mark-paid `
settle a payout sent off-platform *(paid plan)* *(asks to confirm; `--yes` in scripts)*
```bash theme={null}
trackrev payouts mark-paid --reference PAYPAL-BATCH-123 --yes
```
| flag | meaning |
| - | - |
| `--reference TEXT` | the rail's own id (PayPal batch, Wise transfer) |
Does NOT email the affiliate — the dashboard sends that, and a re-run would send it twice.
### Settings
#### `trackrev settings notifications`
every transactional email, and whether it is on
```bash theme={null}
trackrev settings notifications
```
default=yes means no override is stored and the catalogue default applies.
#### `trackrev settings notify `
turn one transactional email on or off
```bash theme={null}
trackrev settings notify affiliate.approved --off
```
| flag | meaning |
| - | - |
| `--on` | enable it |
| `--off` | disable it |
#### `trackrev settings branding`
the white-label settings affiliates see
```bash theme={null}
trackrev settings branding
```
#### `trackrev settings set-branding`
set the partner-facing logo and accent colour
```bash theme={null}
trackrev settings set-branding --color '#e63e2e'
```
| flag | meaning |
| - | - |
| `--logo URL` | https logo URL |
| `--color HEX` | hex accent, e.g. #e63e2e |
| `--clear-logo` | back to the TrackRev logo |
| `--clear-color` | back to the TrackRev colour |
The affiliate subdomain is read-only here — claiming one is a namespace reservation and belongs in one place.
### Account
#### `trackrev me`
which workspace, plan, limits and key you're using
```bash theme={null}
trackrev me
```
#### `trackrev login`
save a secret key so you don't need TRACKREV\_KEY
```bash theme={null}
trackrev login --profile staging --api-url https://staging.example.com/api/v1
```
| flag | meaning |
| - | - |
| `--key lk_…` | the key (prompted, hidden, when omitted) |
| `--api-url URL` | API base for this profile |
Stored at \~/.config/trackrev/config.json with mode 0600. TRACKREV\_KEY in the environment always wins, for CI.
#### `trackrev logout`
forget a saved key
```bash theme={null}
trackrev logout
```
### Global flags
| flag | meaning |
| - | - |
| `--json` | print the API's JSON instead of a table |
| `--profile NAME` | use a saved login other than the current one |
| `--yes` | skip the confirmation on destructive commands |
| `--version` | print the version |
| `--help` | show help (also: trackrev \ --help) |
## Reporting window
`channels` and `links` accept:
| Flag | Meaning |
| - | - |
| `--days N` | Last N days (default 30, max 365) |
| `--from ISO` | Explicit start, e.g. `2026-01-01` |
| `--to ISO` | Explicit end (defaults to now) |
`--from` / `--to` win over `--days`.
## Output
The same data comes out three ways, so a command works both as something you read and as
something you pipe:
```bash theme={null}
trackrev channels # aligned table (a terminal)
trackrev channels > channels.tsv # tab-separated, raw values (a pipe or file)
trackrev channels --json | jq . # the API's own JSON body
```
Piped output is deliberately unformatted — `2410.5`, not `2,410.50` — so `cut` and `awk` see real
numbers. Warnings, errors and the `journey` caption always go to **stderr**, never into your pipe.
## Recipes
```bash theme={null}
# Just the revenue column
trackrev channels --days 7 | cut -f1,5
# Top five links by revenue (skip the header row, sort on column 6)
trackrev links --limit 100 | tail -n +2 | sort -t$'\t' -k6,6nr | head -5
# Every click from one country
trackrev clicks --all --json | jq '.clicks[] | select(.country == "BD")'
# Newest visitor → their whole journey
trackrev clicks --limit 1 | tail -1 | cut -f6 | xargs trackrev journey
# Nightly export, dated
trackrev clicks --all --json > "clicks-$(date +%F).json"
# Staging or self-hosted
TRACKREV_API_URL=https://staging.example.com/api/v1 trackrev links
```
## Exit codes
| Code | Meaning |
| - | - |
| `0` | Success |
| `1` | No API key, auth failure, network error, not found, API error |
| `2` | Usage error — unknown flag or command, bad value, missing argument, refused confirmation |
| `3` | Plan required — this command needs a paid plan |
A `401` names where the key came from; a `402` exits `3` with the upgrade link, so CI can tell
"wrong plan" apart from "the call broke"; an unknown flag is a one-line usage error rather than a
stack trace.
## All flags
The tables above are generated from the CLI's own command registry, so they list every flag
the binary accepts. `trackrev --help` prints the same set, and `trackrev --help`
narrows it to one command.
# Dashboard embed
Source: https://doc.trackrev.io/developers/dashboard-embed
Embed a full Refer & Earn dashboard in your app — referral link, clicks, signups, purchases, conversion rate and rewards.
The dashboard embed renders a complete referral dashboard inside your product: the signed-in
user's referral link, their clicks, signups, purchases and conversion rate over a selectable
window, and the credits or cash they've earned. Where the [referral
widget](/developers/referral-widget) is a lightweight share card, the embed is the full analytics
view — an Affonso-style "Refer & Earn" page you don't have to build.
## Embed it
Paste the loader script inside your authenticated app, with a **publishable** key. It injects an
auto-resizing iframe:
```html theme={null}
```
On load the embed calls [`GET /api/v1/referrals/stats`](/developers/endpoints/referrals#get-referral-stats),
which auto-enrolls the user (idempotent — same as
[`POST /api/v1/referrals/enroll`](/developers/endpoints/referrals#enroll-a-referrer)), so there is
nothing else to wire up.
## Attributes
**data-key** `string` *required*
A publishable key (`pk_…`) from **Settings → Developers**. Safe to expose in the browser.
**data-user-id** `string` *required*
The user's id in **your** system — becomes their `external_user_id`.
**data-user-email** `string`
The user's email. Recommended — it's used as the partner identity.
**data-user-tier** `string` (default: free)
`free` or `paid` — decides which credit amount applies.
**data-mount** `string`
A CSS selector (e.g. `#refer-earn`) to render the dashboard into. If omitted, the dashboard
renders where the script tag sits.
**data-theme** `string` (default: light)
`light` or `dark`.
**data-accent** `string`
A hex brand color for the dashboard's accent, e.g. `#6366f1`.
**data-days** `number` (default: 30)
The analytics window in days, `7`–`90`.
**data-api-base** `string`
Only for custom deployments — the API origin to call. Defaults to the script's own origin.
## Direct iframe
Prefer not to load a script? Point an iframe straight at the embed page and pass the same values
as query parameters (`accent` without the `#`):
```html theme={null}
```
* `key` — the publishable key (required).
* `uid` — the user's id in your system (required).
* `email` — the user's email (recommended).
* `tier` — `free` or `paid` (default `free`).
* `theme` — `light` or `dark` (default `light`).
* `accent` — hex color **without** the `#`, e.g. `6366f1`.
* `days` — analytics window, 7–90 (default 30).
### Auto-resizing
The iframe posts its content height to the parent window so you can size it without scrollbars:
```json theme={null}
{ "type": "trackrev:embed:height", "height": 812 }
```
The `embed.js` loader listens for these messages and resizes the iframe automatically. If you use
the direct iframe, add a small `message` listener yourself and set the iframe's height from
`event.data.height` when `event.data.type === "trackrev:embed:height"`.
## Theming
Use `data-theme` (`light` | `dark`) to match your app's mode and `data-accent` to apply your brand
color to buttons, links and highlights. With the direct iframe, the same options are the `theme`
and `accent` query params (accent without the `#`).
> [!WARNING]
>
> The end-user identity (`data-user-id`, `data-user-email`, `data-user-tier`) is **self-asserted**
> and trusted under your API key — the same trust model as the [referral
> widget](/developers/referral-widget). Only render the snippet to the already-authenticated user
> it belongs to; never let one user's page embed another user's id.
## Affiliate upgrade
The embed can offer end-users a choice of how they're rewarded:
* **Referrer** (default) — earn credits, exactly as today.
* **Affiliate** — earn direct cash commissions at the program's commission rate, with payout
access, without ever leaving your app. (Partners who join via the public join page are
affiliates only — this toggle is how your own users get there in-product.)
The toggle appears in the dashboard only when **both** are true:
1. The merchant enabled **Allow customers to become affiliates** in the program settings
(`programs.allow_affiliate_upgrade`), and
2. the program is **credit-based** (`credit_enabled`). Cash-based programs already pay cash —
no toggle is shown.
Affiliate mode pays the program's `commission_type` / `commission_rate` — merchants set this
commission alongside the toggle in the program settings.
> [!WARNING]
>
> Cash commissions are written when TrackRev learns about the **purchase**. If your billing runs
> on a connected provider (Stripe, Paddle Billing, Polar, Lemon Squeezy, Creem, Dodo Payments), that happens automatically
> through its webhooks. If you bill any other way, your backend must call
> [`POST /api/v1/referrals/report-purchase`](/developers/endpoints/referrals#report-a-purchase)
> when a user pays — without it, affiliate-mode referrers never earn and the embed's Purchases
> stays at 0. Report signups with
> [`report-signup`](/developers/endpoints/referrals#report-a-signup) first: purchases are matched
> to referrers through the reported signup.
Switching affects **future conversions only** — credits already earned are kept — and is fully
reversible. While in affiliate mode, the embed swaps in an embedded portal view: cash balance
(pending / eligible / paid), recent commissions, payout-method setup, payout history, and the
program's minimum payout threshold. The payout form offers exactly the methods you switched on in
the program's payment settings (PayPal, Payoneer or Wise) and labels the field for the one the
user picks, e.g. "Payoneer email for payouts".
The stats response reflects the current mode: it gains a top-level `reward_mode`
(`"referrer" | "affiliate"`) and an `affiliate` object (`allowed`, `min_payout`,
`payout_methods`, `payout_method`, `recent_commissions`, `payouts`) — see
[`GET /api/v1/referrals/stats`](/developers/endpoints/referrals#get-referral-stats).
### Set reward mode
`POST /api/v1/referrals/reward-mode` — switch a user between referrer and affiliate mode. Also
available in the [endpoint reference](/developers/endpoints/referrals#set-the-reward-mode).
**external\_user\_id** `string` *required*
The user's id in your system.
**mode** `string` *required*
`referrer` or `affiliate`.
```bash cURL theme={null}
curl -X POST "https://app.trackrev.io/api/v1/referrals/reward-mode" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{ "external_user_id": "user_123", "mode": "affiliate" }'
```
```json Response theme={null}
{ "partner_id": "pa1...", "program_id": "p1...", "reward_mode": "affiliate" }
```
Returns `403 forbidden` when the program doesn't allow the upgrade, `400 bad_request` for an
invalid mode or missing id.
### Set payout method
`POST /api/v1/referrals/payout-method` — save where an affiliate-mode user gets paid. Only
accepted while the enrollment is in affiliate mode (`403 forbidden` otherwise). Also in the
[endpoint reference](/developers/endpoints/referrals#set-the-payout-method).
**external\_user\_id** `string` *required*
The user's id in your system.
**method** `string` *required*
`paypal`, `payoneer` or `wise` — and one your program offers. Bank transfers (wire, ACH) aren't
available yet. A method the program doesn't offer returns `400 method_not_offered`.
**email** `string` *required*
The email on the user's account for that method. `paypal_email` is accepted as an alias.
```bash cURL theme={null}
curl -X POST "https://app.trackrev.io/api/v1/referrals/payout-method" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{ "external_user_id": "user_123", "method": "payoneer", "email": "jane@acme.com" }'
```
```json Response theme={null}
{ "partner_id": "pa1...", "payout_method": "payoneer", "email": "jane@acme.com" }
```
> [!WARNING]
>
> Payout-email changes ride the same trust model as the rest of the embed: the identity is
> self-asserted under your API key. Only render the dashboard (and thus the payout form) to the
> authenticated user it belongs to.
## Under the hood
The dashboard is powered by a single endpoint you can also call yourself:
[`GET /api/v1/referrals/stats`](/developers/endpoints/referrals#get-referral-stats) — windowed
stats, lifetime rewards and a daily series, with auto-enrollment built in. Use it directly if you
want the numbers in your own UI.
# Bio pages
Source: https://doc.trackrev.io/developers/endpoints/bio-pages
Create and manage link-in-bio pages with /api/v1/bio-pages. Every button gets a tracked short link, so you see clicks, visitors and revenue per button.
```bash cURL theme={null}
curl -X POST "https://app.trackrev.io/api/v1/bio-pages" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"slug": "acme",
"title": "Acme",
"bio": "Tools for small teams.",
"links": [
{ "label": "Start free", "url": "https://acme.com/signup" },
{ "label": "Latest video", "url": "https://youtube.com/watch?v=abc" }
]
}'
```
A bio page is a public list of links at `www.trackrev.io/`. Pages made through the API belong
to the workspace of the key that made them; they never appear in (or can be edited from) the
dashboard's free link-in-bio builder.
**Scope:** secret key (`lk_`). Any plan, except `/stats`, which needs a paid plan.
## Tracked buttons
Each link button is given a TrackRev short link on the `bio` channel, and the public page sends
visitors through it. That is what counts a click, and, with the pixel on the destination, the
revenue it earned. Sections (headings) have no link.
* A button keeps its short link, and its history, while its `id` stays the same, even if you change
its `url` or `label`. **Send back the `id`s you received.**
* A button you leave out of a `links` update is removed, and its short link and click history with it.
* Tracking never blocks a save. If a short link can't be made (a free workspace at its link cap, for
example) the button is saved and links straight to its URL; `tracked_link_id` and `short_url` are
`null`. Save again to retry.
## Endpoints
| | |
| - | - |
| `POST /api/v1/bio-pages` | Create a page. `201`, or `200` for a known `external_id`. |
| `GET /api/v1/bio-pages` | List pages, newest first. `?limit` (max 200), `?cursor`, `?external_id`. |
| `GET /api/v1/bio-pages/:id` | One page, by id **or slug**. |
| `PATCH /api/v1/bio-pages/:id` | Update any subset of fields. |
| `DELETE /api/v1/bio-pages/:id` | Delete the page and its buttons' short links. |
| `GET /api/v1/bio-pages/availability?slug=` | Is this name free? |
| `GET /api/v1/bio-pages/:id/stats` | Per-button clicks, visitors, conversions, revenue. `?days` or `?from&to`. |
## Body
**slug** `string` *required*
Create only; can't change later. 3–40 characters, lowercase letters, digits and hyphens (spaces and
capitals are normalised). Reserved names, and names used by another page, a short link or a
program code, are refused: `400` for reserved, `409` for taken.
**title** `string`
Up to 60 characters.
**bio** `string`
Up to 280 characters.
**avatar\_url** `string | null`
An `http(s)` image URL.
**links** `array`
Up to 50 buttons, replacing the whole list. Each: `id` (optional, 1–64 of `A-Z a-z 0-9 _ -`; one
is generated if omitted), `type` (`link` or `section`), `label` (up to 80), `url` (`http(s)`, for
links), `emoji`, `image_url`. A `tracked` field is ignored.
**social\_links** `array`
Up to 12 `{ platform, url }` icons: `instagram`, `tiktok`, `x`, `youtube`, `spotify`,
`apple-music`, `facebook`, `linkedin`, `github`, `twitch`, `discord`, `email`.
**theme** `object`
Colours, fonts and button style (`canvasMode`, `canvasValue`, `cardMode`, `cardBg`, `textColor`,
`buttonStyle`, `buttonColor`, `buttonTextColor`, `buttonRadius`, `buttonShadow`,
`buttonShadowColor`, `font`, `footerImage`). `buttonStyle` is `filled`, `outlined`, `soft` or
`glass`; `buttonRadius` is `none`, `sm`, `md`, `lg` or `full`; `buttonShadow` is `none`, `soft`
or `hard`. Optional: `canvasBase` (a hex colour under a gradient canvas), `canvasSize` (a CSS
background-size for tiled patterns), `titleFont`, `titleSize` (`sm` or `lg`) and `titleWeight`
(300–800). `font` and `titleFont` take one of 22 ids, among them `sans`, `serif`, `mono`,
`display`, `elegant`, `manrope`, `inter`, `poppins`, `epilogue`, `red-hat`, `outfit`, `jost`,
`oxanium`, `playfair`, `lora`, `dm-serif`, `space-mono`, `bowlby`, `chango`, `gasoek`,
`unbounded` and `viaoda`. On update it is **merged** onto the current theme. A value outside
its allowed set falls back to the default.
**is\_published** `boolean` (default: true)
Unpublished pages return 404 publicly.
**show\_branding** `boolean` (default: true)
Show the "Made with TrackRev" footer.
**external\_id** `string`
Create only. Your own id for the page (1–200 characters), unique per workspace. A create with a
known `external_id` returns that page with `200` and changes nothing, so a retry never makes a
second page.
**metadata** `object`
A JSON object of up to 4 KB, stored with the page.
Create also honours an `Idempotency-Key` header, as `POST /links` does.
## Response
```json Response theme={null}
{
"id": "3f8a92c1-0000-4000-8000-000000000001",
"slug": "acme",
"url": "https://www.trackrev.io/acme",
"title": "Acme",
"bio": "Tools for small teams.",
"avatar_url": null,
"theme": { "canvasMode": "solid", "canvasValue": "#f1f1ef", "…": "…" },
"links": [
{
"id": "lnk_a1B2c3D4e5F6",
"type": "link",
"label": "Start free",
"url": "https://acme.com/signup",
"emoji": "",
"image_url": null,
"tracked_link_id": "6d0e…",
"short_url": "https://app.trackrev.io/r/k7x2mfp"
}
],
"social_links": [],
"is_published": true,
"show_branding": true,
"external_id": null,
"metadata": null,
"created_at": "2026-10-11T10:00:00Z",
"updated_at": "2026-10-11T10:00:00Z"
}
```
## Stats
`GET /api/v1/bio-pages/:id/stats` returns `{ window, totals, links }`. Each entry in `links` is
`{ id, label, url, tracked_link_id, clicks, visitors, conversions, revenue }`, bots excluded.
`totals.visitors` adds the per-button counts, so someone who clicked two buttons counts twice. For
daily series or geography, pass the buttons' `tracked_link_id`s to [`/clicks?link_ids=`](/developers/endpoints/clicks).
Page views are not counted; only clicks on tracked buttons are.
## Limits
* Custom domains for bio pages aren't available through the API. Pages are served at
`www.trackrev.io/`.
* The workspace's link cap applies to buttons (one link each). A free workspace past its cap saves
untracked buttons.
# Channels API
Source: https://doc.trackrev.io/developers/endpoints/channels
Channel performance — clicks, visitors, conversions and revenue — ranked by revenue, with optional lifetime value.
```bash cURL theme={null}
curl "https://app.trackrev.io/api/v1/channels?days=30<v=1" \
-H "Authorization: Bearer "
```
`GET /api/v1/channels` — channel performance for a time window, ranked by revenue.
**Scope:** secret key (`lk_`).
## Query parameters
**days** `integer` (default: 30)
Last N days ending now (1–365). Alternative to `from`/`to`.
**from** `string (ISO 8601)`
Start of an explicit window `[from, to)`.
**to** `string (ISO 8601)`
End of the window; defaults to now.
**ltv** `boolean`
Set `ltv=1` to merge all-time lifetime value per channel into each row (adds an `ltv` field).
## Response
**window** `object`
The resolved `{ from, to }` window.
**channels** `array`
One row per channel, sorted by revenue descending. Each row: `channel`, `clicks`, `visitors`,
`conversions`, `revenue`, and `ltv` (when `ltv=1`).
```json Response theme={null}
{
"window": { "from": "2026-06-21T00:00:00.000Z", "to": "2026-07-21T00:00:00.000Z" },
"channels": [
{
"channel": "newsletter",
"clicks": 1204,
"visitors": 980,
"conversions": 47,
"revenue": 4231.5,
"ltv": 9120.0
},
{
"channel": "twitter",
"clicks": 860,
"visitors": 731,
"conversions": 18,
"revenue": 1620.0,
"ltv": 3040.0
}
]
}
```
# Clicks
Source: https://doc.trackrev.io/developers/endpoints/clicks
GET /api/v1/clicks returns your workspace's raw click stream, newest first and cursor-paginated, authenticated with your secret API key.
```bash cURL theme={null}
curl "https://app.trackrev.io/api/v1/clicks?limit=100" \
-H "Authorization: Bearer "
```
`GET /api/v1/clicks` — the raw click stream for your workspace, newest first, cursor-paginated.
**Scope:** secret key (`lk_`).
## Query parameters
**limit** `integer` (default: 100)
Maximum clicks to return (max 500).
**before** `string (ISO 8601)`
Cursor — return clicks strictly older than this timestamp. Pass the previous response's
`next_cursor`.
**since** `string (ISO 8601)`
Only clicks at or after this timestamp. A lower bound for the whole walk — keep it on every page
while `before` moves backwards.
**link\_id** `string (uuid)`
Restrict to a single link.
**link\_ids** `string`
Comma-separated link UUIDs (max 500) — clicks on any of them. Combined with `link_id`, a click on
any listed link matches. A malformed id, or more than 500, is a `400`.
**bots** `string`
Set `bots=include` to include bot traffic. By default bots are excluded.
## Response
**clicks** `array`
Each click: `id`, `ts`, `link_id`, `visitor_id`, `channel`, `country`, `city`, `device`,
`browser`, `os`, `referer`, `is_bot`.
**next\_cursor** `string | null`
Pass back as `before` to fetch the next page. `null` means the end of the stream.
```json Response theme={null}
{
"clicks": [
{
"id": "c1a2...",
"ts": "2026-07-21T09:14:22.000Z",
"link_id": "l9f8...",
"visitor_id": "v3b4...",
"channel": "newsletter",
"country": "US",
"city": "Austin",
"device": "mobile",
"browser": "Safari",
"os": "iOS",
"referer": "https://news.example.com/",
"is_bot": false
}
],
"next_cursor": "2026-07-21T09:14:22.000Z"
}
```
```bash New clicks on your links since the last poll theme={null}
curl "https://app.trackrev.io/api/v1/clicks?link_ids=5d7c…,9a01…&since=2026-09-24T10:00:00Z" \
-H "Authorization: Bearer "
```
> [!TIP]
>
> Use `visitor_id` from a click to fetch that visitor's full
> [journey](/developers/endpoints/visitor-journey), or join the stream to your own orders table to
> build a warehouse.
# Credits
Source: https://doc.trackrev.io/developers/endpoints/credits
Credit endpoints for non-cash reward programmes: list the credit grants and balances partners and referees have earned, and mark a grant delivered.
Credit endpoints power [non-cash reward programmes](/affiliate/credits-and-fulfilment) — read what
partners and referees have earned, and confirm delivery.
## List credit grants
```bash cURL theme={null}
curl "https://app.trackrev.io/api/v1/credits?external_user_id=USER_123&status=earned" \
-H "Authorization: Bearer "
```
`GET /api/v1/credits` — credit grants and per-kind balances. **Scope:** secret key (`lk_…`) only — the grant ledger is workspace data and must not be readable with the browser-visible publishable key.
**partner\_id** `string`
Filter by partner. Provide this **or** `external_user_id`.
**external\_user\_id** `string`
Filter by your own user id. Provide this **or** `partner_id`.
**status** `string` (default: all)
`earned`, `delivered`, or `all`.
**limit** `integer` (default: 100)
Maximum grants (max 500).
**grants** `array`
Each grant: `id`, `program_id`, `partner_id`, `commission_id`, `credit_kind`, `amount`, `status`,
`external_user_id`, `referee_external_user_id`, `earned_at`, `delivered_at`, `created_at`.
**balance** `object`
Per credit-kind totals: `{ "": { "earned": N, "delivered": N } }`.
```json Response theme={null}
{
"grants": [
{
"id": 4821,
"program_id": "p1...",
"partner_id": "pa1...",
"credit_kind": "ai_credits",
"amount": 200,
"status": "earned",
"external_user_id": "USER_123",
"earned_at": "2026-07-20T10:00:00.000Z",
"delivered_at": null
}
],
"balance": { "ai_credits": { "earned": 200, "delivered": 0 } }
}
```
## Mark a grant delivered
```bash cURL theme={null}
curl -X POST "https://app.trackrev.io/api/v1/credits/4821/mark-delivered" \
-H "Authorization: Bearer "
```
`POST /api/v1/credits/{id}/mark-delivered` — flip a grant from `earned` to `delivered` after you've
applied the credit in your product. **Scope:** secret key (`lk_`).
**id** `integer` *required*
The grant id.
Returns `{ "ok": true }`, or `{ "ok": true, "already": true }` if the grant was already delivered.
Firing this also emits a `credit.delivered` [webhook](/developers/webhooks).
> [!NOTE]
>
> If you use a [fulfilment connector](/affiliate/credits-and-fulfilment#fulfilment-connectors),
> delivery is handled for you — you only need this endpoint when applying credit yourself (e.g. via
> the Webhook driver or a custom flow).
# Links
Source: https://doc.trackrev.io/developers/endpoints/links
Create tracking links, read them back, and get per-link performance — clicks, visitors, conversions and revenue.
```bash cURL theme={null}
curl "https://app.trackrev.io/api/v1/links?days=30&limit=100" \
-H "Authorization: Bearer "
```
**Scope:** secret key (`lk_`) for every links endpoint.
## Performance — `GET /api/v1/links`
Per-link performance for a time window, sorted by revenue. Paid plans.
### Query parameters
**days** `integer` (default: 30)
Last N days ending now (1–365). Alternative to `from`/`to`.
**from** `string (ISO 8601)`
Start of an explicit window `[from, to)`.
**to** `string (ISO 8601)`
End of the window; defaults to now.
**limit** `integer` (default: 100)
Maximum links to return (max 500). Ignored when `ids` is set.
**ids** `string`
Comma-separated link UUIDs (max 500). Returns **exactly those links** — every one that belongs
to your workspace, including links with no activity in the window (as zeros). Unknown ids and
other workspaces' ids are left out. Each row also carries `external_id`. A malformed id, or more
than 500, is a `400`.
**include** `string`
`include=settings` attaches each link's full [link record](#the-link-record) under `settings`.
### Response
**window** `object`
The resolved `{ from, to }` window.
**links** `array`
One row per link, sorted by revenue descending: `link_id`, `slug`, `channel`, `destination`,
`clicks`, `visitors`, `conversions`, `revenue` — plus `external_id` when `ids` is used.
```json Response theme={null}
{
"window": { "from": "2026-06-21T00:00:00.000Z", "to": "2026-07-21T00:00:00.000Z" },
"links": [
{
"link_id": "5d7c…",
"slug": "spring-newsletter",
"channel": "newsletter",
"destination": "https://yourapp.com/pricing",
"clicks": 412,
"visitors": 388,
"conversions": 21,
"revenue": 1890.0
}
]
}
```
```bash Stats for the links you already know theme={null}
curl "https://app.trackrev.io/api/v1/links?days=7&ids=5d7c…,9a01…" \
-H "Authorization: Bearer "
```
## Records — `GET /api/v1/links?view=records`
The links themselves, newest first, with no reporting window. Available on every plan.
**limit** `integer` (default: 100)
Page size (max 500).
**cursor** `string (ISO 8601)`
Pass the previous response's `next_cursor` to fetch the next page.
**channel** `string`
Only links on this channel (`x` is accepted for `twitter`).
**destination\_id** `string (uuid)`
Only the links of one campaign.
**q** `string`
Substring match on the slug.
**external\_id** `string`
Exact match on the `external_id` you set when creating the link.
Response: `{ "links": [LinkRecord], "next_cursor": "" | null }`.
## Create — `POST /api/v1/links`
Creates a campaign — one destination and one link per channel, or a single Smart Link — or adds
links to an existing campaign. Returns `201` with every link created. Available on every plan
(the Free tier's link cap applies).
### Body
**url** `string` *required*
The destination (`https://…`). Not needed — and ignored — with `destination_id`.
**name** `string` *required*
The campaign name. Not needed — and ignored — with `destination_id`.
**channel** `string`
One channel. Use `channels` for several, or `smart: true` for one Smart Link.
**channels** `string[]`
Several channels — one link each.
**smart** `boolean`
One Smart Link whose channel is inferred per click from the referer.
**external\_id** `string`
Your own id for the link (1–200 characters, matched exactly) — e.g. the id of the social post it
was published in. Unique per workspace: if a link with this `external_id` already exists, the
response is **`200`** with `{ destination_id, links: [thatLink] }` and **nothing is created**, so
retrying a create is always safe. Only allowed when the request creates exactly one link (one
`channel`, or `smart: true`); otherwise `400`.
**metadata** `object`
Any JSON object (at most 4 KB serialized), stored on the link and returned with it.
**destination\_id** `string (uuid)`
Add the link(s) to this existing campaign instead of creating a new one (`404` if it isn't in
your workspace). The campaign keeps its URL, name, tags and folder; per-link settings you don't
send (`campaign`, `targeting`, expiry, password, retargeting) are inherited from its existing
links. A campaign has one link per channel — a second link on the same channel needs a distinct
`external_id` (otherwise `409`), which is how one post published to two LinkedIn pages gets two
links. If a custom `slug` is already used by that channel's first link, the new one is numbered
(`launch-linkedin-2`).
**campaign** `string`
`utm_campaign` for the links. Defaults to the campaign name.
**slug** `string`
Custom slug: verbatim for one link, `-` for several. `409` if taken.
**external** `boolean`
The destination is on a platform you don't own (YouTube, Substack…). Own-site destinations must
share the workspace's one domain; set this for anything else.
Also accepted, as in the dashboard form: `tags`, `targeting` (`{ mobile, desktop }`),
`expires_at`, `max_clicks`, `expired_redirect_url`, `password`, `retargeting`, `folder_id`.
### Idempotency
Send an `Idempotency-Key` header (1–200 printable characters) to make any create safe to retry:
| Situation | Response |
| - | - |
| First request with the key | Runs normally |
| Same key, same body, within 24 h, after a success | The **stored** status and body, with header `Idempotent-Replayed: true` |
| Same key, different body | `409 conflict` |
| Same key while the first request is still running | `409 conflict` — retry in a few seconds |
| Same key after the first request **failed** | Runs again (failures aren't stored) |
Keys are scoped to your workspace and expire after 24 hours. Body key order doesn't matter.
### Channels
`facebook`, `instagram`, `youtube`, `linkedin`, `twitter` (send `x` or `twitter`), `tiktok`,
`newsletter`, `website`, `other`, and the social networks `threads`, `bluesky`, `mastodon`,
`pinterest`, `reddit`, `telegram`, `discord`, `tumblr`, `google_business`, `nostr`, `lemmy`,
`slack`, `devto`. Each sets `utm_source` to its key and `utm_medium` to `social` (`local` for
`google_business`). The same keys work in [bulk import](/link-tracking/bulk-import).
```json 201 Created theme={null}
{
"destination_id": "9a01…",
"links": [
{
"id": "5d7c…",
"slug": "k7x2mfp",
"short_code": "Ab3dEf9",
"url": "https://trk.yourbrand.com/k7x2mfp",
"channel": "linkedin",
"destination_id": "9a01…",
"destination": { "name": "Launch", "url": "https://yourapp.com/launch", "is_external": false, "tags": [] },
"utm_source": "linkedin",
"utm_medium": "social",
"utm_campaign": "Launch",
"utm_term": null,
"utm_content": null,
"targeting": null,
"expires_at": null,
"max_clicks": null,
"expired_redirect_url": null,
"password_protected": false,
"retargeting_enabled": false,
"external_id": "post_8812",
"metadata": { "account": "acme-company-page" },
"created_at": "2026-09-24T10:00:00.000Z"
}
]
}
```
## The link record
Every endpoint that returns a link (create, records view, `include=settings`,
`GET/PATCH /api/v1/links/:id`) uses the shape above. `external_id` and `metadata` are `null` for
links created without them.
# Me
Source: https://doc.trackrev.io/developers/endpoints/me
Which workspace a key belongs to, its plan and limits, the key itself, and which API features this deployment supports.
```bash cURL theme={null}
curl "https://app.trackrev.io/api/v1/me" \
-H "Authorization: Bearer "
```
`GET /api/v1/me` — who am I, and what can this key do. The first call to make after getting a key,
and the first thing to check when a request returns `402`.
**Scope:** secret (`lk_`) or publishable (`pk_`) key, any plan.
## Response
**workspace** `object`
`id`, `name`, `slug`, `primary_domain`, `attribution_model`, `attribution_window`, `created_at`,
and `partner_managed` — `true` when the workspace was provisioned by an API partner
([Partner workspaces](/developers/endpoints/partner-workspaces)); such workspaces are on the
top (`growth`) plan.
**plan** `object`
`tier` (`indie` or `growth`; `null` on the free plan), `name`, `status`, `covered_by` (the owner's plan that covers this workspace, if any),
`revenue_visible`, `limits` (`links`, `events` — each `{ used, limit }`, `limit:
null` meaning unlimited), `events_reset_at`. There is no commission limit: no plan caps affiliate
revenue or commission tracked. `limits.commission` is deprecated and always `{ "used": 0, "limit": null }`
(unlimited); it is kept only so older clients keep working.
**key** `object`
`id`, `label`, `scopes`, `created_at`, `last_used_at` of the key you called with.
**features** `string[]`
API capabilities this deployment supports, for feature detection. The list only grows:
| Flag | Means |
| - | - |
| `idempotency` | `Idempotency-Key` on `POST /api/v1/links` |
| `external_id` | `external_id` and `metadata` on links (create, `?external_id=` filter) |
| `destination_id` | `POST /api/v1/links` can add links to an existing campaign |
| `social_channels` | `threads`, `bluesky`, `mastodon`, … and the `x` alias |
| `link_ids_filter` | `GET /api/v1/links?ids=…` and `GET /api/v1/clicks?link_ids=…&since=…` |
| `partner_workspaces` | `/api/v1/partner/workspaces` |
| `webhook_retries` | Webhook deliveries are retried on network errors, `429` and `5xx` |
| `bio_pages` | [`/api/v1/bio-pages`](/developers/endpoints/bio-pages): link-in-bio pages with tracked buttons |
```json Response theme={null}
{
"workspace": {
"id": "0b6e…",
"name": "Acme",
"slug": "acme",
"primary_domain": "acme.com",
"attribution_model": "last_touch",
"attribution_window": 30,
"created_at": "2026-09-24T09:00:00.000Z",
"partner_managed": false
},
"plan": {
"tier": "growth",
"name": "Growth",
"status": "active",
"covered_by": null,
"revenue_visible": true,
"limits": {
"links": { "used": 42, "limit": null },
"events": { "used": 1804, "limit": null }
},
"events_reset_at": "2026-10-24T09:00:00.000Z"
},
"key": {
"id": "7c1d…",
"label": "Production backend",
"scopes": ["secret"],
"created_at": "2026-09-24T09:05:00.000Z",
"last_used_at": "2026-09-24T10:00:00.000Z"
},
"features": [
"idempotency", "external_id", "destination_id", "social_channels",
"link_ids_filter", "partner_workspaces", "webhook_retries", "bio_pages"
]
}
```
# Partner workspaces
Source: https://doc.trackrev.io/developers/endpoints/partner-workspaces
For platforms that run TrackRev on behalf of their own customers: provision one workspace per customer and get a key for it.
```bash cURL theme={null}
curl -X POST "https://app.trackrev.io/api/v1/partner/workspaces" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{ "external_id": "team_8812", "name": "Acme Marketing" }'
```
A **platform partner** is a product that uses TrackRev as its link-tracking backend — for example a
social media scheduler that creates a tracked link for every post it publishes. Instead of asking
each of its customers to sign up for TrackRev, the partner provisions a **partner-managed
workspace** per customer and drives it with an ordinary secret key.
* Partner-managed workspaces are on the top (**Growth**) plan: no link cap, and the analytics, clicks
and link-performance endpoints are available.
* They have no dashboard organization of their own; everything happens over the API.
`GET /api/v1/me` reports them with `workspace.partner_managed: true`.
## The partner key
Partner endpoints authenticate with a **partner key**, not a workspace key:
```text theme={null}
pt_live_<8 hex>_<48 hex>
```
Partner keys are issued by TrackRev — contact us to become a partner. Like workspace keys they are
shown once, stored only as a hash, and can be revoked. A partner key only works on
`/api/v1/partner/*`; a workspace key (`lk_…`) is refused there, and a partner key is refused
everywhere else (`401`).
## Get or create a workspace — `POST /api/v1/partner/workspaces`
**external\_id** `string` *required*
Your id for the customer (1–200 characters, matched exactly). One workspace per `external_id`
per partner — calling again with the same id returns the same workspace.
**name** `string` *required*
Workspace name (1–100 characters). Used when the workspace is created; an existing workspace
keeps its name.
**rotate\_key** `boolean`
For an existing workspace: mint a new key and revoke every key **you** previously minted for it
(keys the workspace's own team created are untouched).
| Outcome | Status | Body |
| - | - | - |
| Created | `201` | `{ workspace, key: "lk_live_…" }` |
| Already exists | `200` | `{ workspace, key: null }` |
| Exists, `rotate_key: true` | `200` | `{ workspace, key: "lk_live_…" }` |
`workspace` is `{ id, name, slug, partner_external_id }`. `key` is a **secret workspace key**,
labelled `partner:` — use it as `Authorization: Bearer lk_live_…` on every other
endpoint ([links](/developers/endpoints/links), [clicks](/developers/endpoints/clicks),
[webhooks](/developers/webhooks)…). It is shown **once**: store it before doing anything else. If
you lose it, call again with `rotate_key: true`.
```json 201 Created theme={null}
{
"workspace": {
"id": "0b6e…",
"name": "Acme Marketing",
"slug": "acme-marketing",
"partner_external_id": "team_8812"
},
"key": "lk_live_3f8a92c1_…"
}
```
## Look up a workspace — `GET /api/v1/partner/workspaces/:external_id`
URL-encode the `external_id`. Returns `200 { workspace }`, or `404 not_found` if none of **your**
workspaces has that id. Never returns a key.
```bash theme={null}
curl "https://app.trackrev.io/api/v1/partner/workspaces/team_8812" \
-H "Authorization: Bearer "
```
## Building on a partner workspace
* Create links with `external_id` set to your post id and an `Idempotency-Key`, so a retried
publish never creates a second link — see [Links](/developers/endpoints/links).
* One campaign (destination) per piece of content; add a link per account or network with
`destination_id`. Two links on the same network in one campaign need distinct `external_id`s.
* Destinations must share one own-site domain per workspace. Send `external: true` for
destinations on platforms the customer doesn't own.
* Read stats for the links you know with `GET /api/v1/links?ids=…` and poll new clicks with
`GET /api/v1/clicks?link_ids=…&since=…`, or subscribe to `click.created` /
`sale.created` [webhooks](/developers/webhooks).
* Check `features` on [`GET /api/v1/me`](/developers/endpoints/me) to detect what the deployment
supports.
# Referrals
Source: https://doc.trackrev.io/developers/endpoints/referrals
Enroll a user as a referrer, report referred signups and read their referral stats — the API behind product-led referral programmes.
These endpoints drive [product-led referrals](/affiliate/referral-widget): enroll each user as
a referrer, tell TrackRev when a referred person signs up so the inviter earns their reward, and
read a user's referral stats for the [dashboard embed](/developers/dashboard-embed).
All accept a **publishable** (`pk_`) or secret (`lk_`) key, so they're safe to call from the
browser.
## Enroll a referrer
```bash cURL theme={null}
curl -X POST "https://app.trackrev.io/api/v1/referrals/enroll" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"external_user_id": "USER_123",
"tier": "paid"
}'
```
`POST /api/v1/referrals/enroll` — enroll a user as a referrer and mint their referral link.
Idempotent on `(workspace, external_user_id)`.
### Body parameters
**email** `string` *required*
The user's email.
**external\_user\_id** `string` *required*
Your stable user id.
**tier** `string` *required*
`free` or `paid` — sets the reward amount.
**program\_id** `string`
Target a specific programme; defaults to your most recent one.
**name** `string`
The user's name.
**device\_id** `string`
A device fingerprint, used for self-referral checks.
### Response
**partner\_id** `string`
**program\_id** `string`
**referral\_link** `string`
The user's shareable referral URL.
**status** `string`
The enrollment status (auto-approved for referrals).
```json Response theme={null}
{
"partner_id": "pa1...",
"program_id": "p1...",
"referral_link": "https://acme.trackrev.io/user-123",
"status": "approved"
}
```
## Report a signup
```bash cURL theme={null}
curl -X POST "https://app.trackrev.io/api/v1/referrals/report-signup" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"new_user_external_user_id": "USER_456",
"email": "friend@example.com",
"ref_code": "user-123"
}'
```
`POST /api/v1/referrals/report-signup` — tell TrackRev that a referred user signed up, so the
referrer earns their reward. Idempotent per new user.
### Body parameters
**new\_user\_external\_user\_id** `string` *required*
The new user's id.
**email** `string`
The new user's email.
**device\_id** `string`
The new user's device fingerprint (for self-referral checks).
**ref\_code** `string`
The referrer's link slug — the primary way to resolve who referred them.
**\_vid** `string`
A visitor id — resolves the referrer from the most recent click if no `ref_code`.
**referrer\_external\_user\_id** `string`
Name the referrer explicitly.
The referrer is resolved in order: `ref_code` → `_vid` → `referrer_external_user_id`. TrackRev runs
[self-referral checks](/affiliate/fraud-detection); blocked grants are recorded as revoked and no
reward webhook fires.
### Response
**matched** `boolean`
Whether a referrer was found.
**program\_id** `string`
**partner\_id** `string`
**blocked** `boolean`
Whether the reward was blocked as a self-referral.
**block\_reason** `string | null`
```json Response theme={null}
{ "matched": true, "program_id": "p1...", "partner_id": "pa1...", "blocked": false, "block_reason": null }
```
> [!NOTE]
>
> If no referrer matches, the response is `{ "matched": false }` with a `200` status — a signup with
> no referrer isn't an error.
## Report a purchase
```bash cURL theme={null}
curl -X POST "https://app.trackrev.io/api/v1/referrals/report-purchase" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"external_user_id": "USER_456",
"order_id": "inv_9021",
"amount": 49.99,
"email": "friend@example.com"
}'
```
`POST /api/v1/referrals/report-purchase` — tell TrackRev a user paid, so their referrer earns the
purchase-side reward: a cash commission at the program's affiliate terms when the referrer is in
affiliate mode, the qualifying-sale credit on credit programs, and multi-tier fan-out where enabled.
Only needed when your billing is **not** a connected provider — Stripe, Paddle Billing, Polar,
Lemon Squeezy, Creem and Dodo Payments report purchases automatically through their webhooks and never need this call.
Requires a **secret** key (this mints money). Idempotent per `order_id`: replays return the same
order and never double-credit.
### Body parameters
**external\_user\_id** `string` *required*
The paying user's id in your system.
**order\_id** `string` *required*
Your order / invoice / payment id — the idempotency key.
**amount** `number` *required*
Purchase amount in major units (e.g. `49.99`).
**currency** `string`
ISO code, default `usd`.
**email** `string`
The buyer's email.
**recurring** `boolean`
`true` for a renewal — programs with first-sale-only terms skip it.
**ts** `string`
ISO timestamp of the purchase; defaults to now.
The referrer is resolved from the buyer's reported signup (`report-signup`), so report signups
first — a purchase by a user whose signup was never reported returns `{ "matched": false }`.
### Response
**matched** `boolean`
Whether the buyer was referred.
**credited** `boolean`
Whether a commission or credit was written for this call.
**order\_id** `number`
TrackRev's internal order id.
**written** `number`
How many ledger rows were written (multi-tier writes one per level).
**reason** `string`
Present when the referral matched but nothing was written because of the plan: `plan_has_no_commission_tracking` (free plan — commission tracking needs a paid plan). No paid plan caps commission, so there is no other plan-related reason.
```json Response theme={null}
{ "matched": true, "credited": true, "order_id": 8123, "written": 1 }
```
## Get referral stats
```bash cURL theme={null}
curl "https://app.trackrev.io/api/v1/referrals/stats?external_user_id=user_123&email=jane@acme.com&tier=paid&days=30" \
-H "Authorization: Bearer "
```
`GET /api/v1/referrals/stats` — a user's referral link, windowed stats, lifetime rewards and a
daily series. This is the endpoint behind the [dashboard embed](/developers/dashboard-embed).
Auto-enrolls the user if they aren't a referrer yet (idempotent — same as
[enroll](#enroll-a-referrer)).
### Query parameters
**external\_user\_id** `string` *required*
The user's id in your system.
**email** `string`
The user's email. Recommended — used as the partner identity.
**tier** `string` (default: free)
`free` or `paid` — decides which credit amount applies.
**days** `number` (default: 30)
The stats window in days, `7`–`90`.
### Response
**partner\_id** `string`
**program\_id** `string`
**status** `string`
The enrollment status (auto-approved for referrals).
**referral\_link** `string`
The user's shareable referral URL.
**days** `number`
The window the `stats` and `series` cover.
**stats** `object`
`clicks`, `signups`, `purchases` and `conversion_rate` over the selected window.
**lifetime** `object`
All-time rewards: `cash` (`currency`, `pending`, `paid`, `total`, in major currency units —
e.g. dollars) and `credits`
(per kind: `earned`, `delivered`, `pending`).
**series** `array`
One entry per day in the window: `day`, `clicks`, `signups`, `purchases`.
**reward\_mode** `string`
How this user is currently rewarded: `referrer` (credits) or `affiliate` (cash commissions).
See [Set the reward mode](#set-the-reward-mode).
**affiliate** `object`
Affiliate-mode details: `allowed` (whether the program offers the upgrade), `min_payout`
(major currency units, same as `lifetime.cash`; the threshold of the campaign the user is paid
under), `payout_methods` (the methods the program offers: any of `paypal`, `payoneer`, `wise`),
`payout_method` (the saved choice, `{ method, email, paypal_email }` with the address masked, or `null`),
`recent_commissions` (`date`, `type`, `amount`, `earnings`, `status`) and `payouts`
(`date`, `amount`, `status`).
```json Response theme={null}
{
"partner_id": "pa1...",
"program_id": "p1...",
"status": "approved",
"referral_link": "https://acme.trackrev.io/user-123",
"days": 30,
"stats": { "clicks": 214, "signups": 18, "purchases": 6, "conversion_rate": 0.028 },
"lifetime": {
"cash": { "currency": "usd", "pending": 45.5, "paid": 120, "total": 165.5 },
"credits": [ { "kind": "ai_credits", "earned": 900, "delivered": 750, "pending": 150 } ]
},
"series": [ { "day": "2026-07-01", "clicks": 4, "signups": 1, "purchases": 0 } ],
"reward_mode": "referrer",
"affiliate": {
"allowed": true,
"min_payout": 50,
"payout_methods": ["paypal", "payoneer"],
"payout_method": null,
"recent_commissions": [],
"payouts": []
}
}
```
> [!NOTE]
>
> Errors use the [standard envelope](/developers/errors) — e.g. `401 unauthorized` for a missing
> or invalid key, `400 bad_request` for invalid parameters such as a missing `external_user_id`.
## Set the reward mode
```bash cURL theme={null}
curl -X POST "https://app.trackrev.io/api/v1/referrals/reward-mode" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"external_user_id": "user_123",
"mode": "affiliate"
}'
```
`POST /api/v1/referrals/reward-mode` — switch a user between **referrer** mode (earn credits)
and **affiliate** mode (earn cash commissions at the program's commission rate). Powers the
toggle in the [dashboard embed](/developers/dashboard-embed#affiliate-upgrade). The switch
affects future conversions only — credits already earned are kept — and is reversible.
### Body parameters
**external\_user\_id** `string` *required*
The user's id in your system.
**mode** `string` *required*
`referrer` or `affiliate`.
### Response
**partner\_id** `string`
**program\_id** `string`
**reward\_mode** `string`
The mode now in effect.
```json Response theme={null}
{ "partner_id": "pa1...", "program_id": "p1...", "reward_mode": "affiliate" }
```
> [!NOTE]
>
> Errors use the [standard envelope](/developers/errors) — `403 forbidden` when the program
> doesn't allow the affiliate upgrade, `400 bad_request` for an invalid `mode` or missing
> `external_user_id`.
## Set the payout method
```bash cURL theme={null}
curl -X POST "https://app.trackrev.io/api/v1/referrals/payout-method" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"external_user_id": "user_123",
"method": "payoneer",
"email": "jane@acme.com"
}'
```
`POST /api/v1/referrals/payout-method` — save where an affiliate-mode user gets paid. Only
accepted while the enrollment is in affiliate mode (`403 forbidden` otherwise). The address is
stored on the user's enrollment in **your** program: it never changes how other merchants pay
the same affiliate, and it takes precedence over the address the affiliate set in their own
partner-portal settings when you export payouts.
### Body parameters
**external\_user\_id** `string` *required*
The user's id in your system.
**method** `string` *required*
`paypal`, `payoneer` or `wise` — and one your program offers (`400 method_not_offered` otherwise). Bank transfers aren't available yet.
**email** `string` *required*
The email on the user's account for that method. `paypal_email` is accepted as an alias.
### Response
**partner\_id** `string`
**payout\_method** `string`
**email** `string`
**paypal\_email** `string`
Only when `method` is `paypal`.
```json Response theme={null}
{ "partner_id": "pa1...", "payout_method": "payoneer", "email": "jane@acme.com" }
```
# Visitor journey
Source: https://doc.trackrev.io/developers/endpoints/visitor-journey
Get the full chronological journey for one visitor from the TrackRev API: every click, identify call and order, oldest first, from first touch to purchase.
```bash cURL theme={null}
curl "https://app.trackrev.io/api/v1/visitors//journey" \
-H "Authorization: Bearer "
```
`GET /api/v1/visitors/:id/journey` — the complete chronological journey for one visitor.
**Scope:** secret key (`lk_`).
## Path parameters
**id** `string (uuid)` *required*
The visitor id — the `visitor_id` returned by the [clicks](/developers/endpoints/clicks) endpoint.
Returns `404` if the visitor isn't in your workspace, `400` if it isn't a UUID.
## Response
**visitor** `object`
`id`, `email`, `first_seen`, `last_seen`.
**journey** `array`
The visitor's events in chronological order (oldest first) — clicks, identify events and orders —
the same data the dashboard timeline renders.
```json Response theme={null}
{
"visitor": {
"id": "v3b4...",
"email": "customer@example.com",
"first_seen": "2026-07-01T12:00:00.000Z",
"last_seen": "2026-07-21T09:20:00.000Z"
},
"journey": [
{ "type": "click", "ts": "2026-07-01T12:00:00.000Z", "channel": "newsletter", "slug": "spring" },
{ "type": "identify", "ts": "2026-07-03T08:30:00.000Z", "email": "customer@example.com" },
{ "type": "order", "ts": "2026-07-05T15:45:00.000Z", "amount": 90.0, "currency": "usd" }
]
}
```
# Errors
Source: https://doc.trackrev.io/developers/errors
How the TrackRev API reports errors: the consistent JSON error envelope every failed request returns, and what each HTTP status code means.
Errors are returned as JSON with a consistent envelope and a matching HTTP status code.
## Error envelope
```json theme={null}
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key"
}
}
```
## Status codes
| Code | HTTP | Meaning |
| - | - | - |
| `unauthorized` | 401 | Missing or invalid API key |
| `forbidden` | 403 | Key lacks the required scope (e.g. a publishable key on a secret endpoint) |
| `plan_required` | 402 | The endpoint requires a paid plan, or the action would exceed your plan's tracked-domain, workspace or team-member allowance |
| `bad_request` | 400 | Invalid parameters — the message says what |
| `not_found` | 404 | The resource isn't in your workspace |
| `conflict` | 409 | The request clashes with existing state — a taken slug, a reused `Idempotency-Key`, a second link on a campaign's channel |
| `internal` | 500 | Something went wrong on our side |
> [!NOTE]
>
> Analytics endpoints return a specific `402` message when the workspace isn't on a paid plan:
> *"The analytics API requires a paid plan (revenue reporting is a paid feature)."*
## Common causes
> [accordion] 401 unauthorized
>
> The `Authorization` header is missing or malformed, or the key was revoked. It must read
> `Authorization: Bearer ` and the key must be at least 24 characters.
> [accordion] 403 forbidden
>
> You used a publishable (`pk_`) key on an endpoint that needs a secret (`lk_`) key. Only the
> referral enroll and report-signup endpoints accept publishable keys.
> [accordion] 402 plan\_required
>
> The workspace is on the Free tier. The API is a paid-plan feature — upgrade to generate and use
> keys. The same code is returned when an action would exceed your plan's allowance, such as
> connecting a second tracked domain on Indie (Growth includes up to 10).
> [accordion] 400 bad\_request
>
> A parameter is invalid — for example a malformed date (`Invalid \`from\` date (use ISO 8601)`)
> or `from`not before`to\`.
# API introduction
Source: https://doc.trackrev.io/developers/introduction
The TrackRev REST API: read your channels, links, clicks and visitor journeys, drive referral programs and subscribe to signed webhooks for events.
TrackRev, SaaS affiliate software with link tracking and revenue attribution built in, exposes a
small, predictable REST API for reading your tracking data and driving referral programmes, plus signed outbound [webhooks](/developers/webhooks) for real-time events.
## Base URL
```text theme={null}
https://app.trackrev.io/api/v1
```
All endpoints return JSON, accept and return UTF-8, and support CORS (so browser-safe endpoints can
be called with a publishable key from any origin).
## Quick example
```bash theme={null}
curl "https://app.trackrev.io/api/v1/channels?days=30<v=1" \
-H "Authorization: Bearer "
```
```json theme={null}
{
"window": { "from": "2026-06-21T00:00:00.000Z", "to": "2026-07-21T00:00:00.000Z" },
"channels": [
{ "channel": "newsletter", "clicks": 1204, "visitors": 980, "conversions": 47, "revenue": 4231.5, "ltv": 9120.0 }
]
}
```
## What you can do
> [card] Read analytics
>
> [Channels](/developers/endpoints/channels), [Links](/developers/endpoints/links),
> [Clicks](/developers/endpoints/clicks) and
> [Visitor journeys](/developers/endpoints/visitor-journey).
> [card] Drive referrals
>
> [Enroll referrers and report signups](/developers/endpoints/referrals) for product-led referral
> programmes.
> [card] Manage credit rewards
>
> [List grants and mark them delivered](/developers/endpoints/credits).
> [card] React to events
>
> Subscribe to signed [webhooks](/developers/webhooks) for clicks, leads, sales and commissions.
## Before you start
> [!NOTE]
>
> The API is a **paid-plan** feature. Every `/api/v1` endpoint requires the workspace to be on an
> active paid plan; free workspaces receive a `402`. Generate keys under **Settings → Developers**.
**1. Create an API key**
See [Authentication](/developers/authentication).
**2. Make an authenticated request**
Send your key as a Bearer token.
**3. Handle errors and paginate**
See [Errors](/developers/errors) and
[Rate limits & pagination](/developers/rate-limits-and-pagination).
# MCP server
Source: https://doc.trackrev.io/developers/mcp
trackrev-mcp: 61 Model Context Protocol tools over stdio, from the same registry as the CLI, so Claude or Cursor can run your SaaS affiliate program.
`trackrev-mcp` exposes TrackRev as [Model Context Protocol](https://modelcontextprotocol.io)
tools: 61 of them, over stdio. Point Claude, Cursor, or anything else that speaks MCP at it and
it can create tracking links, answer revenue questions, approve partners and reconcile
commissions against your workspace.
Every tool is generated from the same command registry as the [CLI](/developers/cli), which is
generated from the same [API](/developers/introduction). One surface, three ways in — the numbers
always match the dashboard.
## Install
```jsonc Claude Desktop theme={null}
// claude_desktop_config.json
{
"mcpServers": {
"trackrev": {
"command": "npx",
"args": ["-y", "trackrev-mcp"],
"env": { "TRACKREV_KEY": "lk_live_…" }
}
}
}
```
```bash Claude Code theme={null}
claude mcp add trackrev --env TRACKREV_KEY=lk_live_… -- npx -y trackrev-mcp
```
```jsonc Cursor theme={null}
// .cursor/mcp.json
{
"mcpServers": {
"trackrev": {
"command": "npx",
"args": ["-y", "trackrev-mcp"],
"env": { "TRACKREV_KEY": "lk_live_…" }
}
}
}
```
Get a secret key from **Settings → Developers**, or with `trackrev keys create --scope secret`.
Requires Node 20 or newer.
## The tools
Each is named after the command it runs: `trackrev links create` is `trackrev_links_create`,
`trackrev payouts mark-paid` is `trackrev_payouts_mark_paid`.
| Group | Tools | What it covers |
| - | - | - |
| Analytics | 4 | channel and link performance, the raw click stream, one visitor's journey |
| Links | 7 | create, update, delete, bulk-create, QR |
| Developers | 8 | API keys, outbound webhooks |
| Setup | 7 | attribution model and window, campaign folders |
| Revenue | 5 | payment providers, sync |
| Audience | 4 | visitors, orders, CSV export |
| Domains | 7 | branded short domains, retargeting pixels |
| Affiliate | 9 | programs, partners, groups |
| Money | 5 | commissions, payouts |
| Settings | 4 | transactional email, partner-facing branding |
| Account | 1 | which workspace, plan and limits the key has |
Flags become typed parameters — `--days N` is a number, `--retarget on|off` is an enum, a
repeatable `--channel` is an array — and a parameter the CLI documents as required is required in
the schema. A parameter that isn't real is rejected **by name**: a model that guesses `partnerId`
is told the parameter is `partner`, rather than getting an unfiltered answer it believes was
filtered.
Analytics, affiliate and money tools need a **paid plan**, and fail with `plan_required` on a free
workspace. Link and account tools work on every plan.
## What it deliberately won't do
> [accordion] Destructive tools need confirm: true
>
> The 11 tools that cannot be undone — deleting a link, banning a partner, voiding a commission,
> marking a payout paid — take a `confirm` boolean that must be true. It is the MCP equivalent of
> the CLI's `--yes`, and the server enforces it as well as declaring it in the schema. Treat it
> as an intent signal, not an authorisation system: the real gate is your client asking you to
> approve the call.
> [accordion] --read-only removes them entirely
>
> Run the server with `--read-only` and every tool that changes data disappears from the list.
> 29 tools remain and nothing reachable can write. Useful for an agent whose job is to answer
> questions about the numbers.
> [accordion] No login or logout
>
> Those rewrite the local key file and prompt for a secret. Which key is in play is decided by
> whoever launched the server, not by the conversation.
> [accordion] No writing files to your disk
>
> The CLI can write a QR or a CSV export to any path you name. The MCP tools return the bytes
> instead — "write this file wherever I say" is not a capability an affiliate tool needs to hand an
> agent.
> [accordion] No creating payout batches, and no emails
>
> Creating a batch stays in the dashboard, as it does in the CLI: it applies per-group payout
> floors and platform fees, and a second implementation would eventually pay someone wrong.
> `partners approve` and `payouts mark-paid` change the record without sending the mail the
> dashboard sends, so a retry loop can't mail anyone twice — it will change the ledger twice.
## Flags
```bash theme={null}
trackrev-mcp [flags]
--read-only expose only the tools that cannot change data (29 of 61)
--profile NAME use a saved `trackrev login` profile
--api-url URL API base (default: the profile's, or app.trackrev.io)
--timeout N per-call timeout in seconds (default 60)
--version
--help
```
## No shell, no MCP client?
The same surface is plain HTTPS at [`/api/v1`](/developers/introduction) with the same key, and
the same commands are in the [CLI](/developers/cli) for anything that can run a shell command.
# Date ranges & pagination
Source: https://doc.trackrev.io/developers/rate-limits-and-pagination
How TrackRev API analytics endpoints take a time window, either the last N days or an explicit from/to range, and how to page through large result sets.
## Date ranges
Analytics endpoints ([channels](/developers/endpoints/channels),
[links](/developers/endpoints/links)) accept a time window two ways:
**days** `integer` (default: 30)
The last N days ending now. Minimum 1, maximum 365.
**from** `string (ISO 8601)`
Start of an explicit half-open window `[from, to)`.
**to** `string (ISO 8601)`
End of the window. Defaults to now if omitted. `from` must be before `to`.
```bash theme={null}
# Last 7 days
curl ".../api/v1/channels?days=7" -H "Authorization: Bearer "
# An explicit window
curl ".../api/v1/channels?from=2026-06-01&to=2026-07-01" -H "Authorization: Bearer "
```
The response echoes the resolved window:
```json theme={null}
{ "window": { "from": "...", "to": "..." }, "channels": [ ... ] }
```
## Pagination
List endpoints cap page size and paginate differently by shape.
### Limit-based
[Links](/developers/endpoints/links) and [credits](/developers/endpoints/credits) accept a `limit`:
**limit** `integer` (default: 100)
Maximum rows to return. Maximum 500.
### Cursor-based
The [clicks](/developers/endpoints/clicks) stream is cursor-paginated, newest first:
**1. Request a page**
`GET /api/v1/clicks?limit=100`
**2. Read next\_cursor**
The response includes `next_cursor` (an ISO timestamp) — or `null` at the end of the stream.
**3. Request the next page**
Pass it back as `before`: `GET /api/v1/clicks?limit=100&before=`.
## Rate limits
> [!NOTE]
>
> The TrackRev API does not impose published request-rate limits today. Throughput is bounded only
> by the per-request page-size caps above (100 default, 500 maximum) and by your paid-plan
> entitlement. Design your integration to paginate rather than request enormous pages, and cache
> analytics responses where you can.
# Referral widget
Source: https://doc.trackrev.io/developers/referral-widget
Embed TrackRev's in-app referral widget to enroll signed-in users as referrers and show them their referral link and share UI, without building your own.
The referral widget is a small script that enrolls a signed-in user as a referrer and shows them
their referral link and share UI — the drop-in way to run [product-led
referrals](/affiliate/referral-widget) without building your own UI.
## Embed it
Add the script inside your authenticated app, with a **publishable** key:
```html theme={null}
```
## Attributes
**data-key** `string` *required*
A publishable key (`pk_…`) from **Settings → Developers**. Safe to expose in the browser.
**data-user-id** `string` *required*
Your stable user id — becomes the referrer's `external_user_id`.
**data-user-email** `string` *required*
The user's email.
**data-user-tier** `string` *required*
`free` or `paid` — determines the reward amount the user earns for referrals.
The widget calls [`/api/v1/referrals/enroll`](/developers/endpoints/referrals#enroll-a-referrer) on
load, so each signed-in user is enrolled and given their link automatically.
## Completing the loop
The widget handles enrollment and sharing. To **reward** the referrer, report the referred signup
from your backend when a new user registers — see
[`/api/v1/referrals/report-signup`](/developers/endpoints/referrals#report-a-signup). Pair this with
[credit fulfilment](/affiliate/credits-and-fulfilment) to deliver the reward automatically.
If referrers can earn **cash** (the affiliate upgrade) and your billing is not a connected
provider, also report purchases —
[`/api/v1/referrals/report-purchase`](/developers/endpoints/referrals#report-a-purchase) — so
commissions are written when a referred user pays.
> [!TIP]
>
> Prefer full control over the UI? Skip the widget and call the
> [referral endpoints](/developers/endpoints/referrals) directly — the widget is just a convenient
> front end for the same API.
# Webhooks
Source: https://doc.trackrev.io/developers/webhooks
Receive a signed JSON POST at your endpoint in real time when a click, lead, sale, referral or commission happens. Subscribe only to the events you need.
Webhooks push events to your own endpoint in real time — no polling. Subscribe to the events you
care about and TrackRev sends each one as a signed JSON `POST`.
## Create a webhook
**1. Open Integrations → Webhooks**
Go to **Configuration → Integrations → "4 · Webhooks"**.
**2. Add your endpoint**
Enter an **`https://`** URL (HTTP is rejected) and select the events to subscribe to.
**3. Save your signing secret**
TrackRev shows the endpoint's signing secret (`whsec_…`) **once** — store it to verify
signatures.
## Payload
Every delivery is a `POST` with this envelope:
```json theme={null}
{
"event": "sale.created",
"workspace_id": "ws_...",
"created_at": "2026-07-21T09:20:00.000Z",
"data": { "order_id": "o1...", "amount": 90.0, "currency": "usd", "email": "customer@example.com", "is_recurring": false, "provider": "stripe" }
}
```
Headers on every request:
| Header | Value |
| - | - |
| `Content-Type` | `application/json` |
| `X-TrackRev-Event` | The event name |
| `X-TrackRev-Signature` | HMAC-SHA256 of the raw body, hex-encoded |
| `X-TrackRev-Timestamp` | Unix seconds when the delivery was signed |
| `X-TrackRev-Signature-V2` | HMAC-SHA256 of `"{timestamp}.{rawBody}"`, hex-encoded — verify this one and reject deliveries older than a few minutes to stop replays |
## Verify the signature
Compute `HMAC-SHA256(rawBody, signingSecret)` and compare (constant-time) to
`X-TrackRev-Signature`:
```js theme={null}
import crypto from "node:crypto";
function verify(rawBody, signature, secret) {
const expected = crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
}
```
> [!WARNING]
>
> Verify against the **raw** request body, exactly as received — not a re-serialised object — or the
> signature won't match.
## Events
| Event | Fires when | `data` |
| - | - | - |
| `click.created` | Someone clicks a tracking link (humans only) | `click_id, ts, link_id, external_id, slug, channel, visitor_id, device, browser, os, country, referer` |
| `lead.created` | A visitor is identified by email | `email, visitor_id` |
| `sale.created` | An attributed purchase comes in | `order_id, amount, currency, email, is_recurring, subscription_id, provider, link_id, channel, visitor_id` |
| `referral.enrolled` | A user opts into a referral programme | `program_id, partner_id, external_user_id, email, tier, referral_link` |
| `partner.first_commission` | A partner earns from their network for the first time | `partner_id, program_id, chain_level, earnings` |
| `credit.earned` | A referral qualifies an inviter for credit | `id, program_id, partner_id, credit_kind, amount, external_user_id, referee_external_user_id` |
| `credit.delivered` | A credit grant is delivered | same as `credit.earned` |
### Event fields
* **`click.created`** — `click_id` is the click's id (the `id` in
[`GET /api/v1/clicks`](/developers/endpoints/clicks)), `ts` its timestamp, `visitor_id` the
visitor who clicked, and `external_id` the link's own [`external_id`](/developers/endpoints/links)
(`null` if it has none). For a Smart Link, `channel` is the channel inferred for this click.
* **`sale.created`** — when the sale was attributed to a click, `link_id` and `channel` name the
credited link (with split credit, the most recent click) and `visitor_id` the buyer's visitor;
all three are `null` for a sale with no click credit (e.g. coupon-only).
```json click.created theme={null}
{
"event": "click.created",
"workspace_id": "0b6e…",
"created_at": "2026-09-24T10:00:01.000Z",
"data": {
"click_id": 918273,
"ts": "2026-09-24T10:00:00.412+00:00",
"link_id": "5d7c…",
"external_id": "post_8812",
"slug": "k7x2mfp",
"channel": "linkedin",
"visitor_id": "c0de…",
"device": "mobile",
"browser": "Safari",
"os": "iOS",
"country": "US",
"referer": "https://www.linkedin.com/"
}
}
```
## Delivery behaviour
* Each event is delivered to every active webhook subscribed to it.
* Each attempt times out after 5 seconds. A delivery that fails with a network error, a timeout,
`429` or a `5xx` is retried — up to **3 attempts**, 0.5 s and then 2 s apart, all within about
10 seconds. Other responses (`2xx`, `3xx`, `4xx`) are final.
* Retries send the **identical** body and headers (same `X-TrackRev-Timestamp` and signatures), so
you can de-duplicate on the body — e.g. `click_id` for clicks, `order_id` for sales.
* Delivery is best-effort — TrackRev records the final attempt's status but does not block your
product on your endpoint. Credit deliveries made by the fulfilment worker are attempted once.
* Return a `2xx` quickly; do heavy work asynchronously on your side.
> [!NOTE]
>
> Manage webhooks (add, disable, delete) from the same Integrations section. Each row shows its last
> delivery status and time.
# Core concepts
Source: https://doc.trackrev.io/getting-started/core-concepts
The vocabulary behind TrackRev affiliate software: workspaces, links, channels, visitors, events, orders and attribution, so every number reads clearly.
TrackRev is affiliate software with link tracking and revenue attribution built in, and the
whole product shares one vocabulary. Learn these ten terms once and every dashboard reads clearly.
## Workspace
A **workspace** is one brand or product you're tracking — its links, channels, visitors,
revenue and affiliate programme all live inside it. Everything you do in TrackRev happens in
the context of a workspace, and data never leaks between workspaces.
Most people run one workspace. Agencies and multi-product teams run several and switch
between them from the workspace switcher in the sidebar. Your plan sets how many workspaces
you can own: Free and Indie are one workspace; Growth allows up to 10.
> [!NOTE]
>
> Your **workspace ID** is the UUID you put in the pixel's `data-id`. Find it on the
> Integrations tab.
## Link
A **link** is a branded short URL you create in TrackRev — for example
`go.yourbrand.com/spring`. Every link has a destination, a channel, and optional UTM
parameters baked in. When someone clicks it, TrackRev records the click server-side, tags
the visitor, and redirects to the destination.
* **Slug** — the short path after the domain (`spring` in the example above). You choose it,
accept an AI-suggested one, or let TrackRev generate one.
* **Destination** — where the click ultimately lands.
## Channel
A **channel** is the acquisition source a link belongs to — *newsletter*, *twitter*,
*affiliate*, *paid-search*, and so on. Channels are how TrackRev rolls thousands of
individual clicks and sales up into an answer to the only question that matters: **which
source pays your MRR?** Every link belongs to a channel, so revenue always rolls up by
channel automatically.
## Campaign
A **campaign** is a folder that groups links for a specific push — a product launch, a
Black Friday sale, a webinar. Campaigns give you date ranges, tags and bulk actions across a
set of links without changing how each link attributes.
## Visitor
A **visitor** is one person TrackRev is following, identified by a first-party `vid`
(visitor id). The `vid` is created at the first click (or first pageview) and stored as a
first-party cookie on your domain, so it survives across your marketing site, app and
checkout. When you call `identify(email)`, that email is attached to the visitor — which is
how an anonymous clicker becomes a known, paying customer in the timeline.
## Event
An **event** is something a visitor did that the pixel reported: a **pageview**, an
**identify** (email attached), or a custom **track** event you fire yourself. Events build
the [visitor journey](/revenue-attribution/visitors) and count toward your monthly
tracked-events allowance.
## Order (sale)
An **order** is a real charge pulled from your payment processor — Stripe, Paddle Billing,
Polar, Lemon Squeezy, Creem or Dodo Payments. TrackRev joins each order back to a visitor using the checkout reference you
pass (`client_reference_id` / `metadata.vid`) or, failing that, the customer's email. An
order is TrackRev's single **definition of a sale** — the same one used by channel reports,
the visitor journey and affiliate commissions, which is why every number reconciles.
## Attribution model
An **attribution model** decides which touch gets credit for an order when a visitor
clicked more than one link on the way to buying. TrackRev supports:
> [card] Last-touch
>
> All credit to the most recent link before the sale. The default.
> [card] First-touch
>
> All credit to the very first link that brought the visitor in.
> [card] Linear
>
> Credit split evenly across every touch in the journey.
You switch models at any time **without re-tagging anything** — TrackRev recomputes from the
same underlying events. See [Attribution models](/revenue-attribution/attribution-models).
## Attribution window
The **attribution window** is how far back TrackRev looks from a sale when assigning credit.
A click older than the window doesn't get credit. It's configurable per workspace; SaaS
teams commonly run 30–60 days to match their consideration cycle. See
[Attribution windows](/revenue-attribution/attribution-windows).
## Commission & partner
When a sale comes through your affiliate programme, TrackRev records a **commission** — the
partner's cut of that order — on the affiliate ledger. A **partner** (affiliate) is someone
enrolled in your programme with their own referral links and a portal to track earnings.
Because commissions are computed from the same orders as everything else, a refund on a sale
automatically reverses the commission. See [Affiliate overview](/affiliate/overview).
***
## How the pieces fit together
**1. A link belongs to a channel**
You create a **link** for a **channel**, optionally inside a **campaign**.
**2. A click creates a visitor**
A click on that link records the click and creates (or matches) a **visitor** with a
`vid`.
**3. Events build the journey**
The pixel reports **events** — pageviews, an identify, custom events — under that `vid`.
**4. An order joins back to the visitor**
A charge becomes an **order**, joined to the visitor by the checkout reference or email.
**5. The model assigns credit**
Your **attribution model** and **window** decide which channel — and which **partner**,
if any — gets the credit.
> [card] [Ready to see it live?](/getting-started/quickstart)
>
> The Quickstart takes you from sign-up to your first attributed click in five minutes.
# Install the tracking pixel
Source: https://doc.trackrev.io/getting-started/install-pixel
Add one script tag to your site so TrackRev can tie browser sessions to clicks and join them to revenue.
The TrackRev pixel (`p.js`) is a dependency-free script — under 3 KB — that connects a
browser session to the visitor TrackRev is following. It records pageviews, lets you attach
an email to a visitor with `identify()`, and hands the visitor's identity through to your
checkout so a purchase can be joined back to the click that produced it.
> [!NOTE]
>
> You only need the pixel for **revenue attribution** and **pageview analytics**. Click
> tracking on your short links works without it — clicks are recorded server-side at the
> redirect. Install the pixel on the destination site (your marketing site *and* your app),
> not on the link.
## Get your snippet
**1. Open the Integrations tab**
In your workspace, go to **Settings → Integrations** (the top-level **Integrations** link
redirects here). Your install snippet is shown under **"1 · Install the pixel"**, pre-filled
with your workspace ID.
**2. Copy the script tag**
It looks like this — `data-id` is your workspace UUID:
```html theme={null}
```
**3. Paste it into your site head**
Add it to every page you want to track. On most sites that means the shared layout,
template, or `` partial so it loads everywhere at once.
**4. Verify it's live**
Back on the Integrations tab, click **Verify pixel**. TrackRev loads your site and
confirms the script is firing. See [Verify your install](#verify-your-install) below.
## Where to add it, by stack
```html HTML theme={null}
```
```jsx Next.js (App Router) theme={null}
// app/layout.tsx
import Script from "next/script";
export default function RootLayout({ children }) {
return (
{children}
);
}
```
```jsx React (Vite / CRA) theme={null}
// index.html — add inside
```
```html Google Tag Manager theme={null}
```
```html Webflow / Framer / Squarespace theme={null}
```
## What the pixel does automatically
Once loaded, the pixel:
* **Resolves a visitor id (`vid`).** If the visitor arrived through a TrackRev link, the
redirect handed off the id in the URL (`?_vid=…`) and that always wins, so the
server-side click and this browser session share one identity. Otherwise it reads (or
creates) a first-party `vid` cookie.
* **Writes the `vid` cookie on your registrable domain** (e.g. `.example.com`), so one
identity spans your marketing site, app and checkout subdomains. The cookie is
first-party and lasts one year.
* **Sends the first pageview**, then exposes `window.trk` for everything else.
* **Decorates hosted checkouts with the visitor id.** Stripe Payment Links and
``/`` embeds, Polar checkout links, Creem payment
links, Dodo static payment links and Paddle hosted checkouts on your pages get the `vid`
appended automatically (each in its provider's format), so no-code checkouts attribute to
the exact click with zero wiring. Add `data-trk-no-decorate` to any element you want left
alone.
* **Fires a `trk:ready` event on `window`** once initialized, for inline code that needs to
run after the pixel.
> [!NOTE]
>
> Because the cookie is set from **your** domain, not a third-party tracker, it is not
> blocked by Safari ITP the way third-party cookies are, and it is invisible to most
> ad-blockers. This is what "first-party tracking" means in TrackRev.
## The `window.trk` API
After the script loads, these methods are available on `window.trk`:
**window\.trk.vid** `string`
The current visitor id. Pass this to your checkout so a purchase can be joined back to the
click — see [Connect your revenue](/revenue-attribution/connect-stripe).
**window\.trk.identify(email, props?)** `function`
Attach an email (and optional properties) to the current visitor. Call it the moment you
learn who someone is — on sign-up, login, or newsletter subscribe. Email is TrackRev's
fallback for joining a payment to a visitor when no checkout reference is present.
**window\.trk.track(event, props?)** `function`
Record a custom event (e.g. `"signup"`, `"trial_started"`) with arbitrary properties.
**window\.trk.pageview()** `function`
Manually record a pageview. Useful in single-page apps where route changes don't reload
the document — call it on every client-side navigation.
### Identify a visitor
Call `identify()` as soon as you know the visitor's email:
```js theme={null}
// After a successful sign-up or login
window.trk?.identify("customer@acme.com");
// With extra properties
window.trk?.identify("customer@acme.com", { plan: "pro", name: "Dana" });
```
### Track a custom event
```js theme={null}
window.trk?.track("trial_started", { plan: "pro" });
```
### Record pageviews in a single-page app
The pixel fires one pageview on load. In an SPA, fire one on each route change:
```jsx theme={null}
// e.g. in a Next.js route-change effect or React Router listener
useEffect(() => {
window.trk?.pageview();
}, [pathname]);
```
## Options
Set these as attributes on the script tag.
**data-id** `string` *required*
Your workspace UUID. Found on the Integrations tab. The pixel does nothing without it.
**data-cookie-domain** `string`
Force the cookie's `Domain` explicitly, e.g. `.example.com`. By default the pixel detects
your registrable domain automatically; set this only if auto-detection picks the wrong
scope (rare — mostly needed on unusual multi-domain setups).
**data-requires-consent** `boolean`
GDPR mode. With `data-requires-consent="true"`, the pixel sets no cookie and sends no
events until your consent banner calls `window.trk.grantConsent()`. The choice persists in
`localStorage`, so it's asked once.
> [!TIP]
>
> **Debugging:** open any page with `?trk_test=1` and the pixel logs its state (workspace,
> vid, cookie domain) and every checkout link it decorates to the browser console.
```html theme={null}
```
## Verify your install
**1. Run the built-in check**
On the **Integrations** tab, click **Verify pixel**. TrackRev fetches a page from your
site and confirms the script is present and firing. A green tick means you're done.
**2. Or check it yourself in the console**
Open your site, open the browser dev tools console, and type:
```js theme={null}
window.trk
```
You should see an object with `identify`, `track`, `pageview` and a `vid` string. If it's
`undefined`, the script hasn't loaded — check that the tag is in the `` and that no
content blocker is stripping it.
**3. Confirm the cookie**
In dev tools → Application → Cookies, look for a `vid` cookie on your domain. Its presence
confirms the pixel is identifying the visitor.
> [!WARNING]
>
> If `window.trk` is defined but revenue never attributes, the usual cause is that the `vid`
> isn't reaching your checkout. Make sure you pass `window.trk.vid` as the checkout reference —
> see [Pass the visitor id to checkout](/revenue-attribution/pass-vid-to-checkout).
## Next steps
> [card] [Connect your revenue](/revenue-attribution/connect-stripe)
>
> Link your payment processor so clicks become attributed revenue.
> [card] [Pass the visitor id to checkout](/revenue-attribution/pass-vid-to-checkout)
>
> The one line that joins a purchase back to the click that earned it.
# The onboarding wizard
Source: https://doc.trackrev.io/getting-started/onboarding
A walkthrough of the guided setup you see when you first create a workspace — and the dashboard checklist that resumes it.
When you first sign up, TrackRev runs a short guided wizard — about three minutes — that gets
you from an empty workspace to tracking real revenue. Every step after the welcome is skippable,
and a dashboard checklist lets you finish anything you skip later.
## The steps
**1. Welcome**
A quick intro to the core loop: track every click, follow the whole journey, see real
revenue. Click **Get started**.
**2. Install the pixel**
Copy your one-line snippet and paste it into your site's ``. When TrackRev receives its
first event, this step shows *"We've received data from your pixel — you're all set."* Full
guide: [Install the pixel](/getting-started/install-pixel).
**3. Connect Stripe**
Paste a read-only restricted key so TrackRev can attribute revenue. Full guide:
[Connect Stripe](/revenue-attribution/connect-stripe).
**4. Create your first campaign**
Choose one of two starting points:
* **Tracking link** — a short link per channel. Enter a campaign name, destination URL and
pick channels.
* **Referral campaign** — stand up an affiliate programme (name + commission rate, default
20%). See [Launch an affiliate programme](/affiliate/create-program).
Either one completes the step.
**5. Invite your team**
Optionally invite teammates by email and assign a role (**Member** or **Admin**). See
[Team & roles](/account/team-and-roles).
**6. You're all set**
Shortcuts to your dashboard, links, and settings. Click **Go to dashboard**.
## The dashboard checklist
If you skip steps, the dashboard shows a **"Finish setting up "** card with the
remaining tasks, each linking straight to the relevant settings page. It disappears once every
step is done or you dismiss it.
> [!NOTE]
>
> Completion is derived from real data, not a stored flag — so if you install the pixel or create
> a link **outside** the wizard, the matching step is automatically marked done. You can't get
> stuck in a half-finished state.
## What "workspace" means here
Your workspace is backed by an organisation in TrackRev's account system. If your account has no
active organisation yet, you'll be prompted to pick or create one before the workspace-specific
steps appear. Learn more in [Workspaces](/account/workspaces).
# Quickstart
Source: https://doc.trackrev.io/getting-started/quickstart
Set up TrackRev in about five minutes: create a workspace, make a tracking link, install the pixel and connect revenue to see a click tied to a real sale.
This guide takes you all the way through the core loop: create a workspace, make a tracking
link, install the pixel, connect revenue, and watch a click turn into attributed revenue.
You'll have a live dashboard by the end.
> [!NOTE]
>
> Only have two minutes? Steps 1–3 get you tracking clicks. Steps 4–5 add revenue
> attribution and can wait until you're ready to connect your payment processor.
## 1. Create your workspace
**1. Sign up**
Go to [trackrev.io](https://trackrev.io) and create an account with email or Google.
**2. Name your workspace**
Onboarding asks for your product's name and website. This becomes your first
[workspace](/getting-started/core-concepts#workspace) — the container for all your links,
channels, visitors and revenue.
## 2. Create your first tracking link
**1. Open Campaigns → New campaign**
In the sidebar, go to **Campaigns** and click **New campaign**. In TrackRev a *campaign*
is one destination plus **one short link per channel** you select — so you tag every place
you'll share it in one shot.
**2. Name it and paste your destination**
Give the campaign a name (e.g. *Spring launch*) and enter the destination URL. Leave
"Where does this link send people?" on **My own site** so conversions can attribute.
**3. Pick your channels**
Tick one or more [channels](/getting-started/core-concepts#channel) — *Newsletter*,
*X / Twitter*, *LinkedIn*, and so on. TrackRev bakes the right UTMs in per channel and
mints a link for each.
**4. Choose a slug and create**
Accept the AI-suggested slug, type your own, or let TrackRev generate one, then click
**Create links**. Each link is live immediately — every click is recorded **server-side**,
so no pixel is required for click tracking.
> [!TIP]
>
> Want branded links like `go.yourbrand.com/spring` instead of `trackrev.io/spring`? Add a
> [custom tracking domain](/link-tracking/custom-domains) — it takes one DNS record.
## 3. Install the pixel
The pixel connects browser sessions to visitors and powers pageview analytics and revenue
attribution. Add one script tag to your site's ``:
```html theme={null}
```
Find your `data-id` on the **Integrations** tab, then click **Verify pixel** to confirm it's
firing. Full instructions and framework snippets are in
[Install the tracking pixel](/getting-started/install-pixel).
## 4. Connect your revenue
This is the step that turns clicks into **attributed revenue**.
**1. Connect your payment processor**
On **Integrations**, connect Stripe, Paddle Billing, Polar, Lemon Squeezy, Creem or Dodo Payments. For Stripe you paste
a **read-only restricted API key** — TrackRev never gets write access to your account.
See [Connect Stripe](/revenue-attribution/connect-stripe).
**2. Pass the visitor id to checkout**
Add one line so purchases can be joined back to clicks. For Stripe Checkout:
```js theme={null}
// when you create the Checkout Session
client_reference_id: window.trk.vid
```
TrackRev matches the resulting charge to the visitor via this reference (email is the
fallback). See [Pass the visitor id to checkout](/revenue-attribution/pass-vid-to-checkout).
## 5. Watch a sale attribute
**1. Make a test click and purchase**
Click one of your own tracking links, then complete a real or test-mode purchase passing
the `vid` through checkout.
**2. Let the sync run**
With instant sync enabled the order appears under **Orders** within seconds, joined to
your visitor; otherwise the scheduled pull (roughly hourly) catches it on the next run.
**3. Read the channel report**
Open **Attribution**. Your test sale is now credited to the channel of the link you
clicked — the first row of "which channel actually pays."
> [!TIP]
>
> You've completed the core loop: click → visitor → event → order → attributed channel.
## Where to go next
> [card] [Add a custom domain](/link-tracking/custom-domains)
>
> Put your links on your own branded short domain with automatic TLS.
> [card] [Choose an attribution model](/revenue-attribution/attribution-models)
>
> Switch between last-touch, first-touch and linear without re-tagging.
> [card] [Launch an affiliate programme](/affiliate/create-program)
>
> Turn your best channel into a partner army with commissions from real charges.
> [card] [Explore the API](/developers/introduction)
>
> Automate link creation and pull your data programmatically.
# Launch an affiliate programme in a day
Source: https://doc.trackrev.io/guides/launch-an-affiliate-program
Launch a live, branded affiliate programme in a day with this practical checklist, from connecting revenue and branding your pages to your first partners.
You can stand up a real affiliate programme in an afternoon. This guide is the practical order of
operations. It assumes you've already [connected your revenue](/revenue-attribution/connect-stripe)
— commissions are computed from real charges, so revenue sync comes first.
**1. Brand your affiliate pages**
Go to **Affiliate program → Configuration → Branding** and set your **subdomain**
(`yourbrand.trackrev.io`), **logo** and **accent colour**. For a full white-label, connect a
[custom domain](/link-tracking/custom-domains). See
[Partner portal & branding](/affiliate/partner-portal).
**2. Create the programme**
**Affiliate program → Program → New campaign.** Choose cash or credit rewards, an approval mode,
and set the commission (default 20%), recurring policy, cookie window (default 60 days) and
minimum payout. See [Create a programme](/affiliate/create-program).
**3. Decide recurring vs one-time**
For subscription products, **lifetime** or **N-month** recurring commissions are the norm — they
reward partners for customers who stay. See [Commission structures](/affiliate/commissions).
**4. (Optional) turn on multi-tier**
To let partners recruit partners, enable **Multi-tier commissions** and set the pool (default
30%) and tier-1 rate (default 10%). See [Multi-tier](/affiliate/multi-tier).
**5. Write the pitch and welcome message**
Fill the programme **description** (shown on the signup page) and **welcome message** (greets new
partners in their portal). These do a lot of the recruiting for you.
**6. Add an email kit**
Create one **email kit** so partners have a ready-made, correctly-tracked email to send. See
[Messaging & email kits](/affiliate/messaging-and-email-kits).
**7. Recruit your first partners**
Share your public signup link, and **invite** a handful of known partners directly. Approve
applications as they arrive. See [Recruit & approve partners](/affiliate/recruiting).
**8. Prepare payouts**
Confirm your accepted [payout methods](/affiliate/payouts) and ask partners to complete their
payout details and [tax form](/affiliate/tax-forms) before your first month-end batch.
> [!TIP]
>
> Your programme is live: partners can sign up, share tracked links, and earn commissions computed
> from real Stripe charges — with refunds reversing automatically.
> [!TIP]
>
> The first week decides retention. Send a welcome, give partners their email kit, and message your
> top few directly — most programmes lose affiliates in the gap between "approved" and "first
> sale."
# Migrate from Rewardful (or FirstPromoter, Tolt, Tapfiliate)
Source: https://doc.trackrev.io/guides/migrate-from-rewardful
Move an affiliate programme from Rewardful, FirstPromoter, Tolt or Tapfiliate to TrackRev: recreate your terms, import partners and repoint your signup link.
Moving an affiliate programme to TrackRev mostly means re-creating your commission terms, bringing
partners across, and repointing your signup link. Because TrackRev computes commissions from your
real charges, you also gain refund reversal and true recurring/LTV tracking that link-only tools
can't match.
> [card] [Import your affiliates from a CSV](/affiliate/migration/overview)
>
> **Settings → Migration** imports affiliates, referral codes, coupon codes, and unpaid balances
> from FirstPromoter, Rewardful, Tolt, and others in one upload. This guide is the wider cutover
> checklist around it.
**1. Connect your revenue first**
TrackRev commissions come from actual charges, so
[connect your payment processor](/revenue-attribution/connect-stripe) before anything else. This
is also what powers automatic refund reversal.
**2. Re-create your programme**
In [Create a programme](/affiliate/create-program), match your existing terms: commission type
and rate, recurring policy, and **cookie window** (set it to match your old tool so in-flight
referrals attribute consistently).
**3. Bring your partners across**
Export your affiliates and [import the CSV](/affiliate/migration/overview) — referral codes
come with them, so links they've already shared keep working once you repoint the domain. For a
handful of partners,
[inviting them individually](/affiliate/recruiting#invite-a-partner-directly) works too.
**4. Carry over coupon codes**
The import brings coupon codes across with each affiliate. Added someone by hand? Set their
**coupon code** on the enrollment so coupon sales keep crediting them — see
[Coupon-code tracking](/affiliate/commissions#coupon-code-tracking).
**5. Brand and repoint the signup page**
Set your [subdomain and branding](/affiliate/partner-portal), then update your website's
"become an affiliate" link to the new TrackRev signup URL.
**6. Communicate the move**
Message partners with their new portal link and confirm their payout details and
[tax form](/affiliate/tax-forms) are on file for the next payout run.
**7. Run in parallel briefly, then cut over**
Keep the old tool read-only for a short window to reconcile any pending payouts, then fully cut
over once TrackRev is recording sales correctly.
> [!WARNING]
>
> Individual historical commissions aren't imported — TrackRev's ledger starts at your go-live
> date. What each affiliate is still **owed** does come across (as a carried-over commission), so
> your first payout run here settles the balance your old tool was showing.
## What you gain
| Capability | Link-only affiliate tools | TrackRev |
| - | - | - |
| Commissions from real charges | Varies | ✅ Always |
| Automatic refund/chargeback reversal | Varies | ✅ |
| True recurring & LTV tracking | Limited | ✅ |
| Tracks **non-affiliate** channels too | ✗ | ✅ Same data model |
| One definition of a sale across products | ✗ | ✅ |
> [card] [Then launch](/guides/launch-an-affiliate-program)
>
> Follow the launch checklist to finish standing up the programme.
# Set up Stripe attribution end to end
Source: https://doc.trackrev.io/guides/stripe-attribution-end-to-end
A complete walkthrough — from your first tracking link to a Stripe sale credited to the right channel.
This guide wires the whole loop together for a Stripe-powered SaaS: tracking links, the pixel, a
read-only Stripe connection, and the one line at checkout that makes attribution exact. Budget
about 15 minutes.
**1. Create a tracking link per channel**
Go to **Campaigns → New campaign**, set your destination (e.g. your pricing page), and tick the
channels you'll share it on. TrackRev mints one link per channel with UTMs baked in. Full
details: [Create links](/link-tracking/create-links).
**2. Install the pixel on your site and app**
Add the snippet to the `` of every page — marketing site *and* app:
```html theme={null}
```
Then click **Check pixel** on the Integrations tab. See
[Install the pixel](/getting-started/install-pixel).
**3. Identify users when you know them**
Call `identify()` on sign-up or login so an email is tied to the visitor (this is the fallback
that catches sales without a checkout reference):
```js theme={null}
window.trk?.identify("customer@example.com");
```
**4. Connect Stripe with a read-only key**
On **Integrations → Connect your revenue provider**, choose **Stripe** and use **Quick connect**
to create a restricted key with the pre-selected read scopes (include `rak_webhook_write` for
instant sync). Paste the `rk_…` key. See [Connect Stripe](/revenue-attribution/connect-stripe).
**5. Pass the visitor id at checkout**
Set the visitor id on the Checkout Session so the sale joins to the click exactly:
```js theme={null}
const vid = (await cookies()).get("vid")?.value;
const session = await stripe.checkout.sessions.create({
mode: "subscription",
line_items: [/* ... */],
success_url: "https://yourapp.com/thanks",
client_reference_id: vid, // ← the join key
});
```
More options (Payment Links, Pricing Table) in
[Pass the visitor id to checkout](/revenue-attribution/pass-vid-to-checkout).
**6. Verify the checkout wiring**
On **Integrations → Verify your checkout setup**, click **Check attribution setup**. Aim for an
**OK** — it confirms a `vid` is present and matches a tracked visitor.
**7. Make a test sale and read the report**
Click one of your links, complete a (test-mode) purchase passing the `vid`, and wait for the
sync (hourly, or seconds with the webhook). The order appears under **Orders**, and
**Channels** credits it to the right channel.
**8. Choose your model and window**
On **Attribution**, pick last-touch, first-touch or linear and set your window (default 30
days). See [Attribution models](/revenue-attribution/attribution-models).
> [!TIP]
>
> You now have every Stripe sale credited to the channel that earned it — and lifetime value by
> channel building as subscriptions renew.
## Troubleshooting
> [accordion] Orders show as Unmatched
>
> The `vid` isn't reaching Stripe. Confirm the pixel is on the page checkout starts from, and that
> you pass `client_reference_id: window.trk.vid`. Email matching only works if you also called
> `identify(email)`.
> [accordion] No orders at all
>
> Check the Stripe key is valid (the verifier reports `error` if it's revoked or missing a scope),
> and click **Sync now**. First sync looks back 30 days.
> [accordion] Revenue is hidden
>
> Revenue attribution is a paid feature — upgrade from the Free tier to reveal it. See
> [Plans & billing](/account/plans-and-billing).
# Track a single-page app
Source: https://doc.trackrev.io/guides/track-a-single-page-app
Record pageviews on client-side route changes in React, Vue or any single-page app: load the TrackRev pixel once and fire a pageview on each navigation.
The pixel fires one pageview when the document loads. In a single-page app, navigations don't
reload the document — so you fire a pageview yourself on each route change. Everything else (the
`vid`, `identify`, revenue attribution) works unchanged.
## 1. Load the pixel once
Add the script to your app shell so it loads on first paint:
```html theme={null}
```
## 2. Fire a pageview on each route change
```jsx React Router theme={null}
import { useEffect } from "react";
import { useLocation } from "react-router-dom";
export function usePageviews() {
const location = useLocation();
useEffect(() => {
window.trk?.pageview();
}, [location.pathname]);
}
```
```jsx Next.js (App Router) theme={null}
"use client";
import { useEffect } from "react";
import { usePathname } from "next/navigation";
export function usePageviews() {
const pathname = usePathname();
useEffect(() => {
window.trk?.pageview();
}, [pathname]);
}
```
```js Vue Router theme={null}
router.afterEach(() => {
window.trk?.pageview();
});
```
> [!NOTE]
>
> Use optional chaining (`window.trk?.pageview()`) so a route change never throws if the script
> hasn't finished loading yet.
## 3. Identify and track as usual
These don't depend on route changes — call them whenever the event happens:
```js theme={null}
// on login / signup
window.trk?.identify("customer@example.com");
// a custom conversion event
window.trk?.track("trial_started", { plan: "pro" });
```
## 4. Pass the vid at checkout
If checkout runs client-side, read `window.trk.vid` when you create the session; if it runs
server-side, read the `vid` cookie. See
[Pass the visitor id to checkout](/revenue-attribution/pass-vid-to-checkout).
> [!TIP]
>
> Your SPA now records a pageview per navigation, and the visitor journey shows the full in-app
> path — not just the landing page.
# Welcome to TrackRev
Source: https://doc.trackrev.io/introduction
Run your SaaS affiliate program with no limit on tracked revenue. TrackRev is affiliate software for indie hackers and small SaaS teams, from $29/month.
**Run your SaaS affiliate program with no limit on tracked revenue.** TrackRev is SaaS
affiliate software for indie hackers and small SaaS teams, with link tracking and revenue
attribution built in. Neither paid plan caps or meters the affiliate revenue you track, and
TrackRev takes 0% of it, so your bill does not grow as your partners do. Plans start at
\$29/month.
Under the programme sits the tracking layer: every partner click is tied to the real charge
it produced, on one data model and one definition of a sale. That is why a refund reverses a
commission automatically, and why every number reconciles to the same Stripe, Paddle Billing,
Polar, Lemon Squeezy, Creem or Dodo Payments charge.
> [card] [Affiliate program](/affiliate/overview)
>
> Recurring and one-time commissions reconciled to real charges, a white-label partner
> portal, PayPal and Wise payout exports and a commission ledger. The alternative to
> Rewardful, FirstPromoter, Tolt and Tapfiliate.
> [card] [Links & Analytics](/link-tracking/overview)
>
> The tracking layer: branded short links on your own domain with first-party,
> server-side click tracking that survives Safari ITP and iOS. Every partner gets one.
> [card] [Revenue Attribution](/revenue-attribution/overview)
>
> The tracking layer: each click joined to the charge it earned, with first-touch,
> last-touch and linear models, so you can rank channels by revenue and retained MRR.
## Why one platform
Most small teams stitch together an affiliate tool, a link shortener and an attribution cron.
That is three bills, three dashboards, and three different definitions of a "conversion"
that never reconcile. TrackRev is one product, affiliate software, with link tracking and
revenue attribution built into it. A click, a visitor and a sale mean the same thing
everywhere, so the partner report, the visitor journey and the commission ledger all trace
back to the same charge.
> [!NOTE]
>
> New to TrackRev? The fastest path to a live dashboard is the
> [5-minute Quickstart](/getting-started/quickstart). It walks you from sign-up to your
> first tracked, attributed click.
## The core loop
Everything TrackRev does follows one loop. Understanding it makes every feature obvious.
**1. Generate a tracking link**
Paste a destination URL and TrackRev mints a short link — one per channel, with UTMs
baked in — on your own branded domain.
**2. A visitor clicks**
TrackRev logs the click **server-side**, drops a first-party `vid` cookie, and 302s to
your destination. Because the click is recorded on the server, it survives ad-blockers
and Safari's tracking prevention.
**3. The pixel ties the session to the visitor**
A lightweight pixel (`p.js`) on your site connects the browser session to that `vid`,
records pageviews, and — when you know who the visitor is — an `identify(email)` call.
**4. A payment arrives**
TrackRev pulls new charges from your payment processor and joins each one back to the
visitor via the checkout reference (or email as a fallback).
**5. The partner or channel gets the credit**
The attribution engine credits the winner under the model you choose. If the sale came
through a partner, it lands as a commission on the affiliate ledger; either way the
revenue shows up ranked by channel.
## Choose your starting point
> [card] [Quickstart](/getting-started/quickstart)
>
> Sign up, create your first workspace, install the pixel and see a tracked click end to
> end in about five minutes.
> [card] [Core concepts](/getting-started/core-concepts)
>
> Workspaces, links, channels, visitors, events, orders and attribution — the vocabulary
> the rest of the docs use.
> [card] [Launch an affiliate programme](/affiliate/create-program)
>
> Stand up a commission structure and a branded partner portal, and start recruiting.
> [card] [Connect your revenue](/revenue-attribution/connect-stripe)
>
> Link Stripe, Paddle Billing, Polar, Lemon Squeezy, Creem or Dodo Payments so partner
> clicks turn into attributed revenue.
## Get help
> [card] [Email support](mailto:maruf@trackrev.io)
>
> Reach the team at **[maruf@trackrev.io](mailto:maruf@trackrev.io)**.
> [card] [API reference](/developers/introduction)
>
> Build on top of TrackRev with the REST API and outbound webhooks.
# Expiration, passwords & deep links
Source: https://doc.trackrev.io/link-tracking/advanced-links
Expire links by date or clicks, password-protect them, and route mobile and desktop to different destinations.
Beyond the destination and channel, each link can carry extra rules. Configure these from the
collapsible sections when you [create a campaign](/link-tracking/create-links), or by editing a
link later.
## Link expiration
Expire a link automatically by **date**, by **click count**, or both. Once a link is expired,
visitors are sent to a custom URL you choose, or to TrackRev's branded *"This link has expired"*
page.
**1. Expand + Add expiration**
In the campaign form, open the **+ Add expiration** section.
**2. Set your limits**
* **Expires on** — a date and time (`expires_at`).
* **Max clicks** — expire after N clicks (blank = unlimited).
* **Expired redirect URL** (optional) — where expired traffic goes. Blank shows the default
expired page.
Expired links display an **Expired** badge on the Links page; links close to their date show
*"Expires "* (amber within 7 days), and click-capped links show *"Max N clicks"*.
> [!NOTE]
>
> The two limits are independent — whichever is reached first expires the link. Expiring a link
> never deletes its click history; only the redirect stops.
## Password protection
Gate a sensitive link behind a password. Visitors see a *"This link is password-protected"* page
and must enter the password before the redirect proceeds.
**1. Expand + Add password protection**
Open the **+ Add password protection** section in the campaign form.
**2. Set a password**
Enter the password. It's hashed (SHA-256) at save and never stored in plain text.
Protected links show a purple **Protected** lock badge on the Links page. After a visitor enters
the correct password, TrackRev sets a short-lived cookie so they aren't prompted again for **24
hours**.
## Device targeting
Send mobile and desktop visitors to different destinations from the same link — for example,
mobile to your App Store listing and desktop to the web app.
**1. Expand + Add device targeting**
Open the **+ Add device targeting** section.
**2. Set per-device destinations**
* **Mobile destination** (`url_mobile`)
* **Desktop destination** (`url_desktop`)
TrackRev picks the destination by the visitor's OS and device at redirect time, falling back
to the main destination URL when no override matches.
> [!TIP]
>
> For true native-app deep links (opening an installed iOS/Android app), configure your app's
> association files (Apple App Site Association / `assetlinks.json`) and app identifiers under
> **Configuration → Domains**. TrackRev serves those files from your custom domain so links can
> open your app directly.
## A note on link cloaking
Branded short links naturally mask the destination — visitors see `go.yourbrand.com/spring`,
not the long underlying URL, because the branded host serves a clean short path that TrackRev
resolves server-side. There's no separate "cloaking" toggle; the branded short link *is* the
clean, masked URL.
# Link analytics
Source: https://doc.trackrev.io/link-tracking/analytics
Clicks, unique visitors, geo, device, browser and OS breakdowns — with bots filtered out automatically.
Every click TrackRev records carries a rich set of attributes, surfaced across the **Dashboard**
and **Channels** pages. All of it is first-party — captured server-side at the redirect, not from
a third-party analytics script.
## What's captured on every click
At the redirect, TrackRev records:
* **Channel** and **link**
* **Geo** — country and city (from edge headers)
* **Device** — desktop / mobile / tablet
* **Browser** — Chrome, Safari, Firefox, Edge, Opera, Samsung, Other
* **OS** — iOS, Android, Windows, macOS, Linux, Other
* **Referrer**, **IP**, and a **bot flag**
## The Dashboard
Open **Dashboard** for a workspace-wide view. Use the **7d / 30d / 90d** range switcher (default
30 days); every metric shows a delta versus the previous equal-length window.
> [card] Metric cards
>
> **Clicks**, **Visitors**, **Conversions**, and **Revenue** — each with a trend sparkline and
> period-over-period change. (Revenue is a paid-plan feature.)
> [card] Traffic over time
>
> Clicks and unique visitors plotted daily across the range.
> [card] Top channels
>
> A table of Channel, Clicks, Visitors, Conversions, Revenue and conversion rate.
> [card] Devices & audience
>
> Device split, plus top **Countries**, **Browsers** and **Operating systems**.
There's also a **live activity** feed of events as they arrive.
## Bot filtering
TrackRev filters out non-human traffic so your analytics reflect real people. It uses an
industry bot-signature database, and additionally treats empty user-agents and link-preview
**prefetch** requests (for example, Apple Mail's privacy prefetch) as bots.
> [!NOTE]
>
> Bots are **flagged but still redirected** — a real person may be behind a preview fetch — but
> they're excluded from your analytics counts and never trigger conversion or webhook events. In
> the [API](/developers/endpoints/clicks) you can opt to include them with `?bots=include`.
## Deeper breakdowns
* **Channels page** (under *Insights*) — channel performance and lifetime value by channel. See
[Channels](/link-tracking/channels) and [Channels & LTV](/revenue-attribution/channels-and-ltv).
* **Visitors page** — the full journey for any individual visitor. See
[Visitors & the journey](/revenue-attribution/visitors).
* **Export** — download channel performance as CSV. See [Exports](/revenue-attribution/exports).
# Bulk import links
Source: https://doc.trackrev.io/link-tracking/bulk-import
Create hundreds of tracking links at once by uploading a CSV, one per influencer, placement or store. TrackRev builds them all in seconds.
Need to create many links quickly — one per influencer, one per placement, one per store? Upload
a CSV and TrackRev creates them all in seconds.
## Import a CSV
**1. Open the importer**
On the **Links** page, click **Bulk import**. The dialog is titled *"Bulk import links —
Upload a CSV to create many tracking links at once."*
**2. Download the template (optional)**
Click **Download template CSV** to get a correctly-shaped file
(`trackrev-bulk-import-template.csv`) you can fill in.
**3. Prepare your file**
A `.csv` up to **2 MB** and **500 rows**, with these columns (headers are case-insensitive):
**Required**
| Column | Description |
| - | - |
| `url` | Destination URL |
| `name` | Campaign/destination name |
| `channel` | One of the [channel keys](#valid-channels) |
**Optional**
| Column | Description |
| - | - |
| `utm_campaign` | Overrides the campaign tag |
| `utm_term` | Sets `utm_term` |
| `utm_content` | Sets `utm_content` |
| `tags` | Comma-separated tags (quote them, e.g. `"launch, q2"`) |
**4. Upload and preview**
Drag the file in or click **Choose file**. TrackRev shows a preview table (row #, Name, URL,
Channel, Tags). Review it, then click **Create N links**.
**5. Review the result**
You'll see *"N links created"* plus a per-row error table for any rows that failed (for
example, an unknown channel).
## Valid channels
Use one of these exact keys in the `channel` column:
`facebook` · `instagram` · `youtube` · `linkedin` · `twitter` · `tiktok` · `newsletter` ·
`website` · `other`
An unrecognised channel produces a per-row error (*"Unknown channel …"*) and skips that row.
## Template example
```csv theme={null}
url,name,channel,utm_campaign,utm_term,utm_content,tags
https://example.com/product,Spring Launch,facebook,spring_launch,,,"launch, q2"
https://example.com/product,Spring Launch,newsletter,spring_launch,,,"launch, q2"
```
> [!NOTE]
>
> Rows that share the same `url` **and** `name` are grouped under one destination — so the two
> rows above become one *Spring Launch* campaign with a Facebook link and a Newsletter link. Each
> bulk row produces exactly one link (bulk imports don't auto-suffix slugs the way the single-
> campaign form does), and all bulk destinations are treated as own-site, so the
> [one-domain rule](/link-tracking/overview#the-workspace-boundary) applies.
# Campaigns & folders
Source: https://doc.trackrev.io/link-tracking/campaigns
Group tracking links into campaigns, one destination plus its per-channel links, and group campaigns into date-ranged folders for cleaner launch reporting.
TrackRev has two levels of grouping:
* A **campaign** is one destination plus its per-channel links — what you create when you click
*New campaign*.
* A **folder** groups several campaigns together for date-ranged reporting — a launch, a
quarter, a partner push.
## Campaigns
Every time you [create links](/link-tracking/create-links), you're creating a campaign: a
destination and one short link per channel you selected. The **Campaigns** page lists your most
recent campaigns as cards, each showing its links table, click counts, and edit/delete/move
actions.
> [card] [Create a campaign](/link-tracking/create-links)
>
> Campaigns → New campaign generates one tracking link per channel.
## Folders
Folders let you report on a set of campaigns over a date range without changing how any
individual link attributes.
**1. Create a folder**
On the **Campaigns** page, click **New folder** and fill in:
* **Name** (required)
* **Description** (optional)
* **Start date** (optional)
* **End date** (optional)
**2. Assign campaigns to it**
From any campaign card, use the **Move to folder** menu to file it under a folder. A campaign
can be moved in and out freely.
**3. Report on the folder**
Folders appear in a dedicated table on the Campaigns page. Clicking a folder filters the
**Links** view to just that folder's links (`/links?campaign=…`).
> [!NOTE]
>
> Deleting a folder never deletes its links or campaigns — it only removes the grouping. The
> underlying links keep redirecting and reporting.
## Filtering the Links view
On the **Links** page you can filter by:
* **Folder** — via the campaign-folder filter bar.
* **Tag** — click a tag pill, or use `?tag=` in the URL.
This makes it easy to pull up, say, every `paid` link inside your *Q3 launch* folder.
# Channels
Source: https://doc.trackrev.io/link-tracking/channels
The acquisition sources TrackRev rolls every click and sale up into — so you can rank what actually pays.
A **channel** is the acquisition source a link belongs to. Channels are how TrackRev turns
thousands of individual clicks and sales into one answer: *which source pays your MRR?* Every
link belongs to a channel, so clicks, conversions and revenue always roll up by channel with
no extra work.
## The built-in channels
Channels are a fixed, built-in set — you don't create or delete them. You "use" a channel by
ticking it when you [create a campaign](/link-tracking/create-links). Each maps to default UTM
parameters:
| Channel | utm\_source | utm\_medium |
| - | - | - |
| Facebook | facebook | social |
| Instagram | instagram | social |
| YouTube | youtube | video |
| LinkedIn | linkedin | social |
| X / Twitter | twitter | social |
| TikTok | tiktok | social |
| Newsletter | newsletter | email |
| Website | website | referral |
| Other | other | referral |
> [!NOTE]
>
> The [API](/developers/endpoints/links) and [bulk import](/link-tracking/bulk-import) also accept
> the social networks Threads, Bluesky, Mastodon, Pinterest, Reddit, Telegram, Discord, Tumblr,
> Google Business Profile, Nostr, Lemmy, Slack and DEV Community (`threads`, `bluesky`, …,
> `google_business`, `devto`). Each uses its key as `utm_source` with `utm_medium=social`
> (`local` for Google Business Profile), and `x` is accepted as another name for `twitter`. Links
> on these channels show up in every report like any other.
> [!NOTE]
>
> Partner (affiliate) referral links use a dedicated `affiliate` channel automatically —
> `utm_source=partner`, `utm_medium=affiliate` — so affiliate revenue is separated from your
> owned channels. See [Affiliate overview](/affiliate/overview).
## The Channels dashboard
Open **Channels** in the sidebar (under *Insights*) to see performance rolled up by channel.
The header shows the active [attribution model](/revenue-attribution/attribution-models) and
range, e.g. *"Performance by channel · last 30 days · last touch attribution"*. Use the range
switcher for **7d / 30d / 90d**.
### Clicks over time
A daily line chart of clicks by channel (top six channels), so you can see momentum and spot
which sources are heating up.
### Performance table
| Column | Meaning |
| - | - |
| Channel | The acquisition source |
| Clicks | Total clicks in the range |
| Visitors | Unique visitors |
| Conversions | Attributed paid orders |
| Revenue | Attributed revenue *(paid plans)* |
| Conv. rate | Conversions ÷ visitors |
| Rev / click | Revenue ÷ clicks *(paid plans)* |
### Lifetime value by channel
All-time revenue per channel, **including subscription renewals** — the truest measure of a
channel's worth. Columns: **Channel, Customers, Orders (incl. renewals), Lifetime revenue,
Avg LTV / customer**. See [Channels & LTV](/revenue-attribution/channels-and-ltv) for the full
breakdown.
> [!NOTE]
>
> Revenue and LTV figures are a paid-plan feature. On the Free tier the channel table still
> shows clicks, visitors and conversion counts; revenue columns are hidden.
# Create tracking links
Source: https://doc.trackrev.io/link-tracking/create-links
Mint a branded short link for every channel in one step, with UTMs baked in, an AI-suggested slug, plus device targeting, expiry and password protection.
In TrackRev you don't create links one at a time — you create a **campaign**: one destination
plus **one short link per channel** you'll share it on. Each link gets the right UTM parameters
for its channel automatically, so revenue rolls up by channel with no manual tagging.
## Create a campaign
**1. Open Campaigns → New campaign**
In the sidebar, go to **Campaigns** and click **New campaign**. (The **Links** page also has
a **New campaign** button.) The dialog is titled *"New campaign — One short link is generated
per channel you select."*
**2. Name the campaign**
**Campaign name** (required) — e.g. *Spring launch*. This is also the default UTM campaign
tag if you don't set one.
**3. Choose where the link sends people**
Pick a destination type:
* **My own site** (default) — the pixel can attribute conversions and revenue on this
destination. Must be on your workspace's [registrable domain](/link-tracking/overview#the-workspace-boundary).
* **Someone else's site** — Substack, YouTube, a marketplace, anywhere you can't add the
pixel. Conversions and revenue show as "—" (not zero), and these links are exempt from the
one-domain rule.
**4. Enter the destination URL**
Paste the full URL you want clicks to land on. On blur, TrackRev fetches
[AI slug suggestions](#ai-slug-suggestions) for you.
**5. Pick your channels**
Tick at least one [channel](/link-tracking/channels). Each ticked channel gets its own link
with that channel's UTMs. Options: **Facebook, Instagram, YouTube, LinkedIn, X / Twitter,
TikTok, Newsletter, Website, Other**.
**6. Set a slug (optional)**
Type a custom slug, click an AI suggestion, or leave it blank to auto-generate. With multiple
channels, your slug becomes a base and each link is suffixed — e.g. `black-friday-facebook`,
`black-friday-newsletter`.
**7. Create the links**
Click **Create links**. Every link is live immediately.
## Fields reference
**Campaign name** `text` *required*
The campaign's label. Falls back to being the `utm_campaign` value if you leave the UTM tag
blank.
**Folder** `select`
Assign the campaign to a [folder](/link-tracking/campaigns) for date-ranged reporting. Only
shown once you have folders.
**Destination URL** `url` *required*
Where clicks ultimately land.
**UTM campaign tag** `text`
Sets `utm_campaign`. Placeholder `spring_launch`. Blank falls back to the campaign name.
**Custom short link (slug)** `text`
Lowercase letters, numbers and single hyphens, 2–64 characters. Slugs are globally unique
across all of TrackRev.
**Tags** `text`
Comma-separated labels (lowercased and de-duplicated) for filtering the Links view — e.g.
`launch, q3, paid`.
**Channels** `checkbox` *required*
One link is minted per selected channel. Pick at least one.
### Optional add-ons
Expand these sections in the form to configure more:
* **+ Add device targeting** — send mobile and desktop to different destinations. See
[Device targeting](/link-tracking/advanced-links#device-targeting).
* **+ Add expiration** — expire by date or click count. See
[Link expiration](/link-tracking/advanced-links#link-expiration).
* **+ Add password protection** — gate the link behind a password. See
[Password protection](/link-tracking/advanced-links#password-protection).
* **+ Add retargeting pixels** — fire ad pixels via a consent interstitial. See
[Link retargeting](/link-tracking/retargeting).
## Channels and their UTMs
Each channel applies a default `utm_source` and `utm_medium` on redirect:
| Channel | utm\_source | utm\_medium |
| - | - | - |
| Facebook | facebook | social |
| Instagram | instagram | social |
| YouTube | youtube | video |
| LinkedIn | linkedin | social |
| X / Twitter | twitter | social |
| TikTok | tiktok | social |
| Newsletter | newsletter | email |
| Website | website | referral |
| Other | other | referral |
You can override `utm_campaign`, `utm_term` and `utm_content` per link later from the link's
**Edit** action.
## AI slug suggestions
When you enter a destination URL, TrackRev reads the page's title and suggests **five**
memorable slugs. They appear as clickable pills — tap one to use it. Suggestions are
lowercase, 2–30 characters, hyphenated.
> [!TIP]
>
> AI suggestions are entirely optional and non-blocking. If you'd rather choose your own slug,
> just type it. Every link also gets a short compact code you can use as an alternate.
## Copy and share
From the **Links** page, each link row has a copy button (and a copy-format menu when you have
a custom domain — choose between your branded domain and TrackRev's default). Use the link
anywhere you'd use the raw URL.
## Next steps
> [card] [Add a custom domain](/link-tracking/custom-domains)
>
> Turn `trackrev.io/r/spring` into `go.yourbrand.com/spring`.
> [card] [Import in bulk](/link-tracking/bulk-import)
>
> Create hundreds of links at once from a CSV.
> [card] [Read your analytics](/link-tracking/analytics)
>
> See clicks, geo, device and channel performance.
> [card] [Attribute revenue](/revenue-attribution/overview)
>
> Connect a processor so clicks become attributed sales.
# Custom tracking domains
Source: https://doc.trackrev.io/link-tracking/custom-domains
Serve your short links and affiliate signup page from your own branded domain, like go.yourbrand.com, with automatic TLS. It takes one DNS record.
By default your links live on TrackRev's domain. Add a custom domain and they become
`go.yourbrand.com/spring` instead — branded, trusted, and better for click-through. One custom
domain powers **both** your branded short links and your affiliate signup page.
> [!NOTE]
>
> Use a **subdomain you control**, such as `go.yourbrand.com` or `links.yourbrand.com`. A
> subdomain is the recommended setup — pointing your root domain here would replace your existing
> website.
## Add and verify a domain
**1. Open Domains**
Go to **Configuration → Domains** (`/settings/domains`). This page is titled *"Domains — One
custom domain powers everything — branded short links and your affiliate signup page."*
**2. Add your domain**
Under **Add a domain**, enter your subdomain (e.g. `go.yourbrand.com`) and click **Add
domain**. TrackRev registers it and shows the DNS records you need to add.
**3. Add the DNS record at your provider**
In your DNS provider (Cloudflare, Namecheap, Route 53, etc.), add the record shown. For a
subdomain that's a single **CNAME**:
| Type | Name | Value |
| - | - | - |
| CNAME | `go.yourbrand.com` | `cname.vercel-dns.com` |
For a root/apex domain, use an **A** record instead:
| Type | Name | Value |
| - | - | - |
| A | `@` | `76.76.21.21` |
> [!WARNING]
>
> A `CNAME` can't coexist with other records on the same name — delete any existing `A` or
> `AAAA` records on that name first. If TrackRev shows a specific `TXT` verification
> challenge, add that exactly as displayed.
**4. Check status**
Back on the Domains page, click **Check status** on the domain. DNS can take a few minutes to
propagate. Once verified, TLS is provisioned automatically.
## Domain status
| Badge | Meaning |
| - | - |
| **Active** (green) | Verified and pointing at TrackRev — your links are branded. |
| **Needs DNS** (amber) | Added but the DNS record is missing or wrong. Re-check after fixing. |
| **Pending** (grey) | Awaiting DNS propagation / verification. |
## What a verified domain does
* Your short links serve from `https://go.yourbrand.com/slug`.
* Your affiliate signup page serves at `https://go.yourbrand.com/join` (and
`/join/`). See [Affiliate branding](/affiliate/partner-portal).
## Managing domains
* **Check status** re-verifies with the DNS provider and refreshes the badge.
* **Remove** detaches the domain. You'll get a two-step *"Remove — links will break"* confirm,
because any link already shared on that domain stops resolving once it's removed.
> [!WARNING]
>
> Removing or repointing a domain breaks links already in the wild. Only remove a domain you're
> sure is no longer in use.
## Troubleshooting
> [accordion] "That domain is already connected to another TrackRev workspace"
>
> A domain can only be attached to one workspace at a time. Remove it from the other workspace
> first, or use a different subdomain.
> [accordion] Your plan includes N tracked domains
>
> Each custom domain you connect is a tracked domain, counted across all of your workspaces.
> Indie includes 1 and Growth includes up to 10. Remove a domain you no longer use, or upgrade to
> Growth. See [Plans & billing](/account/plans-and-billing#tracked-domains).
> [accordion] "That domain is reserved"
>
> Some hostnames are reserved by TrackRev (app and partner hosts). Pick a different subdomain
> like `go.` or `links.`.
> [accordion] Custom domains aren't available right now
>
> This appears if the platform's domain provisioning isn't configured. Contact
> [maruf@trackrev.io](mailto:maruf@trackrev.io).
# Links & Analytics overview
Source: https://doc.trackrev.io/link-tracking/overview
The tracking layer behind your affiliate program: branded links with first-party click tracking that survives Safari ITP and iOS, joined to revenue.
Links & Analytics is the tracking layer built into TrackRev's SaaS affiliate software. Every
partner gets a branded tracking link, and every click is recorded server-side and joined to the
payment it produced, so you can see which partner or channel actually pays your MRR. It also
works for your own campaigns, as a branded alternative to Bitly, Dub, Rebrandly and Short.io, and
it is the better fit than a plain shortener whenever you want clicks tied to revenue.
## What makes it different
> [card] First-party & server-side
>
> Clicks are recorded on TrackRev's server at the redirect, and the visitor cookie is set on
> **your** domain — so tracking survives Safari ITP, iOS, and most ad-blockers.
> [card] Branded on your domain
>
> Links live at `go.yourbrand.com/spring`, not a generic shortener domain. One DNS record and
> automatic TLS.
> [card] One link per channel
>
> A single "campaign" mints a link for every channel you'll share it on, with the right UTMs
> baked in — so revenue always rolls up by channel.
> [card] Tied to revenue
>
> When you connect a payment processor, each click is joined to the charge it led to — the
> thing a link shortener can never tell you.
## What you can do
| Capability | Where |
| - | - |
| Create branded tracking links, one per channel | [Create links](/link-tracking/create-links) |
| Get AI-suggested memorable slugs | [Create links](/link-tracking/create-links#ai-slug-suggestions) |
| Group links into campaigns and folders | [Campaigns & folders](/link-tracking/campaigns) |
| Put links on your own short domain | [Custom domains](/link-tracking/custom-domains) |
| Import hundreds of links from a CSV | [Bulk import](/link-tracking/bulk-import) |
| Generate branded QR codes for any link | [QR codes](/link-tracking/qr-codes) |
| Expire links by date or click count | [Advanced links](/link-tracking/advanced-links#link-expiration) |
| Password-protect a link | [Advanced links](/link-tracking/advanced-links#password-protection) |
| Route mobile vs desktop to different destinations | [Advanced links](/link-tracking/advanced-links#device-targeting) |
| See geo, device, browser and OS analytics | [Analytics](/link-tracking/analytics) |
| Build retargeting audiences from any link | [Link retargeting](/link-tracking/retargeting) |
## How a click is tracked
**1. The click hits TrackRev's server**
Your short link points at TrackRev. The redirect endpoint receives the click before the
visitor reaches your destination.
**2. The click is logged and the visitor is tagged**
TrackRev records the click — channel, geo (country + city), device, browser, OS, referrer,
and a bot flag — and reads or mints a first-party `vid` cookie for the visitor.
**3. UTMs and the visitor id are appended**
TrackRev adds the channel's UTM parameters and a `_vid` handoff parameter to the destination
URL.
**4. The visitor is 302-redirected**
The visitor lands on your destination in milliseconds. If the [pixel](/getting-started/install-pixel)
is installed there, it picks up the `_vid` handoff so the browser session and the
server-side click share one identity.
> [!NOTE]
>
> Click tracking needs **no pixel** — it happens entirely at the redirect. The pixel is only
> required to attribute **revenue** and record pageviews on your destination.
## The workspace boundary
Every own-site link in a workspace must share one **registrable domain** — the domain your
pixel fires on. This keeps a workspace's clicks, visitors and revenue reconciled to a single
product. Links to sites you don't own (a marketplace, a Substack, a YouTube description) are
exempt. If you run a second product on a different domain, put it in a second workspace
(Growth includes up to 10 workspaces). See [Workspaces](/account/workspaces).
> [card] [Create your first link](/link-tracking/create-links)
>
> Head to Campaigns → New campaign and mint a tracking link per channel.
# QR codes
Source: https://doc.trackrev.io/link-tracking/qr-codes
Turn any tracking link into a branded QR code with custom colours, gradients, logos and frames. Scans are tracked like clicks, with geo, device and attribution.
Every tracking link can become a branded QR code. Because the QR points at your TrackRev short
link, scans are tracked exactly like clicks — with geo, device and (once revenue is connected)
attribution.
## Create a QR code for a link
**1. Open the QR Designer**
On the **Links** page, click the **QR code** action on any link row. The **QR Code Designer**
opens pre-loaded with that link's short URL.
**2. Design it**
Adjust colours, dot pattern, corners, logo and frame (see [options](#design-options) below),
or start from one of the built-in templates.
**3. Download**
Export as **PNG** (256 / 512 / 1024 / 2048 px) or **SVG** (vector, infinitely scalable). You
can also copy the SVG directly.
## Design options
| Option | Choices / default |
| - | - |
| **Colours** | Foreground (default `#0a0a0a`), background (default `#ffffff`), optional linear/radial gradient |
| **Dot pattern** | Square (default), Dots, Rounded, Classy, Classy Rounded, Extra Rounded |
| **Shape** | Square (default) or Circle |
| **Corner styles** | Corner square (Square / Dot / Rounded) and corner dot (Square / Dot), each with optional colour |
| **Logo overlay** | Upload an image; size 10–50% (default 40%), margin 0–20px |
| **Frame & CTA** | Optional frame with text (default *"Scan to visit"*, up to 30 chars) and frame colours |
| **Error correction** | L (7%) / M (15%) / **Q (25%, default)** / H (30%) |
| **Templates** | Classic, Brand Coral, Sunset Gradient, Dark Mode, Ocean Blue, Emerald, Print Ready — plus your own saved presets |
> [!TIP]
>
> Adding a logo automatically forces error correction to **High (H)** so the code still scans
> reliably with the centre covered. For print, export a large PNG (1024 or 2048 px) or the SVG.
## Free QR generator (no account)
There's also a free, no-signup QR generator at
[trackrev.io/tools/qr-code-generator](https://www.trackrev.io/tools/qr-code-generator) — same
designer, generated entirely in your browser, with no watermark and codes that never expire. See
[Free tools → QR generator](/tools/qr-generator).
# Link retargeting
Source: https://doc.trackrev.io/link-tracking/retargeting
Build retargeting audiences from any link — even links to sites you don't own — with no consent prompt.
Link retargeting lets you fire your ad platforms' pixels when someone clicks a TrackRev link, so
you can build retargeting audiences **even from links to sites you don't control** — a podcast
page, a marketplace listing, a press article. Clicks pass through a brief pass-through screen that
fires your pixels and continues straight on to the destination — no consent prompt, no barrier.
## How it works
**1. Configure your pixel IDs once**
Go to **Configuration → Integrations → 6 · Retargeting pixels** and add the IDs for the ad
platforms you use (see [supported providers](#supported-providers)).
**2. Enable retargeting on a link**
When creating a campaign, expand **+ Add retargeting pixels** and tick *"Enable link
retargeting for this campaign"*.
**3. Clicks pass straight through**
A real human clicking the link sees a brief *"Taking you to …"* screen while your
pixels fire in the background, then continues to the destination automatically. There's no
prompt and nothing to click.
## Supported providers
| Provider | ID format | Where to find it |
| - | - | - |
| **Meta Pixel** | `1234567890123456` (digits) | Events Manager → Data sources → your pixel ID |
| **Google Ads** | `AW-123456789` | Google Ads → Tools → Google tag |
| **LinkedIn Insight** | `1234567` (partner ID) | Campaign Manager → Analyze → Insight Tag |
> [!NOTE]
>
> You enter **IDs only** — TrackRev injects each platform's official loader for you and validates
> the ID format, so no arbitrary markup ever reaches the interstitial.
## Behaviour
* Every real human clicking a retargeting-enabled link fires your pixels automatically — a quick
spinner, then straight on to the destination. There's no consent prompt to accept or decline.
* Bots, link-preview crawlers and visitors with JavaScript disabled always pass straight through
and never fire a pixel.
* If you haven't configured any pixel IDs, retargeting-enabled links simply pass through with
nothing to fire.
> [!NOTE]
>
> Firing marketing pixels fires trackers on the visitor's browser without asking. Depending on
> your audience's location (e.g. the EU/UK under GDPR and ePrivacy), you may be responsible for
> obtaining consent elsewhere. Confirm the requirements for your jurisdiction with your legal team.
> [!TIP]
>
> Retargeting is ideal for links you share to **destinations you can't add a pixel to**. For your
> own site, the [TrackRev pixel](/getting-started/install-pixel) already tracks everything —
> retargeting just adds your ad platforms' audiences on top.
# For affiliates: using your portal
Source: https://doc.trackrev.io/partner-portal/for-affiliates
A guide for partners — how to join a programme, find your referral links, track earnings and get paid.
This page is for **affiliates and partners** promoting a brand that uses TrackRev. It walks you
through signing up, finding your links, and getting paid. (If you run a programme, see
[Affiliate overview](/affiliate/overview) instead.)
## Join a programme
**1. Open the signup page**
Follow the brand's affiliate signup link — usually something like `brand.trackrev.io` or
`go.brand.com/join`. You'll see the commission rate, cookie window, and what you earn on.
**2. Apply**
Enter your **email** and **name**, tell them **where you'll promote** (your site or socials),
and optionally suggest a **preferred link slug**. Click **Join the program**.
**3. Create your account**
You're taken to create your partner account with your email pre-filled. Your referral link is
created immediately — if the programme reviews applications, commissions start counting once
you're approved.
**4. Finish setup**
A short wizard asks for your **name** and **country** (used for payouts and tax), then shows
your referral link. You're ready to earn.
## Find your way around the portal
Your portal has these sections:
| Section | What's there |
| - | - |
| **Overview** | Your stats (clicks, sales, pending earnings, paid out), referral links and promo code |
| **Program details** | The reward, recurring terms, cookie window and minimum payout |
| **Referrals** | Every referred sale, your cut and its status |
| **Network** | Your downline and network earnings (multi-tier programmes) |
| **Messages** | Chat with the brand |
| **Hub page** | A link-in-bio page that collects all your affiliate offers in one URL |
| **Payments** | Your payout history |
| **Settings** | Payout method, profile, and tax form |
## Your referral links
On **Overview**, each programme you've joined shows your referral link (with any format variants
the brand offers), a **Create link** form for deep links to specific pages, and your **promo code**
if you have one. Share these anywhere.
> [!TIP]
>
> You can create additional referral links pointing to specific pages on the brand's site (a
> pricing page, a specific product), rename your slug, and export your links, codes and stats as a
> CSV — all from the portal.
## Settings and payouts
In **Settings**, choose how you want to be paid and enter the details:
* **PayPal** — your PayPal email.
* **Payoneer**, **Wire**, **ACH**, **Wise**, **WebMoney**, **Other** — the details each rail
needs (the portal prompts you for the right fields).
Only the methods the brand supports appear. If your payment details are incomplete, you'll see a
banner — complete them, or you'll be excluded from the brand's next payout batch.
### Tax form
US tax rules require a **W-9** (US) or **W-8** (non-US) on file before you can be paid. Complete
the **Tax form** card in Settings: pick the form type, enter your legal name and tax country, and
upload the signed PDF. See [Tax forms](/affiliate/tax-forms).
## Signing in later
Return to the brand's affiliate site and use **Partner sign in**. Your account is tied to your
verified email — if you promote several brands, each brand's portal shows only that brand's data.
# Attribution models
Source: https://doc.trackrev.io/revenue-attribution/attribution-models
Choose how credit is assigned across a visitor's journey — last-touch, first-touch or linear — and switch any time without re-tagging.
When a visitor clicks more than one link before buying, the **attribution model** decides which
click gets the credit. TrackRev supports three models, and you can switch between them at any
time — TrackRev recomputes from the same underlying events, so you never re-tag a single link.
## The models
> [card] Last touch
>
> 100% of credit to the **most recent** click before the purchase. The default — best for
> performance marketing.
> [card] First touch
>
> 100% of credit to the **first** click that introduced the visitor. Best for measuring what
> fills the top of the funnel.
> [card] Linear
>
> Credit split **evenly** across every click in the journey. Best for a balanced, multi-touch
> view.
> [!NOTE]
>
> TrackRev's models are last-touch, first-touch and linear. Position-based (U-shaped) and
> time-decay models aren't offered today.
## Change your model
**1. Open Attribution settings**
Go to **Insights → Attribution** (`/attribution`). You'll see three radio cards:
* **Last touch** — *"Credit the most recent click before purchase. Good default for
performance marketing."*
* **First touch** — *"Credit the very first click that introduced the visitor."*
* **Linear** — *"Split credit evenly across every click in the journey."*
**2. Pick a model and save**
Select one and click **Save**. The active model is shown in the header of the
[Channels](/link-tracking/channels) page, e.g. *"…last touch attribution."*
> [!WARNING]
>
> **Changing the model applies to new orders.** Re-attributing historical orders when you switch
> models is a planned background job — existing attributed orders keep the credit they were given
> at ingest time.
## An example
A visitor clicks your **Newsletter** link on Monday and your **Twitter** link on Thursday, then
buys on Friday for \$200:
| Model | Newsletter gets | Twitter gets |
| - | - | - |
| Last touch | \$0 | \$200 |
| First touch | \$200 | \$0 |
| Linear | \$100 | \$100 |
> [card] [Set your attribution window](/revenue-attribution/attribution-windows)
>
> The model decides *who* gets credit; the window decides *how far back* TrackRev looks.
# Attribution windows
Source: https://doc.trackrev.io/revenue-attribution/attribution-windows
Set how far back TrackRev looks from a sale when assigning credit. Clicks older than the attribution window earn none, so match it to your buying cycle.
The **attribution window** is how far back in time TrackRev looks from a sale when deciding which
clicks earned it. A click older than the window doesn't receive credit. It works hand-in-hand
with your [attribution model](/revenue-attribution/attribution-models): the window filters which
clicks are eligible, the model divides the credit among them.
## Set the window
**1. Open Attribution settings**
Go to **Insights → Attribution** (`/attribution`).
**2. Enter a number of days**
Set **Attribution window** to any value from **1 to 365** days, then click **Save**. The
default is **30 days**.
## Choosing a window
Match the window to how long people take to decide on your product:
| Buying motion | Suggested window |
| - | - |
| Impulse / low-price | 7 days |
| Typical SaaS trial-to-paid | 30 days (default) |
| Considered / higher-ACV | 60 days |
| Long enterprise cycles | 90+ days |
> [!TIP]
>
> A longer window credits more of the early touches that started a journey; a shorter window
> credits the final push. If you run first-touch or linear attribution, a longer window matters
> more, because it decides how much of the top-of-funnel is even in scope.
> [!NOTE]
>
> Your visitor cookie lifetime is generous (one year) so the window — not the cookie — is what
> bounds attribution. Changing the window, like changing the model, applies to **new** orders.
# Channels & lifetime value
Source: https://doc.trackrev.io/revenue-attribution/channels-and-ltv
Rank every channel by the revenue it produced and by all-time lifetime value, subscription renewals included, rather than by clicks, over 7, 30 or 90 days.
The **Channels** page is where attribution pays off: every channel ranked by the revenue and
retained value it produced, not by clicks. Open it from **Insights → Channels**. Its header shows
your active model and range, e.g. *"Performance by channel · last 30 days · last touch
attribution."* Use the **7d / 30d / 90d** switcher.
## Clicks over time
A daily line chart of clicks per channel (top six by volume) so you can see which sources are
gaining momentum.
## Performance
Revenue and conversion, rolled up by channel for the selected range:
| Column | Meaning |
| - | - |
| **Channel** | Acquisition source |
| **Clicks** | Clicks in range |
| **Visitors** | Unique visitors |
| **Conversions** | Attributed paid orders |
| **Revenue** | Attributed revenue |
| **Conv. rate** | Conversions ÷ visitors |
| **Rev / click** | Revenue ÷ clicks |
*Rev / click* is the single most useful number for comparing channels — it normalises revenue by
traffic volume, so a small high-intent channel can rightly beat a large low-intent one.
## Lifetime value by channel
This table answers *"which channel brings customers who stay and pay?"* — it counts **all-time**
revenue per channel, **including subscription renewals**, not just the first sale.
| Column | Meaning |
| - | - |
| **Channel** | Acquisition source |
| **Customers** | Distinct paying customers acquired |
| **Orders (incl. renewals)** | Every charge, initial and recurring |
| **Lifetime revenue** | All-time revenue attributed to the channel |
| **Avg LTV / customer** | Lifetime revenue ÷ customers |
> [!NOTE]
>
> Renewals inherit the original sale's channel, so a channel that acquires low-churn customers
> climbs the LTV table over time even if its first-sale revenue looks modest. This is the metric
> to optimise your acquisition spend against.
> [!NOTE]
>
> Revenue and LTV are paid-plan features. On the Free tier these columns are hidden and the LTV
> table prompts an upgrade; clicks, visitors and conversion counts remain visible.
## Programmatic access
Pull the same channel data via the API:
```bash theme={null}
curl "https://app.trackrev.io/api/v1/channels?days=30<v=1" \
-H "Authorization: Bearer "
```
See the [Channels endpoint](/developers/endpoints/channels).
# Connect Paddle, Polar, Lemon Squeezy & more
Source: https://doc.trackrev.io/revenue-attribution/connect-processors
Connect Paddle, Polar, Lemon Squeezy, Creem or Dodo Payments with a read-only key — instant webhook sync plus an hourly pull backstop.
Not on Stripe? TrackRev connects to five other processors the same way — a read-only key for
pulling charges, plus an optional **instant-sync webhook** so sales appear the moment they
happen (the hourly pull stays on as a backstop either way). Add them from **Configuration →
Integrations → "2 · Connect your revenue provider"** using the **Quick connect** or **Manual
setup** tabs. Each key is validated with one live read before it's saved.
## Turn on instant sync (recommended)
By default a new connection syncs on the hourly schedule. To make sales show up in seconds:
**1. Open the connection's instant-sync panel**
On **Integrations**, each connected provider row shows an **Instant** or **Cron-only**
badge. Click **"Turn on instant sync"** under the row.
**2. Add the endpoint in your provider's dashboard**
Copy the endpoint URL shown, paste it as a new webhook in the provider's dashboard, and
subscribe the listed events (e.g. `order.paid` for Polar, `payment.succeeded` for Dodo).
**3. Paste the signing secret back**
Copy the signing secret the provider generates and save it in the panel. The badge flips
to **Instant**.
> [!NOTE]
>
> The webhook is a doorbell, not a data source: a verified event triggers the same incremental
> sync the cron runs, so orders, attribution and commissions stay on one pipeline and replays
> are harmless.
> [!NOTE]
>
> For exact attribution, pass the visitor id (`window.trk.vid`) at checkout for every processor —
> the exact field differs per provider and is listed below and in
> [Pass the visitor id to checkout](/revenue-attribution/pass-vid-to-checkout).
> [tab] Paddle
>
> ## Paddle (Billing)
>
> > [!WARNING]
> >
> > Use an API key from **Paddle Billing**, not Paddle Classic.
>
> * **Credential:** a single API key (`pdl_live_…`), created at your Paddle dashboard →
> Authentication.
> * **Permissions to enable:** Customer (Read), Product (Read), Subscription (Read), Transaction
> (Read), Discount (Read). Choose *Never expires*.
> * **What's pulled:** completed transactions since the last sync.
> * **Visitor id field:** `custom_data.vid` (via Paddle.js `customData: { vid }`).
> * **Coupons:** resolved from the transaction's discount code — useful for crediting an
> affiliate on a Paddle discount.
> [tab] Polar
>
> ## Polar
>
> * **Credentials:** an **Organization Access Token** (`polar_oat_…`) and your **Organization
> ID**.
> * **Scopes to enable:** `orders:read`, `subscriptions:read`, `organizations:read`. Choose *No
> expiration*.
> * **What's pulled:** orders, newest first.
> * **Visitor id field:** `metadata.vid`.
> * **Coupons:** the native discount code, or a `coupon` / `coupon_code` metadata field.
> [tab] Lemon Squeezy
>
> ## Lemon Squeezy
>
> * **Credential:** an API key (Bearer), plus an optional **Store ID**. Set the expiry to 10+
> years.
>
> * **What's pulled:** orders, newest first.
>
> * **Attribution: email-only.** Lemon Squeezy orders don't expose checkout custom data, so
> TrackRev matches sales by the customer's **email** (attach it with
> [`identify()`](/getting-started/install-pixel#the-window-trk-api)). Coupon codes aren't
> available from LS orders.
>
> > [!NOTE]
> >
> > Because LS is email-only, make sure you call `window.trk.identify(email)` on your site
> > before or at purchase so the buyer's email is tied to their visitor.
> [tab] Creem
>
> ## Creem
>
> * **Credential:** a Production API key (`creem_live_…`), sent as `x-api-key`. Enable READ
> access for all scopes.
> * **What's pulled:** transactions (customer emails are fetched to enable email matching).
> * **Visitor id field:** `metadata.vid`.
> * **Coupons:** add a `coupon` metadata field to credit an affiliate.
> [tab] Dodo Payments
>
> ## Dodo Payments
>
> * **Credential:** a read-only API key (Bearer).
> * **What's pulled:** succeeded payments since the last sync.
> * **Visitor id field:** `metadata.vid`.
> * **Coupons:** add a `coupon` metadata field to credit an affiliate.
## Manage connections
Each connected provider shows a **Sync now** button and a disconnect (trash) action. You can run
several processors in one workspace at once — all their orders flow into the same
[Orders](/revenue-attribution/orders) list and roll up by channel.
## Notes on partial refunds
For Creem and Dodo, a **partial** refund is treated as a **paid** order (revenue was generated,
commission is owed). Only a full refund marks an order refunded and reverses commissions. See
[Refunds & renewals](/revenue-attribution/refunds-and-renewals).
# Connect Stripe
Source: https://doc.trackrev.io/revenue-attribution/connect-stripe
Pull your Stripe charges with a read-only restricted key and attribute every sale to the channel that earned it.
Connecting Stripe is what turns clicks into attributed revenue. TrackRev uses a **read-only
restricted API key** — no OAuth, no Stripe Connect, no access to move money. It pulls your
succeeded charges on a schedule and joins each one to the visitor who bought.
> [!NOTE]
>
> **TrackRev can never touch your money.** The key it asks for grants read access to charges,
> checkout sessions, customers and payment intents only. You can revoke it any time from your
> Stripe dashboard.
## Connect it
**1. Open Integrations → Connect your revenue provider**
Go to **Configuration → Integrations** (`/settings/integrations`) and find section
**"2 · Connect your revenue provider"**. Choose **Stripe**.
**2. Create the restricted key**
Click the **Quick connect** link. It opens Stripe's *Create restricted key* screen with the
right read scopes pre-selected:
* `rak_charge_read`
* `rak_checkout_session_read`
* `rak_customer_read`
* `rak_payment_intent_read`
* `rak_webhook_write` *(optional — enables instant sync, see below)*
Name it (e.g. *TrackRev*), create it, and copy the key. It starts with `rk_live_` (or
`rk_test_` for test mode — both work).
**3. Paste and save**
Paste the `rk_…` key into TrackRev and save. TrackRev validates it with a single read call
before storing it. Done — the first sync begins shortly.
## What gets pulled, and when
* TrackRev pulls **succeeded charges** — up to the last **30 days** on the first sync, then only
new charges after that using a cursor.
* The scheduled sync runs **hourly** by default. You can also click **Sync now** on the
connected provider at any time.
* Subscription **renewals** are ingested too and inherit the original sale's channel, so
lifetime value reflects true retained revenue.
## Instant sync (recommended)
If you include the `rak_webhook_write` scope on the key, TrackRev automatically registers a
read-only webhook on your Stripe account (for `charge.succeeded`, `charge.refunded` and
`checkout.session.completed`). New sales then attribute within seconds instead of waiting for
the hourly pull. Without that scope, everything still works — you're just on the hourly cron.
## How a charge joins back to the click
TrackRev resolves the visitor for each charge in this order:
**1. Charge metadata**
`charge.metadata.vid`, if you set it on the PaymentIntent.
**2. Checkout session reference**
The Checkout Session's `client_reference_id`.
**3. Checkout session metadata**
The Checkout Session's `metadata.vid`.
**4. Email fallback**
If none of the above are present, TrackRev matches on the customer's **email** (attached to a
visitor via [`identify()`](/getting-started/install-pixel#the-window-trk-api)).
> [!WARNING]
>
> Email matching is a safety net, not a substitute. For exact click-to-purchase attribution,
> always pass the visitor id at checkout — it's one line. See
> [Pass the visitor id to checkout](/revenue-attribution/pass-vid-to-checkout).
## Verify your setup
On the Integrations page, use **Verify your checkout setup → Check attribution setup**. TrackRev
inspects your recent checkouts and reports one of:
| Result | Meaning |
| - | - |
| **OK** | A visitor id is present and matches a tracked visitor. |
| **vid unmatched** | A `vid` is present but unknown — is the pixel running on the page checkout starts from? |
| **no vid** | Checkouts exist but none carry a `vid`. Add it at checkout. |
| **no charges** | Nothing recent — make a test purchase. |
| **error** | Stripe rejected the key (revoked or missing a scope). |
> [card] [Next: pass the visitor id](/revenue-attribution/pass-vid-to-checkout)
>
> The one line that makes attribution exact.
# Exports
Source: https://doc.trackrev.io/revenue-attribution/exports
Export channel performance for any date range as a CSV of clicks, visitors, conversions and revenue, or pull the same data with the TrackRev API.
## Export channel performance (CSV)
From **Settings → Account**, export your channel performance for a date range as a CSV. The file
is one row per channel:
```csv theme={null}
channel,clicks,visitors,conversions,revenue
```
You can also hit the export endpoint directly (authenticated as your session):
```text theme={null}
GET /api/export?type=channels&days=30
```
> [!NOTE]
>
> CSV export of channel performance is a paid-plan feature (Free returns an upgrade prompt). The
> `days` parameter defaults to 30.
## Pull data via the API
For anything beyond channel performance — per-link performance, the raw click stream, individual
visitor journeys — use the [REST API](/developers/introduction) with a secret key:
> [card] [Channels](/developers/endpoints/channels)
>
> Channel performance and LTV as JSON.
> [card] [Links](/developers/endpoints/links)
>
> Per-link clicks, visitors, conversions, revenue.
> [card] [Clicks](/developers/endpoints/clicks)
>
> The raw, cursor-paginated click stream.
> [card] [Visitor journey](/developers/endpoints/visitor-journey)
>
> Every event for one visitor, oldest first.
> [!TIP]
>
> Building a warehouse or a Looker Studio dashboard? Page through
> [`/api/v1/clicks`](/developers/endpoints/clicks) with the cursor and join to your own orders
> table, or schedule a pull of [`/api/v1/channels`](/developers/endpoints/channels) for a
> ready-made channel rollup.
# Orders
Source: https://doc.trackrev.io/revenue-attribution/orders
Orders are the real charges TrackRev pulls from your payment processor, joined to the visitor who bought: one definition of a sale for reports and commissions.
An **order** is a real charge ingested from your connected payment processor. Orders are
TrackRev's single **definition of a sale** — the same record used by channel reports, the visitor
journey and affiliate commissions, which is why every number reconciles.
## The Orders page
Open **Orders** in the sidebar to see your most recent orders:
| Column | Meaning |
| - | - |
| **Date** | When the charge occurred |
| **Email** | The customer's email, if known |
| **Status** | `paid` or `refunded` |
| **Attributed** | *Yes* if joined to a visitor, *Unmatched* if not |
| **Amount** | Charge amount in its currency |
> [!NOTE]
>
> TrackRev surfaces two order statuses: **paid** and **refunded**. A refunded order is recorded
> but earns no attribution and reverses any commission it generated. See
> [Refunds & renewals](/revenue-attribution/refunds-and-renewals).
## Attributed vs unmatched
* **Attributed** — TrackRev joined the order to a visitor (via the `vid` at checkout, or email).
It counts toward channel revenue and LTV.
* **Unmatched** — no visitor could be found. The order is still recorded, but it can't be
credited to a channel.
The most common cause of *Unmatched* orders is not passing the visitor id at checkout. Fix it
with [Pass the visitor id to checkout](/revenue-attribution/pass-vid-to-checkout), and make sure
you call `identify(email)` so email matching can catch the rest.
> [!NOTE]
>
> Orders are a paid-plan feature. On the Free tier, order and revenue sync is locked — connect a
> processor on a paid plan to populate this page.
## Where orders come from
Orders are pulled on the hourly sync — or instantly, when the provider's webhook is enabled
(automatic for Stripe; one paste-a-secret setup for
[the other processors](/revenue-attribution/connect-processors#turn-on-instant-sync-recommended))
— from any [connected processor](/revenue-attribution/overview#connect-your-revenue). Run an
immediate pull any time with **Sync now** on the Integrations page.
# Revenue Attribution overview
Source: https://doc.trackrev.io/revenue-attribution/overview
The revenue layer behind your affiliate program: tie every partner click to the real charge it produced and rank channels by revenue and retained MRR.
Revenue Attribution is the layer of TrackRev's SaaS affiliate software that ties each partner
click to the real charge it produced, so commissions follow revenue and you can see **which
acquisition channel actually pays your MRR**. It is first-party and built for SaaS and
subscription revenue, with no ad-spend minimum. If you only need ad-spend attribution for an
ecommerce store, Triple Whale, HYROS or Northbeam are built for that; TrackRev is built around
the affiliate program.
## How attribution works
Attribution joins three things that normally live in three different tools: the **click**
(recorded server-side at your short link), the **visitor** (followed by a first-party cookie),
and the **charge** (pulled from your payment processor). TrackRev stitches them into one record
of truth.
**1. A click creates a visitor**
Someone clicks a [tracking link](/link-tracking/create-links). TrackRev logs the click and
tags the visitor with a first-party `vid`.
**2. The pixel follows the session**
The [pixel](/getting-started/install-pixel) on your site ties the browser session to that
`vid`, records pageviews, and — when you call `identify(email)` — attaches an email.
**3. A charge is pulled and joined to the visitor**
TrackRev pulls new charges from your [connected processor](#connect-your-revenue) and joins
each one to a visitor by the checkout reference you pass (`vid`), or by email as a fallback.
This becomes an [**order**](/revenue-attribution/orders).
**4. The model assigns the credit**
Your [attribution model](/revenue-attribution/attribution-models) and
[window](/revenue-attribution/attribution-windows) decide which channel gets credit for the
order. The result is revenue **ranked by channel**.
## Set it up in three moves
> [card] [1. Install the pixel](/getting-started/install-pixel)
>
> One script tag on your site follows visitors from click to checkout.
> [card] [2. Connect your revenue](/revenue-attribution/connect-stripe)
>
> A read-only key to Stripe, Paddle Billing, Polar, Lemon Squeezy, Creem or Dodo Payments.
> [card] [3. Pass the visitor id](/revenue-attribution/pass-vid-to-checkout)
>
> One line at checkout joins a purchase back to the click.
## Connect your revenue
TrackRev pulls charges with a **read-only** key — no write access to your money — and every
processor supports **instant sync** via a webhook doorbell, with the hourly pull as backstop.
Supported processors:
> [card] [Stripe](/revenue-attribution/connect-stripe)
> [card] [Paddle](/revenue-attribution/connect-processors#paddle)
> [card] [Polar](/revenue-attribution/connect-processors#polar)
> [card] [Lemon Squeezy](/revenue-attribution/connect-processors#lemon-squeezy)
> [card] [Creem](/revenue-attribution/connect-processors#creem)
> [card] [Dodo Payments](/revenue-attribution/connect-processors#dodo-payments)
## What you get
| Feature | Page |
| - | - |
| Switch attribution models without re-tagging | [Attribution models](/revenue-attribution/attribution-models) |
| Set the attribution window | [Attribution windows](/revenue-attribution/attribution-windows) |
| Revenue and lifetime value by channel | [Channels & LTV](/revenue-attribution/channels-and-ltv) |
| The full click-to-customer journey | [Visitors & the journey](/revenue-attribution/visitors) |
| Every synced charge, joined to a visitor | [Orders](/revenue-attribution/orders) |
| Refund reversal and subscription renewals | [Refunds & renewals](/revenue-attribution/refunds-and-renewals) |
| CSV export of channel performance | [Exports](/revenue-attribution/exports) |
> [!NOTE]
>
> Revenue attribution is a **paid-plan** feature. On the Free tier, links and clicks are tracked
> but revenue figures are hidden. See [Plans & billing](/account/plans-and-billing).
# Pass the visitor id to checkout
Source: https://doc.trackrev.io/revenue-attribution/pass-vid-to-checkout
The one line that joins a purchase back to the exact click that produced it — for every payment processor.
Attribution is only exact when the purchase carries the visitor id. The [pixel](/getting-started/install-pixel)
exposes the current visitor id as `window.trk.vid` — pass it into your checkout and TrackRev
joins the resulting charge to the click with certainty. Without it, TrackRev falls back to
matching on email, which is a good safety net but not exact.
> [!NOTE]
>
> Read `window.trk.vid` in the browser at the moment you start checkout. On the server, the same
> value is available as the `vid` cookie.
## Hosted checkouts: nothing to wire
If your buy buttons are **hosted links or embeds** — Stripe Payment Links, ``,
``, Polar checkout links, Creem payment links, Dodo static payment links,
or Paddle hosted checkouts — the pixel decorates them **automatically** with the visitor id in
each provider's format. You're done; the sections below are for checkouts you create through a
provider's **API**.
> [!NOTE]
>
> To exclude a specific element from decoration, add `data-trk-no-decorate` to it. To see what
> the pixel decorated on a page, open it with `?trk_test=1` and check the browser console.
## By processor
> [tab] Stripe
>
> **Checkout Session** — set `client_reference_id`:
>
> ```js theme={null}
> // server-side, when creating the session
> import { cookies } from "next/headers";
> const vid = (await cookies()).get("vid")?.value;
>
> const session = await stripe.checkout.sessions.create({
> mode: "subscription",
> line_items: [/* ... */],
> success_url: "https://yourapp.com/thanks",
> client_reference_id: vid, // ← the join key
> });
> ```
>
> **Payment Links / Pricing Table** — append the id or set the attribute:
>
> ```text theme={null}
> https://buy.stripe.com/abc123?client_reference_id=
> ```
>
> ```html theme={null}
>
> ```
>
> You can also set `metadata.vid` on the PaymentIntent as an alternative.
> [tab] Paddle
>
> **Paddle.js** — pass `customData`:
>
> ```js theme={null}
> Paddle.Checkout.open({
> items: [{ priceId: "pri_123", quantity: 1 }],
> customData: { vid: window.trk?.vid },
> });
> ```
>
> Or append to a hosted link: `?customData[vid]=`.
> [tab] Polar / Creem / Dodo
>
> Pass `metadata` when creating the checkout via API:
>
> ```js theme={null}
> // Polar / Creem / Dodo checkout
> metadata: { vid: window.trk?.vid }
> ```
>
> Building a hosted-link URL yourself (the pixel already does this on your pages)? The
> format differs per provider:
>
> | Provider | Hosted-link parameter |
> | - | - |
> | Polar (`buy.polar.sh`) | `?vid=` — per-visit query params are stored on the checkout's metadata |
> | Creem (`creem.io/payment`) | `?metadata[vid]=` |
> | Dodo (`checkout.dodopayments.com`) | `?metadata_vid=` — Dodo takes metadata as flat `metadata_*` params |
> [tab] Lemon Squeezy
>
> Lemon Squeezy attribution is **email-only** — the vid isn't read back from orders. Make sure
> you identify the buyer's email before checkout:
>
> ```js theme={null}
> window.trk?.identify("customer@example.com");
> ```
>
> You may still pass custom data for your own records:
> `checkout_data: { custom: { vid: window.trk?.vid } }`.
## Verify it's working
After wiring this up, go to **Integrations → Verify your checkout setup → Check attribution
setup**. TrackRev inspects recent checkouts and confirms the `vid` is present and matching. See
[Connect Stripe → Verify your setup](/revenue-attribution/connect-stripe#verify-your-setup) for
what each result means.
> [!WARNING]
>
> The pixel must be running on the page where checkout **starts** so `window.trk.vid` is defined
> there. If the verifier says *"vid unmatched"*, that's the usual cause.
# Refunds & renewals
Source: https://doc.trackrev.io/revenue-attribution/refunds-and-renewals
How TrackRev handles refunds, chargebacks, partial refunds and subscription renewals so revenue and commissions stay honest.
Because every order traces to a single definition of a sale, TrackRev keeps revenue and affiliate
commissions honest automatically when money moves after the fact — refunds reverse credit,
renewals extend lifetime value.
## Refunds & chargebacks
When a charge is refunded, TrackRev flips the order to **refunded**. Two things follow:
* The order **earns no attribution** — refunded revenue is recorded but never credited to a
channel, so your channel revenue reflects money you actually kept.
* Any **affiliate commission** the sale generated is **reversed** across every tier of the
chain, and its status becomes `refunded`.
> [!NOTE]
>
> With instant sync enabled, a refund event (e.g. Stripe `charge.refunded`, Polar
> `order.refunded`) reverses the order and its commissions within seconds. Otherwise the
> hourly sync catches it on the next run.
## Partial refunds
For **Creem** and **Dodo Payments**, a **partial** refund is treated as a **paid** order —
revenue was still generated and commission is still owed. Only a **full** refund marks the order
refunded and reverses commissions. This avoids clawing back a partner's whole commission for a
small goodwill refund.
## Subscription renewals
Recurring charges are ingested as orders too. A renewal **inherits the original sale's channel
and link**, and its revenue is re-scaled to the renewal amount. This is what makes
[lifetime value by channel](/revenue-attribution/channels-and-ltv) reflect *true* retained
revenue rather than only first sales.
For affiliates, whether a renewal pays commission depends on the programme's recurring policy:
* **One-time** — only the first sale earns.
* **Lifetime** — every renewal earns, forever.
* **N months** — renewals earn for a set number of months.
See [Commission structures](/affiliate/commissions).
> [!NOTE]
>
> Renewal attribution requires the original order to have been attributed. If the first sale was
> *Unmatched*, its renewals inherit that — another reason to
> [pass the visitor id at checkout](/revenue-attribution/pass-vid-to-checkout).
# Visitors & the journey
Source: https://doc.trackrev.io/revenue-attribution/visitors
Follow any visitor from their first anonymous click to paying customer. The Visitors page shows each person's demographics and step-by-step journey.
A **visitor** is one person TrackRev is following — a browser identified by a first-party `vid`.
The **Visitors** page (under *Insights*) shows every visitor who clicked a link, with their full
demographics and a step-by-step journey from first click to paid customer.
## The visitors list
Open **Visitors** to see your most recent visitors. Selecting one opens their profile and
timeline on the right.
## The visitor profile
> [card] Identity & value
>
> Email (or *anonymous*), the `vid`, first and last seen, and **lifetime revenue**.
> [card] Activity
>
> Counts of **Clicks**, **Events** and **Orders**.
> [card] Acquisition
>
> The first click that introduced them — channel, link, referrer, and city/country.
> [card] Device & location
>
> From their most recent click — location, device · OS · browser, IP and full user agent.
## The journey timeline
The timeline lists every event for the visitor, oldest first, with coloured markers:
* **Clicks** — *"Clicked · "* with the link slug, city/country and device.
* **Events** — pageviews, an `identify` (email attached), and any custom events you fire.
* **Orders** — the purchase amount, in green.
This is the complete, honest story of how an anonymous clicker became a paying customer —
including every channel that touched them along the way.
> [!TIP]
>
> When someone becomes a customer, their earlier anonymous clicks are already stitched to the
> same `vid`, so the journey shows the *whole* path — even the first touch weeks before they
> bought. That's the payoff of first-party tracking and the `_vid` handoff.
## Programmatic access
Fetch a visitor's full journey via the API:
```bash theme={null}
curl "https://app.trackrev.io/api/v1/visitors//journey" \
-H "Authorization: Bearer "
```
See the [Visitor journey endpoint](/developers/endpoints/visitor-journey).
# Link-in-bio pages
Source: https://doc.trackrev.io/tools/link-in-bio
Build a hosted link-in-bio page for your social profiles in minutes. It's free to publish, every link on it is tracked, and it can run on your own domain.
TrackRev includes a hosted **link-in-bio** builder — a single page that collects all your links
behind one URL, perfect for a social profile bio. It's free to publish, and links on it are
tracked like any other.
## Build a page
**1. Start a page**
Try it with no account at
[trackrev.io/tools/link-in-bio](https://www.trackrev.io/tools/link-in-bio), or from the
dashboard at **Settings → Free tools → Bio pages → New**.
**2. Add your content**
Set a title, bio, and avatar (upload an image from your device), then add your links, section
headers and social icons. Pick one of the built-in themes, then fine-tune the background with the
gradient editor or a photo.
**3. Publish**
Your page goes live at `trackrev.io/`. No signup is required to publish — a browser
cookie remembers it's yours.
**4. Brand it with your domain (optional)**
Once it's in a workspace, serve it from your own domain, e.g. `links.yourbrand.com`, via the
custom-domain picker.
## Limits
| Item | Limit |
| - | - |
| Title | 60 characters |
| Bio | 280 characters |
| Links | Up to 50 |
| Social icons | Up to 12 |
| Slug | 3–40 characters |
Pick from 20 built-in themes — Air, Grid, Lake, Mineral, Blocks, Agate, Astrid, Aura, Bliss, Bloom,
Breeze, Encore, Groove, Haven, Nourish, Rise, Sweat, Tress, Twilight and Vox. Thirteen use real
photographs, and every theme stays fully editable: background (solid colour, gradient or image),
card style, button style, corner radius and shadow, fonts and title size.
Supported social platforms: Instagram, TikTok, X, YouTube, Spotify, Apple
Music, Facebook, LinkedIn, GitHub, Twitch, Discord and email.
> [!NOTE]
>
> Pages you build appear under **Settings → Free tools**. Add a
> [custom domain](/link-tracking/custom-domains) to serve a page at your own subdomain instead of
> `trackrev.io/`.
> [!TIP]
>
> Affiliates get their own version of this — a **Hub page** in the partner portal that collects
> all their affiliate offers across brands into one link. See
> [For affiliates](/partner-portal/for-affiliates#find-your-way-around-the-portal).
# QR code generator
Source: https://doc.trackrev.io/tools/qr-generator
A free, no-signup QR code designer with custom colours, logos and frames. Codes run in your browser, never expire, carry no watermark and export as PNG or SVG.
The free QR generator at
[trackrev.io/tools/qr-code-generator](https://www.trackrev.io/tools/qr-code-generator) creates
branded QR codes entirely in your browser — no signup, no watermark, and codes that never expire.
## Design and export
**1. Enter your link or text**
Paste any URL (or plain text) to encode.
**2. Style it**
Set colours or a gradient, choose a dot pattern and corner style, add a logo, and optionally a
frame with a call-to-action.
**3. Export**
Download as **PNG** (256 / 512 / 1024 / 2048 px) or **SVG** (vector), or copy the SVG.
## PNG vs SVG
* **PNG** — a raster image; pick a large size (1024+) for print.
* **SVG** — vector; scales to any size without losing quality. Best for print and large formats.
## Error correction
Higher error correction makes a code scannable even when partly obscured (e.g. by a logo), at the
cost of density:
| Level | Recovers | Use |
| - | - | - |
| L | 7% | Clean digital use |
| M | 15% | General purpose |
| Q | 25% | Default; some obstruction |
| H | 30% | Logos, print, rough conditions |
> [!TIP]
>
> For QR codes you want to **track**, generate them from a
> [TrackRev tracking link](/link-tracking/qr-codes) instead of this free tool — then every scan is
> recorded with geo, device and (with revenue connected) attribution.
# UTM builder
Source: https://doc.trackrev.io/tools/utm-builder
Build correctly formatted UTM links with the free TrackRev UTM builder and its source and medium cheat-sheet. It runs in your browser and stores nothing.
The free UTM builder at
[trackrev.io/tools/utm-builder](https://www.trackrev.io/tools/utm-builder) helps you build tagged
links by hand. Everything is assembled in your browser — nothing is stored.
## The five UTM parameters
| Parameter | Required | Example |
| - | - | - |
| `utm_source` | ✅ | `newsletter` |
| `utm_medium` | ✅ | `email` |
| `utm_campaign` | ✅ | `spring_launch` |
| `utm_term` | — | `running_shoes` |
| `utm_content` | — | `header_cta` |
Enter your destination URL and the parameters, and the builder produces the full tagged link to
copy.
Only `utm_source`, `utm_medium` and `utm_campaign` are worth treating as mandatory. `utm_term` was
designed for paid-search keywords and `utm_content` for distinguishing two links in the same
message — a header button from a footer link, or variant A from variant B. Leave either blank and
the builder simply omits it rather than writing an empty parameter.
## What the builder does with your URL
**1. It requires a complete URL**
The destination must include the scheme — `https://example.com/pricing`, not
`example.com/pricing`. Anything the browser can't parse as a URL returns *"Enter a full URL
including https\://"* and no link is produced.
**2. It keeps query parameters you already have**
Tagging `https://example.com/pricing?plan=pro` returns
`https://example.com/pricing?plan=pro&utm_source=…` — your own parameters survive. If the URL
already carried a UTM, filling that field in the form replaces it; leaving the field empty
keeps whatever was in the URL.
**3. It runs entirely in your browser**
Nothing is sent anywhere and nothing is stored. The link is assembled as you type, and
**Copy** puts it on your clipboard.
## Source, medium & campaign — a cheat sheet
The most common UTM question is which `source`/`medium` pair to use for a given channel. These are
the conventions analytics tools expect:
| Channel | `utm_source` | `utm_medium` | Example `utm_campaign` |
| - | - | - | - |
| Email newsletter | your list name (e.g. `weekly_digest`) | `email` | `july_product_update` |
| Google Ads (search) | `google` | `cpc` | `brand_search` |
| Facebook / Instagram ad | `facebook` | `paid_social` | `retargeting_q3` |
| Organic social post | `linkedin` | `social` | `launch_announcement` |
| Affiliate / partner link | partner name | `affiliate` | `partner_promo` |
| QR code on print | `flyer` | `offline` | `trade_show_2026` |
The pattern underneath the table: **source is who sent the traffic, medium is the kind of traffic
it is.** `google` is a source; `cpc` and `organic` are mediums. Keeping `medium` to a small closed
set — `email`, `cpc`, `paid_social`, `social`, `affiliate`, `referral`, `offline` — is what makes
channel reporting group correctly later.
## Best practice
* **Be consistent** — pick one casing (lowercase) and stick to it; `Email` and `email` are
different values to analytics.
* **Use a naming convention** — e.g. `utm_source` = the platform, `utm_medium` = the format
(social, email, cpc), `utm_campaign` = the initiative.
* **Don't tag internal links** — UTMs are for inbound links from other sites, not links within your
own site.
> [!TIP]
>
> The UTM builder is handy for one-off links. For anything you'll **track and attribute**, create a
> [TrackRev tracking link](/link-tracking/create-links) instead — it applies the right UTMs per
> channel automatically and joins the click to revenue. The builder is a manual helper; tracking
> links are the real thing.