Network rate 4:1 (Marty approved 2026-10-27, same as InstantAdPay): views off LinkSpin cost 1/synRateDivisor of the on-site rate, going forward

rates.synRateDivisor (default 4, Admin > Rates; 1 = the old rule). Network Ad Space impressions charge 1 credit per
impressionsPerCredit x N views; member campaigns shown in other members' zones on their own sites (zones.js serve,
offsite) are counted in the new synImps (not Views here) and charged one batch per N x the on-site batch (2 credits
per 40 banner views at N=4) through the same spend path, so burns follow what was charged. Fractions are exact (the
cumulative served count / the syn_batch counter carry the remainder). The budget is the limit: bookings, resume,
top-up and daily allowances are sized at the network rate, and a live ad booked at the old rate is topped up once.
Nothing already charged changes; zone owners keep earning as before. Ads screen + classic Campaigns show network and
partner-zone views marked at 1/4; chatbot canned answer + live AI fact; cache tags bumped.
QA: qa/run.sh nas (stop 9, ratio 10), loginqueue 13, refill 12, run.sh member passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-27 08:10:02 -05:00
parent fd6f88cab7
commit 9ebbef2d21
13 changed files with 162 additions and 67 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ async function serve(zoneId, req, geoOpts) {
// retargeting: a real view on the declared site puts the visitor in the zone owner's automatic audience (30 days)
if (!off && !vis.bot && geoOpts && (geoOpts.vid || geoOpts.soft)) { try { audiences.hit(audiences.defaultFor(z.owner), geoOpts.vid, geoOpts.soft); } catch (e) {} }
// waterfall: 1) a LinkSpin member campaign 2) a Network Ad Space ad (NAS serves 728x90 and 468x60) 3) the LinkSpin house banner
let ad = null; if (paidOk) { try { ad = await ads.serve('banner', Object.assign({ width: w, height: h, excludeEmail: z.owner }, geoOpts || {})); } catch (e) { ad = null; } }
let ad = null; if (paidOk) { try { ad = await ads.serve('banner', Object.assign({ width: w, height: h, excludeEmail: z.owner, offsite: true }, geoOpts || {})); } catch (e) { ad = null; } }
const nas = !ad && paidOk && s.nasOn && NAS_SIZES.has(z.size);
const house = !ad && !nas;
if (house && !s.houseOn) return null;