Conversion linkage, LinkSpin side (Marty 2026-11-07, "Yes ship these"): InstantAdPay's sign-ups, wallet links and package purchases on a click count for the click's owner, in one Conversions list. Reporting only: no sponsor, payout, credit or chain path changes.

The landing tag (t.js) adds the kept click id to links to linkspin.app, instantadpay.com and the share domains, also inside a member's own redirect link (Orlando's buttons are go.opgnetwerk.com/go?u=<encoded join link>). Spin and Banner Spin links are left alone and only LinkSpin's own id shapes travel. A spin link or Banner Spin pointed straight at those sites carries lsclk with no goal set up.

netconv.js: new partner op 'events' on /api/partner/conv. Append-only ledger DATA_DIR/netconv.jsonl so two app copies cannot overwrite each other, marks.claim plus the ledger keys for once-only, join and wallet once per root click, every purchase by its own key, 30 days from click to event, the first account on a click owns it, the click owner's own account and own clicks kept as tests, each row keeps what the click was so later events survive the hit ageing out of the rotator. Spin events mirror into rotator.conv (replayed on a timer) so per-link counts, sources and placements see them; postbacks fire as for LinkSpin's own conversions.

Reports > Conversions lists goals, joins, wallets, purchases, leads and partner postbacks with values, each once; per-link Conv. counts include goals. /join keeps lsclk as well as lsid. Guide, /conversions, privacy and chatbot (CANNED + FACTS) updated; reports.js and join.js tags bumped.

The false Pages webhook claim is gone from chatbot.js, join.js and the home page: leads go to the member's list and CSV, or into a pasted autoresponder form.

QA: bash qa/run.sh netconv (57 checks, also runs in member).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-07 07:46:43 -06:00
parent 01ef4e9260
commit eedc15bc13
18 changed files with 456 additions and 34 deletions
+11 -1
View File
@@ -270,6 +270,16 @@ async function report(owner, days, opts) {
return { days: Number(days) || 30, goals: goals.map(g => Object.assign(pubGoal(g), { conv: conv.filter(c => c.px === g.px).length, lastAt: (conv.filter(c => c.px === g.px).pop() || {}).ts || null })),
byGoal: out, methods, total: conv.length, selfTests };
}
// goal conversions as rows, own-click tests left out. goalRows() = every row that came through a spin link, in the rotator's own
// shape, so per-link counts include goals (2026-11-07); memoized on the length of the log, the pixel only ever appends to it.
let GR = { n: -1, rows: [] };
function goalRows() { const c = load().conv; if (GR.n !== c.length) GR = { n: c.length, rows: c.filter(x => x.rot && !x.self).map(x => ({ r: x.rot, lsid: x.click, ev: 'goal: ' + x.goal, ts: x.ts, value: x.value || 0, sr: x.sr })) }; return GR.rows; }
function goalRowsOf(owner, since) { const o = norm(owner); return load().conv.filter(c => c.owner === o && c.ts >= since && !c.self); }
// the click-side test of "is this the owner's own": the click was theirs, or the converting browser is one they sign in from
function selfFor(L, owner, sk) {
const st = load(), ad = L.ad, o = norm(owner);
return !!(st.selfIds[L.id] || st.selfIds[L.root] || (ad && ad.owner === o && (ad.self || (ad.sk && isOwnerSk(o, ad.sk)))) || (sk && isOwnerSk(o, sk)));
}
// InstantAdPay's view: goals + per IAP campaign conversions (and clicks) for this owner
// goal conversions (not the owner's own tests) since a moment, for the Engine Room's goals dial (2026-10-24)
function countSince(owner, since) { const o = norm(owner); return load().conv.filter(c => c.owner === o && c.ts >= since && !c.self).length; }
@@ -305,4 +315,4 @@ function withClickId(target, id) {
const sep = base.includes('?') ? (/[?&]$/.test(base) ? '' : '&') : '?';
return base + sep + 'lsclk=' + encodeURIComponent(id) + hash;
}
module.exports = { noteOwner, noteSession, importOwners, isOwnerSk, markSelfClick, withClickId, countSince, init, flush, prune, softKey, isPx, isClickId, isAdId, cleanName, cleanValue, goalsOf, goal, createGoal, updateGoal, recordAdClick, importClicks, lookup, record, postbackCtx, landing, report, partnerSummary, csv, adminCounts, testGoal, LIMITS, WINDOW_MS, SOFT_MS };
module.exports = { goalRows, goalRowsOf, selfFor, noteOwner, noteSession, importOwners, isOwnerSk, markSelfClick, withClickId, countSince, init, flush, prune, softKey, isPx, isClickId, isAdId, cleanName, cleanValue, goalsOf, goal, createGoal, updateGoal, recordAdClick, importClicks, lookup, record, postbackCtx, landing, report, partnerSummary, csv, adminCounts, testGoal, LIMITS, WINDOW_MS, SOFT_MS };