SmoothProfitDocs
ProductStart free

Getting started

  • Introduction
  • Quickstart
  • Authentication
  • Errors & rate limits

Core concepts

  • Tenancy model
  • Attribution
  • Commission resolution
  • Payout lifecycle

Guides

  • Install the tracker
  • Connect a storefront
  • Affiliate storefronts

API reference

  • Context
  • Affiliates
  • Conversions
  • Landing pages
  • Coupons
  • Payouts
  • Providers
  • Tracking

Core concepts

Attribution

Send every signal you have. SmoothProfit tries them in order and the first that resolves wins — extra fields never hurt, and a missing one just falls through.

1Click idclickIdIdentifies the exact visit. Survives a changed referral code and can't be guessed.
2Referral codereferralCodeFrom ?ref=. Reliable, but says nothing about which visit converted.
3Coupon codecouponCodeA 1-to-1 code. Works with no click at all — the customer heard it on a podcast.
4Lifetime emailcustomerEmailA returning customer with no other signal, credited to whoever first referred them.
Each method can be switched off per program. A brand that doesn't issue coupons can disable coupon attribution entirely rather than leaving an unused path live.

Lifetime email is opt-in

It defaults to off. Enabling it means a customer's future orders keep crediting the affiliate who first referred them — potentially forever — which is a real commercial commitment, not a default anyone should back into. Set lifetime_email_window_days to expire it after a period; 0 means genuinely lifetime.

Matching is on a SHA-256 hash of the address, never plaintext, so turning this on does not turn your conversions table into a customer email list.

The attribution cookie

The tracker stores both identifiers in a first-party sp_ref cookie as JSON:

json
{ "referralCode": "a8f2k1x9", "clickId": "4b91..." }

Read it server-side at checkout rather than threading it through your UI — attribution then works regardless of which flow started the order, including flows you haven't built yet. Or call window.smoothprofit.getAttribution() client-side instead of parsing the cookie by hand.

Self-referral blocking

An affiliate buying through their own link is blocked when the customer email matches theirs. The conversion is still recorded, as rejected with a fraud flag, so the attempt is auditable rather than vanishing. Name matching is available but opt-in — two different Jane Smiths is a real scenario; an identical email is not.

Card-based matching is not offered. SmoothProfit never sees card data — it stays with your payment processor — so a setting claiming to match on it would not work.