Promo kit: copy and creatives carry the member's LinkSpin-tracked link (linkspin.app/r/nwvas, lands on their page with ?ref=); netsites CODES viraladsource nwvas
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -37,7 +37,7 @@ function list() { if (Date.now() - cache.at > TTL) refresh(); return cache.list;
|
||||
// entry also gets go = the LinkSpin network link for that site with ?src=<this site>, so a click shows in LinkSpin Reports under the
|
||||
// site that sent it (LinkSpin netlinks.js: fixed codes on the admin account). This site = NETWORK_SITE_ID, else the request host.
|
||||
// No go for this site itself, or when this site cannot be told (a test host): the page then uses the plain url.
|
||||
const CODES = { iap: 'nwiap', linkspin: 'nwls', dlb: 'nwdlb', vbb: 'nwvbb', viraladblitz: 'nwvab', fivex: 'nw5x', downlinehydra: 'nwdh', stackpol: 'nwsp', earnerscorner: 'nwec' };
|
||||
const CODES = { iap: 'nwiap', linkspin: 'nwls', dlb: 'nwdlb', vbb: 'nwvbb', viraladblitz: 'nwvab', viraladsource: 'nwvas', fivex: 'nw5x', downlinehydra: 'nwdh', stackpol: 'nwsp', earnerscorner: 'nwec' };
|
||||
const linksBase = () => String(process.env.NETWORK_LINKS_BASE || 'https://linkspin.app').trim().replace(/\/+$/, '');
|
||||
const hostOf = u => { try { return new URL(u).hostname.toLowerCase().replace(/^www\./, ''); } catch (e) { return ''; } };
|
||||
function selfId(req, l) {
|
||||
|
||||
+7
-4
@@ -52,19 +52,22 @@ function kit(u) {
|
||||
// the member's own page is their link (viraladsource.com/<username>); a wallet falls back to ?ref=
|
||||
const link = ref && !/^0x/i.test(ref) ? base() + '/' + encodeURIComponent(ref) : base() + '/' + (ref ? '?ref=' + encodeURIComponent(ref) : '');
|
||||
const q = ref ? '?ref=' + encodeURIComponent(ref) : '';
|
||||
const fill = s => s.split('{{LINK}}').join(link);
|
||||
const track = seg => netsites.tracked(C.siteId, C.siteId, { s1: ref, s2: seg });
|
||||
// what members paste (copy + creatives): the LinkSpin-tracked link (Marty 2026-11-17, nwvas) to their own page, so clicks show in
|
||||
// LinkSpin Reports; linkspin.app/r/nwvas?src=viraladsource&s1=<u>&s2=<u> lands on viraladsource.com/<u>?ref=<u>. Plain page if no code.
|
||||
const share = (ref && !/^0x/i.test(ref) ? track(ref) : track('')) || link;
|
||||
const fill = s => s.split('{{LINK}}').join(share);
|
||||
const t = copy();
|
||||
return {
|
||||
v: 1, site: C.site, name: C.siteName, updated: '2026-11-16', username: ref || null,
|
||||
v: 1, site: C.site, name: C.siteName, updated: '2026-11-17', username: ref || null,
|
||||
tagline: 'Every ad has a source. Watch yours travel.',
|
||||
links: [
|
||||
{ key: 'page', label: 'Your page', url: link, tracked: track('') },
|
||||
{ key: 'page', label: 'Your page', url: link, tracked: share },
|
||||
{ key: 'boost', label: 'Boost', url: base() + '/boost' + q, tracked: track('boost') },
|
||||
{ key: 'ledger', label: 'Live ledger', url: base() + '/ledger' + q, tracked: track('ledger') }
|
||||
],
|
||||
linkTemplate: base() + '/{username}', trackedTemplate: netsites.tracked(C.siteId, C.siteId) + '&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="ViralAdSource"></a>' })),
|
||||
creatives: creatives().map(c => Object.assign({}, c, { link: share, html: '<a href="' + share + '" target="_blank" rel="noopener"><img src="' + c.url + '" width="' + c.w + '" height="' + c.h + '" alt="ViralAdSource"></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'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user