LinkSpin tracked links for text ads (Marty 2026-11-15): lstrack.js asks LinkSpin (POST LS_URL/api/partner/vab/links, net.v1 with NETWORK_SSO_SECRET, by network username) for a tracked link on the member's own LinkSpin account when they save their ad; /go/<ad> sends through it while it points at the ad's current link. "Track with LinkSpin" toggle on the ad form (default on), {clickid}/{placement} links not tracked, LinkSpin clicks on My page, counters in admin status. Fails soft (plain link) until LinkSpin ships the endpoint; a 2-minute sweep retries. Smoke 179/179 (17 new LinkSpin checks against a stand-in that starts down).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-15 06:20:32 -06:00
parent b71284e5c9
commit 4efc1239b0
18 changed files with 200 additions and 35 deletions
+1
View File
@@ -13,6 +13,7 @@ Plain Node http server, no framework, the VBB / Downline Banners pattern. Contra
- **Delivery** (wire.js + vabnas.js): every verified view of a Boosted ad counts toward its guarantee (oldest Boost first) and is kept as an audit row (`vab_bviews`, 120 days). Boosted ads are starred on the ticker and fill the member pages' Boosted places, furthest-behind first. A Boost not delivered on-site within 30 days is finished through **Network Ad Space as a text ad** (pid 1) for exactly the views still owed; NAS impressions count toward the same guarantee. NAS was chosen over LinkSpin zones because NAS serves text ads natively; LinkSpin zones are banner placements.
- **Trust pack** (proof.js): `/ledger` (each Boost with every level paid, its place in the line, who was passed over, delivery), `/contract` (live facts), toasts of real events, one Telegram photo card per Boost (never twice: in-process guard + `docstore.claim`, nothing older than 2 hours), Terms / Earnings Disclaimer / Privacy (TrustClickz, 615 Green Valley Drive, Moody, AL 35004), the network footer from the hub (netsites.js, tracked LinkSpin links, code `nwvab`).
- **Promo kit** (promokit.js): `GET /api/promo-kit?u=`, `/promote`, 21 creatives `public/art/kit/vab-{free,spread,boost}-{tile,strip,leader,box,tower,social,square}.png`.
- **LinkSpin tracked links** (lstrack.js, 2026-11-15): when a member saves their text ad, LinkSpin makes or updates a tracked link for it on the member's own LinkSpin account (signed `POST LS_URL/api/partner/vab/links`, net.v1 HMAC with NETWORK_SSO_SECRET, by network username, source "ViralAdBlitz", ad id as s1/placement). `/go/<ad>` then sends through that link while it points at the ad's current link; otherwise straight to the member's link. "Track with LinkSpin" toggle on the ad form (default on); links with {clickid}/{placement} are not tracked. Fails soft: LinkSpin down or not shipped = plain link, a sweep retries every 2 minutes (failures back off 10 minutes, no account a day). My page shows the LinkSpin clicks; admin status has the counters. Env: `LS_TRACK=0` turns it off, `LS_TRACK_URL` overrides LS_URL (tests).
- **Network ad zones**: 6 LinkSpin zones on Marty's account for viraladblitz.com (made 2026-11-15): `public/assets/common.js` ZONES (footer 728x90 ls-766b4a, phone 320x50 ls-66e157, ledger 468x60 ls-a5c68c, Boost 300x250 ls-754307, My page 468x60 ls-f880d2) and `ZONE_404` ls-c6c515 in server.js. They count as paid views only on viraladblitz.com (not on the staging host).
- **Hub report** (hubreport.js): each Boost as contract-bind / contract-spend, contract `viraladblitz`, off unless `HUB_ENABLED=1`.
- **Old links**: `/?<old>`, `/splashpg.php?pid=N&r=<old>`, `/lcp.php?pid=N&r=<old>` 301 to `/<network username>` from the oldrefs map (`POST /api/admin/oldrefs`), any other `*.php` to `/`.