Refport
Quickstarts

Quickstarts

Add Refport referral tracking to your app in minutes — pick your framework.

Refport tracks a three-event funnel for every referred visitor:

EventWhenWho calls it
ClickVisitor lands on your site via a referral linkBrowser SDK (automatic)
LeadVisitor creates an accountYour server
SaleLead makes a purchaseYour server or Stripe webhook

SDK overview

PackageWhere it runsPurpose
refport-jsBrowserReads refp_id from URL, stores in cookie
@refport/reactBrowser (React)<RefportTracker /> component wrapping refport-js
refportServer (Node.js)track.lead(), track.sale(), cookie helpers
@refport/better-authServerAutomatic lead tracking via Better Auth plugin

If you use Better Auth, lead tracking is automatic — the @refport/better-auth plugin intercepts every sign-up and calls track.lead() for you with no extra code.

Choose your framework

On this page