Track the join funnel end-to-end through the self-enroll page
- Self-enroll pageviews now tracked as the "joinnow" event (track.js loaded on the page; server whitelist + admin tiles/columns extended) - A confirmed on-chain registration in the wallet-connect flow now auto-posts to the submit-id API, so every self-enroll join records a submission with source + clickid attribution and fires the purchase event and BeMob postback with no manual ID entry - Optional name/handle field on the join page feeds the submission and the team Telegram alert - Admin Traffic panel: Join-now views tile, Join-now -> Confirmed conversion, and a per-source Confirmed column for campaign-level ROI reading Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -303,7 +303,7 @@ function getConfig() { return readJson(CONFIG_FILE); }
|
||||
function activeSponsor(sponsors) { return sponsors.find(s=>s.status==='active') || sponsors.find(s=>s.status==='waiting') || null; }
|
||||
function getAnalytics() { try { return readJson(ANALYTICS_FILE); } catch (e) { return { sources: {} }; } }
|
||||
function recordEvent(event, source) {
|
||||
if (!['bridge','start','click','training','postback','purchase','join'].includes(event)) return;
|
||||
if (!['bridge','start','click','training','postback','purchase','join','joinnow'].includes(event)) return;
|
||||
const s = String(source||'').toLowerCase().trim().replace(/[^a-z0-9.()\-_:/ ]/g,'').slice(0,80) || '(direct)';
|
||||
const a = getAnalytics(); if (!a.sources) a.sources = {};
|
||||
if (!a.sources[s]) { if (Object.keys(a.sources).length >= 500) return; a.sources[s] = { bridge:0, start:0, click:0 }; }
|
||||
|
||||
Reference in New Issue
Block a user