Tracked 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"). netsites.js: /api/network-sites adds go = the LinkSpin network link for each site with ?src=<this site> (linkspin.app/r/<code>, fixed codes on Marty's LinkSpin account), this site found by NETWORK_SITE_ID or the request host; the footer uses go (rel nofollow), plain url as fallback. Promo kit: every link gets a tracked twin (linkspin.app/r/nwvbb?src=vbb&s1=<member>&s2=<page>, lands on the same page with ?ref=<member>), trackedTemplate; /promote shows both. Same netsites.js in all five sites. common.js?v=7, kitpage.js?v=2. Smoke 242/242

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-14 11:38:02 -06:00
parent 2f58a41af5
commit 89f79f934b
17 changed files with 47 additions and 21 deletions
+7 -4
View File
@@ -9,6 +9,7 @@
const fs = require('fs');
const path = require('path');
const C = require('./config').get();
const netsites = require('./netsites'); // tracked links: LinkSpin network link for this site, ?src=<this site> (2026-11-14)
const KIT_DIR = path.join(__dirname, 'public', 'art', 'kit');
const SHAPES = { tile: [125, 125, 'Square button (loop size)'], strip: [468, 60, 'Strip'], leader: [728, 90, 'Leaderboard'], box: [300, 250, 'Box'],
@@ -75,16 +76,18 @@ function kit(u) {
const q = ref ? '?ref=' + encodeURIComponent(ref) : '';
const link = base() + '/' + q;
const fill = s => s.split('{{LINK}}').join(link);
// the same page through LinkSpin (Marty 2026-11-14: each network site its own traffic source): counted under this site, lands with ?ref=
const track = seg => netsites.tracked('vbb', 'vbb', { s1: ref, s2: seg });
const t = copy();
return {
v: 1, site: C.site, name: C.siteName, updated: '2026-11-14', username: ref || null,
tagline: 'One shared loop of 125x125 banners. Real visitors push it.',
links: [
{ key: 'home', label: 'Your link (the loop)', url: link },
{ key: 'how', label: 'How it works', url: base() + '/how' + q },
{ key: 'leaders', label: 'Weekly leaderboards', url: base() + '/leaders' + q }
{ key: 'home', label: 'Your link (the loop)', url: link, tracked: track('') },
{ key: 'how', label: 'How it works', url: base() + '/how' + q, tracked: track('how') },
{ key: 'leaders', label: 'Weekly leaderboards', url: base() + '/leaders' + q, tracked: track('leaders') }
],
linkTemplate: base() + '/?ref={username}',
linkTemplate: base() + '/?ref={username}', trackedTemplate: netsites.tracked('vbb', 'vbb') + '&s1={username}',
creatives: creatives().map(c => Object.assign({}, c, { html: '<a href="' + link + '" target="_blank" rel="noopener"><img src="' + c.url + '" width="' + c.w + '" height="' + c.h + '" alt="Viral Banner Blitz"></a>' })),
lines: t.lines.map(fill), headlines: t.headlines, email: { subject: t.email.subject, body: fill(t.email.body) }, posts: t.posts.map(fill),
note: NOTE, promotePage: base() + '/promote'