Video App Income as a network site: fixed link nwvai + its traffic source (catalog, ?src=videoappincome), videoappincome.com and clickvidpro.com get the click id, and its own signed conversion route /api/partner/netconv/vai (NETCONV_SECRET_VAI, events keyed vai: only; reporting only). netconv rows carry the reporting site, so a purchase reads Video App Income in Reports (Marty 2026-11-21: loop Video App Income through LinkSpin tracking)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-21 07:17:06 -06:00
parent 61c0ccc48a
commit a6c36aeca1
7 changed files with 50 additions and 8 deletions
+5 -3
View File
@@ -28,14 +28,16 @@ const srcOf = (owner, tpl) => read('sources.json').items.find(x => x.owner === o
try {
await boot();
const rots = read('rotator.json').rotations.filter(r => r.owner === ADMIN);
ok(['nwiap', 'nwls', 'nwdlb', 'nwvbb', 'nwvab', 'nwvas', 'nwypb', 'nw5x', 'nwdh', 'nwsp', 'nwec'].every(c => rots.some(r => r.code === c)) && rots.length === 11, 'the admin account has the eleven network links', rots.map(r => r.code));
ok(['nwiap', 'nwls', 'nwdlb', 'nwvbb', 'nwvab', 'nwvas', 'nwypb', 'nwvai', 'nw5x', 'nwdh', 'nwsp', 'nwec'].every(c => rots.some(r => r.code === c)) && rots.length === 12, 'the admin account has the twelve network links', rots.map(r => r.code));
const mineSrc = read('sources.json').items.filter(x => x.owner === ADMIN);
ok(['instantadpay', 'linkspin', 'downlinebanners', 'viralbannerblitz', 'viraladblitz', 'viraladsource', 'yourprogrambuilder', '5xyourteam', 'downlinehydra', 'stackpol', 'earnerscorner'].every(t => mineSrc.some(x => x.template === t)) && mineSrc.length === 11, 'and one source per network site', mineSrc.map(x => x.template));
ok(['instantadpay', 'linkspin', 'downlinebanners', 'viralbannerblitz', 'viraladblitz', 'viraladsource', 'yourprogrambuilder', 'videoappincome', '5xyourteam', 'downlinehydra', 'stackpol', 'earnerscorner'].every(t => mineSrc.some(x => x.template === t)) && mineSrc.length === 12, 'and one source per network site', mineSrc.map(x => x.template));
let r = await go('/r/nwdlb?src=iap&s1=bob&s2=how');
ok(r.status === 302 && /^https:\/\/downlinebanners\.com\/how\?ref=bob$/.test(r.loc), 'nwdlb: lands on /how with ?ref=bob', r);
r = await go('/r/nwiap?src=vbb&s1=amy');
ok(r.status === 302 && /^https:\/\/instantadpay\.com\/\?ref=amy&lsclk=[a-f0-9]{10}$/.test(r.loc), 'nwiap: home page with ?ref=amy and the click id (InstantAdPay reports joins against it)', r);
r = await go('/r/nwvai?src=iap&s1=amy&s2=join');
ok(r.status === 302 && /^https:\/\/videoappincome\.com\/join\?ref=amy&lsclk=[a-f0-9]{10}$/.test(r.loc), 'nwvai: Video App Income join page with ?ref=amy and the click id (it reports sign-ups and purchases against it)', r);
r = await go('/r/nwec?src=dlb');
ok(r.status === 302 && /^https:\/\/earnerscorner\.com\/(\?|$)/.test(r.loc), 'nwec: the forum home', r);
r = await go('/r/nwdh?src=downlinehydra&s1=bob');
@@ -64,7 +66,7 @@ try {
ok(read('sources.json').items.filter(x => x.owner === MEM).length === 2, 'an unknown src makes no source');
await stop(); await boot();
ok(read('rotator.json').rotations.filter(x => x.owner === ADMIN).length === 11 && read('sources.json').items.filter(x => x.owner === ADMIN).length === 11, 'a reboot makes nothing twice');
ok(read('rotator.json').rotations.filter(x => x.owner === ADMIN).length === 12 && read('sources.json').items.filter(x => x.owner === ADMIN).length === 12, 'a reboot makes nothing twice');
} catch (e) { fail++; console.error(e); }
finally { await stop(); try { fs.rmSync(DATA, { recursive: true, force: true }); } catch (e) {} }
console.log('\n' + pass + ' passed, ' + fail + ' failed'); process.exit(fail ? 1 : 0);