29e0d6e791
Prospects who clicked a member's shared /my link landed on a bare stats dashboard with no explanation of the program. New /join/<id> page carries the full bridge-page story (video, strategy, matrix, live on-chain payout proof) personalized to one sponsor: their live position stats as proof, their ID pinned on the dApp join button, and the submit-your-ID form locked to them (source invite-<id>). Dashboard share buttons + QR codes now hand out the invite page; /my stays the member dashboard. Invalid/unregistered invite ids fall back to the /start rotation. Tracked as new 'join' event with an admin traffic column. Also: the chain indexer now auto-increments a rotation sponsor's directs when a registration names them as referrer (same op as the admin ⊕), announcing it on Telegram. At 2/2 it alerts to Qualify instead of auto-rotating — moving the team focus stays a human decision. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
25 lines
1.2 KiB
JavaScript
25 lines
1.2 KiB
JavaScript
(function(){
|
|
function getSource(){
|
|
try{
|
|
let s=sessionStorage.getItem('ctb.src');
|
|
if(s)return s;
|
|
const p=new URLSearchParams(location.search);
|
|
s=p.get('utm_source')||p.get('src')||'';
|
|
if(!s&&document.referrer){try{const h=new URL(document.referrer).hostname;if(h&&h!==location.hostname)s=h}catch(e){}}
|
|
s=s||'(direct)';
|
|
sessionStorage.setItem('ctb.src',s);
|
|
return s;
|
|
}catch(e){return '(direct)'}
|
|
}
|
|
window.ctbGetSource=getSource;
|
|
try{
|
|
const p2=new URLSearchParams(location.search);
|
|
const cid=p2.get('clickid')||p2.get('cid');
|
|
if(cid&&!sessionStorage.getItem('ctb.clickid'))sessionStorage.setItem('ctb.clickid',cid.slice(0,80));
|
|
}catch(e){}
|
|
window.ctbGetClickId=function(){try{return sessionStorage.getItem('ctb.clickid')||''}catch(e){return ''}};
|
|
const path=location.pathname.replace(/\/$/,'')||'/';
|
|
const page=path==='/'?'bridge':(path==='/start'?'start':(path==='/training'?'training':(/^\/join\/\d+$/.test(path)?'join':null)));
|
|
if(page)fetch('/api/public/track',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({event:page,source:getSource()})}).catch(()=>{});
|
|
})();
|