diff --git a/public/track.js b/public/track.js index 71c5218..c903207 100644 --- a/public/track.js +++ b/public/track.js @@ -37,7 +37,14 @@ if(++seen<30)return; clearInterval(t); try{ sessionStorage.setItem('ctb.engaged',cid); }catch(e){} - fetch('/api/public/track',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({event:'engaged',source:getSource(),clickid:cid})}).catch(()=>{}); + fetch('/api/public/track',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({event:'engaged',source:getSource(),clickid:cid})}) + .then(function(){ + const d=document.createElement('div'); + d.style.cssText='position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:9999;background:linear-gradient(135deg,#f3be43,#d89b19);color:#0a1622;font-weight:800;font-size:15px;padding:12px 20px;border-radius:12px;box-shadow:0 8px 28px rgba(0,0,0,.4);max-width:92vw;text-align:center'; + d.textContent='🎉 Visit counted! Your coins land in the CTB Rewards app — check the featured offer card. (Once per day.)'; + document.body.appendChild(d); + setTimeout(function(){ d.remove(); },8000); + }).catch(()=>{}); },1000); })(); })();