Referral links aren't tracked on first visit because Base44’s SPA router loads index.html directly and bypasses pages/go.js and pages/NotFound.js. I need a guaranteed global handler that reads ?ref= on initial page load and calls trackLinkClick once. Tracking only works after navigating inside the app, never on first load. What we need Base 44 to Implement (the actual fix)
A global hook inside: src/App.jsx or src/main.jsx or src/index.js Since first-visit tracking is currently impossible without a global initialization hook, I would like to officially request the following enhancement:
Please expose a global pre-router initialization hook (similar to Next.js _app or Vite’s main.jsx) that runs once on first page load before the router mounts. This would allow apps to reliably read URL parameters such as ?ref= and execute tracking logic exactly once.
Even a lightweight solution would work, such as A global script slot in index.html
A “beforeAppMount” callback
An App-level entry file (src/main.jsx / src/index.jsx) that we can edit
This feature is essential for:
Referral systems
Attribution tracking
Marketing campaigns
Affiliate programs
Deep-linking and onboarding flows
Right now, no page-level code can capture URL parameters on initial load because the SPA router renders before any pages run. A global hook resolves this cleanly for all Base44 developers.
Please authenticate to join the conversation.
In Review
Feature Request
5 months ago

Christopher Kramer
Get notified by email when there are changes.
In Review
Feature Request
5 months ago

Christopher Kramer
Get notified by email when there are changes.