diff --git a/chatbot.js b/chatbot.js
index f4404c8..a35aa3d 100644
--- a/chatbot.js
+++ b/chatbot.js
@@ -22,6 +22,8 @@ function enabled() { return !!key(); }
// ---- canned answers: instant, free, always in voice ----
const KNOWLEDGE_DATE = '2026-09-18'; // bump whenever the canned answers / prompt are brought up to date
const CANNED = [
+ { re: /(viral link|any page.{0,30}(link|referr)|blog.{0,40}(referral|my link|credit)|(referral|invite|my) link.{0,30}(blog|article|any page)|\?ref=|ref=)/i,
+ a: 'Any page on instantadpay.com becomes your referral link when you add ?ref= and your username to the end, for example instantadpay.com/blog/what-is-a-feeder-program?ref=yourname. Whoever opens it is tagged to you for 30 days, exactly like your invite link, so if they join from any page on the site the credit is yours. Promo tools > Viral links builds these links for you, and every blog article shows your link when you are signed in.' },
{ re: /(five dollar friday|5 dollar friday|\$5 friday|friday (bonus|promo|deal|special)|what happens on friday)/i,
a: 'Five Dollar Friday: every Friday (Central time), any ad package from $5 up earns +20% bonus credits, added the moment the purchase settles and labelled in your credit log. The first one is Friday, September 25. Every pack pays its sponsor line in the same on-chain transaction, so when the whole network buys on the same day every line gets paid at once. Five Fridays in a row earn the Five Fridays badge. Buy under My account > Buy packages.' },
// 2026-09-18: sessions were shortened to 4h on purpose. Members WILL ask why they keep being
diff --git a/coach.js b/coach.js
index 9395dab..7f8b094 100644
--- a/coach.js
+++ b/coach.js
@@ -189,7 +189,7 @@ async function linkStats(email) {
const now = Date.now();
const views = await impl().views(tokens, 0);
const joined = await accounts.listByReferrer(tokens);
- const ANG = ['', 'instant', 'adspend', 'free', 'ledger', 'two'];
+ const ANG = ['', 'instant', 'adspend', 'free', 'ledger', 'two', 'page']; // page = a viral link (any page + ?ref=)
const rows = {};
for (const k of ANG) rows[k] = { angle: k || 'plain', views30: 0, views: 0, joins: 0, buyers: 0 };
const src = {};
diff --git a/public/assets/blog-page.js b/public/assets/blog-page.js
index 711fc16..7620de6 100644
--- a/public/assets/blog-page.js
+++ b/public/assets/blog-page.js
@@ -1,2 +1,19 @@
// public blog pages: the shared nav (with wallet status) and footer, nothing else
(function () { try { IAP.renderNav(location.pathname.indexOf('/leaderboard') === 0 ? 'leaderboard' : 'blog'); } catch (e) {} })();
+// Viral links (2026-09-21): a signed-in member sees this article's address with their own ?ref= on the
+// end, and the share buttons carry it too. Whoever opens it is tagged to them like an invite link.
+(async function () {
+ try {
+ const share = document.querySelector('p.share'); if (!share) return;
+ const me = await (await fetch('/api/me')).json();
+ const tok = me && me.signedIn && (me.username || me.refCode); if (!tok) return;
+ const link = 'https://instantadpay.com' + location.pathname + '?ref=' + encodeURIComponent(tok);
+ share.querySelectorAll('a').forEach(a => { a.href = a.href.replace(encodeURIComponent('https://instantadpay.com' + location.pathname), encodeURIComponent(link)); });
+ const bar = document.createElement('div');
+ bar.id = 'viralBar';
+ bar.style.cssText = 'margin-top:18px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--card, rgba(255,255,255,.03));display:flex;gap:10px;align-items:center;flex-wrap:wrap';
+ bar.innerHTML = '
Your link for this article
' + link.replace(/[&<>]/g, '') + '
Share this and anyone who joins from it is yours, same as your invite link.
Pick a page or paste any instantadpay.com address. The link you get carries your name on the end. Whoever opens it is tagged to you for 30 days, exactly like your invite link, so a blog article you share can bring you a member.
+
+
+
+
+
Your viral link
…
+
+
Views and joins from these links show under Link stats as the "any page" hook. Last touch still wins: the most recent link a person opened is the one that gets the credit.