References

Affiliate Score

How the Affiliate Score algorithm ranks programs from 0 to 100.

Overview

The Affiliate Score is a composite metric (0-100) that ranks affiliate programs based on their value to affiliates. It is used across rankings, recommendations, and comparisons.

Score Components

ComponentMaxDescription
Commission Value40How much affiliates earn per conversion
Cookie Duration15How long the tracking cookie lasts
Type + Duration25Recurring programs score higher, especially lifetime
Verified10Community-verified accuracy bonus
Completeness10Programs with full data rank higher

Commission Value (40 pts)

Scoring depends on commission structure:

Percentage-based

formula
score = min(rate / 50, 1) * 40
  • 50%+ commission = maximum 40 points
  • 25% commission = 20 points
  • 10% commission = 8 points

Flat fee

AmountScore
$1 - $498
$50 - $9916
$100 - $49928
$500+40

"Varies": 15 points (neutral midpoint). Compound rates(e.g., "$5 per lead + 30%"): the percentage component is used.

formula
score = min(cookie_days / 90, 1) * 15
  • 90+ days = maximum 15 points
  • 30 days (standard) = 5 points
  • 7 days = ~1 point

Type + Duration (25 pts)

TypeDurationScore
One-time5
Tiered12
RecurringUnknown18
Recurring12 months21
Recurring24 months23
RecurringLifetime25

Recurring programs are significantly more valuable because affiliates earn on every renewal, not just the initial sale.

Verified (10 pts)

Programs with the verifiedbadge receive 10 bonus points. Verification means the community has confirmed the program's commission rates, cookie duration, and signup URL are accurate.

Completeness (10 pts)

FieldPoints
Description (20+ chars)4
Agent prompt (10+ chars)3
Signup URL3

Examples

ProgramCommCookieTypeVerifCompTotal
30% rec/lifetime, 90d, verified241525101084
50% rec/12mo, 30d, verified40521101086
$500 one-time, 30d, partial40550454
10% one-time, 30d, minimal8550018

Implementation

The scoring function is defined in src/lib/programs.ts as affiliateScore(). It is a pure function with no external dependencies.

TypeScript
import { affiliateScore } from "@/lib/programs";
const score = affiliateScore(program); // 0-100

Rate Parsing

Commission rates come in various formats from YAML data. The parseCommissionRate() function handles:

InputParsed As
"30%"30 (percentage)
"$1,000"1000 (flat fee)
"20-30%"30 (takes higher)
"$5 per lead + 30%"30 (prefers percentage)
"varies"0 (scored separately)

Commas in dollar amounts are stripped before parsing.