Source Tracking
Track waitlist signup sources with the WaitKit SDK. Learn the source resolution chain (per-call, URL parameters, instance default), common values, and how to measure channel performance.
The source field lets you distinguish where each signup originates. Sources power the analytics breakdown and help you measure channel performance.
How source resolution works
The SDK resolves the source value in this order:
- Per-call override -
subscribers.create({ source: "..." }) - URL parameter -
?source=or?s=query param in the browser URL - Instance default -
new WaitKit({ source: "..." }) - Built-in fallback -
"landing-page"
// Step 3: instance default
const wk = new WaitKit({
apiKey: "wk_...",
projectSlug: "my-project",
source: "referral",
});
// Step 1: per-call override - uses "partner-page"
await wk.subscribers.create({
email: "a@example.com",
source: "partner-page",
});
// Step 3: instance default - uses "referral"
await wk.subscribers.create({ email: "b@example.com" });
// No instance default set - uses "landing-page"
const wk2 = new WaitKit({ apiKey: "wk_...", projectSlug: "my-project" });
await wk2.subscribers.create({ email: "c@example.com" });URL parameter tracking
In browser environments, the SDK automatically reads ?source= or ?s= from the URL. This lets you tag links to your landing page from different channels:
https://yoursite.com/?source=product-hunt
https://yoursite.com/?s=twitterThis happens before the instance default, so URL parameters override new WaitKit({ source }) but not a per-call override.
Common source values
| Source | When to use |
|---|---|
landing-page | Default - direct traffic to your site |
signup-form | Embedded waitlist form on your site |
referral | User referrals or word-of-mouth campaigns |
product-hunt | Product Hunt launch |
twitter | X/Twitter posts or ads |
docs | Traffic from documentation pages |
partner-page | Partner or affiliate landing pages |
api | Direct API integrations |
Viewing source analytics
Open your project dashboard and navigate to the Analytics tab. The Sources chart shows a breakdown of signups by source value, making it easy to compare channel performance.
Best Practices
Best practices for using WaitKit in production. Handle duplicate signups (409 Conflict), secure API keys with environment variables, track sources, and use custom metadata effectively.
Metadata
Attach custom JSON metadata to waitlist subscribers using the WaitKit SDK. Store plan tiers, referral codes, and product-specific context with each signup. Limits and update patterns.
