Join page records the ?src= tag in the first-touch source (Marty 2026-11-12: 'we need the source tag so we can know where these things come from'): joinedRef = <referrer host>/<src> or just <src> when the referrer was stripped; a tagged visit replaces an untagged 'direct' first touch; a real earlier source is kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1582,7 +1582,13 @@ const server = http.createServer(async (req, res) => {
|
||||
{ const lsid = String(u.searchParams.get('lsid') || u.searchParams.get('lsclk') || ''); if (/^[a-z0-9]{6,20}$/i.test(lsid)) set.push('ls.click=' + lsid + cookieTail); } // the rotator click that brought them (postback attribution); lsclk is what the landing tag carries from a bridge page (2026-11-07)
|
||||
const promo = promos.norm(u.searchParams.get('promo')); if (promo) set.push('iap.promo=' + promo + cookieTail); // partner code, redeemed at signup
|
||||
if (ang) set.push('iap.angle=' + angle + cookieTail);
|
||||
if (!cookies['iap.ref']) set.push('iap.ref=' + encodeURIComponent(coach.refHost(req.headers.referer)) + cookieTail); // first-touch source
|
||||
// first-touch source. A ?src= tag on the link (every mailer / traffic-source spin link carries one) is recorded with it,
|
||||
// so a sign-up says "mailer.gold/mailergold" or just "mailergold" when the referrer was stripped (Marty, 2026-11-12:
|
||||
// "we need the source tag so we can know where these things come from"). A tagged visit also replaces an untagged
|
||||
// "direct" first touch, since the tag is the better answer.
|
||||
{ const srcTag = String(u.searchParams.get('src') || '').toLowerCase().replace(/[^a-z0-9_.-]/g, '').slice(0, 30);
|
||||
const host = coach.refHost(req.headers.referer); const prev = decodeURIComponent(cookies['iap.ref'] || '');
|
||||
if (!prev || (srcTag && prev === 'direct')) set.push('iap.ref=' + encodeURIComponent(srcTag ? (host && host !== 'direct' ? host + '/' : '') + srcTag : host) + cookieTail); }
|
||||
return serveJoinPage(res, tok, ang ? angle : '', ang, set);
|
||||
}
|
||||
// -- legacy bridge: /from/faucetwave | /from/tieroneads [?seg=advertiser]. Same squeeze page
|
||||
|
||||
Reference in New Issue
Block a user