Network sites as LinkSpin traffic sources (Marty 2026-11-14: "Make sure each of these sites is its own traffic source and link spun so we can track it"). Catalog: InstantAdPay, LinkSpin, Stack POL, Earners Corner network templates (next to Downline Banners and Viral Banner Blitz). A spin-link click with ?src=<site id> (iap, linkspin, dlb, vbb, stackpol, earnerscorner) counts under the link owner's source for that site, made from the template on first use (network templates only, no postback, so no network hears of a click it did not send; no referrer = the site's name as referrer). netlinks.js: at boot the admin account gets one fixed network link per site, made once when missing: nwiap, nwls, nwdlb, nwvbb, nwsp, nwec -> https://<site>/{s2}?ref={s1} (Earners Corner without ref), so every site links to the others as linkspin.app/r/<code>?src=<sender>&s1=<member>&s2=<page>. Health checks probe a destination with its {macros} empty, as a click with no params lands. netsites.js: /api/network-sites adds go (the tracked link with ?src=linkspin); common.js + netline.js footers use it (rel nofollow). common.js?v=20261114ns, netline.js?v=20261114ns. qa: netsrc 16/16 (new, bash qa/run.sh netsrc), member 57 passed 0 failed, partner-spins 13/13, netconv 57/57, lsid 31/31
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
// Network links (Marty 2026-11-14: "Make sure each of these sites is its own traffic source and link spun so we can track it").
|
||||
// The admin account (NETWORK_LINKS_OWNER, else ADMIN_EMAIL) owns one spin link per network site, with a fixed short code, and one
|
||||
// traffic source per network site (catalog templates marked "network"). Every site links to the others through these:
|
||||
// https://linkspin.app/r/<code>?src=<the site that sent the click>&s1=<member username>&s2=<page>
|
||||
// src picks the traffic source (rotator.resolve + sources.networkSource), s1 fills ?ref= (the member keeps the sponsor credit),
|
||||
// s2 is one path segment (how, join, ...; empty = the home page). Clicks show in that account's Reports by link and by source.
|
||||
// Made once at boot when missing, never changed after: the owner may edit them like any link.
|
||||
'use strict';
|
||||
const SITES = [
|
||||
{ id: 'iap', code: 'nwiap', name: 'InstantAdPay', url: 'https://instantadpay.com/{s2}?ref={s1}' },
|
||||
{ id: 'linkspin', code: 'nwls', name: 'LinkSpin', url: 'https://linkspin.app/{s2}?ref={s1}' },
|
||||
{ id: 'dlb', code: 'nwdlb', name: 'Downline Banners', url: 'https://downlinebanners.com/{s2}?ref={s1}' },
|
||||
{ id: 'vbb', code: 'nwvbb', name: 'Viral Banner Blitz', url: 'https://viralbannerblitz.com/{s2}?ref={s1}' },
|
||||
{ id: 'stackpol', code: 'nwsp', name: 'Stack POL', url: 'https://stackpol.com/{s2}?ref={s1}' },
|
||||
{ id: 'earnerscorner', code: 'nwec', name: 'Earners Corner', url: 'https://earnerscorner.com/{s2}' }
|
||||
];
|
||||
function ensure(o) { // { owner, rotator, sources }
|
||||
const owner = String(o.owner || '').trim().toLowerCase(); if (!owner) return { skipped: 'no owner' };
|
||||
const out = { owner: owner.replace(/^(.).*(@.*)$/, '$1***$2'), links: [], sources: [] };
|
||||
for (const s of SITES) {
|
||||
const src = o.sources.networkSource(owner, s.id); out.sources.push(s.id + ':' + (src ? src.id : 'none'));
|
||||
const r = o.rotator.ensureFixed(owner, s.code, 'Network: ' + s.name, s.url); out.links.push(s.code + ':' + (r.error || (r.created ? 'made' : 'ok')));
|
||||
}
|
||||
return out;
|
||||
}
|
||||
module.exports = { SITES, ensure };
|
||||
Reference in New Issue
Block a user