Before you start
- Set the program website in AgentRef to the same root domain your Vue app serves.
- Copy the exact script snippet from
Settings -> Integration. - If your marketing site and checkout app live on different subdomains, install on both when both can start the conversion path.
Recommended installation
- index.html
- main.ts fallback
For Vue apps built with Vite, install the script in the shared HTML shell.
Checkout compatibility in Vue
Notes for Vue SPAs
- AgentRef does not need to be re-mounted on route changes.
- Late-rendered Stripe elements are still instrumented automatically.
- If you use a cookie banner component, call
window.AgentRef.setConsent('granted')after the visitor accepts.
Verify the installation
1
Run a real referral visit
Open a live affiliate link that lands on your Vue app.
2
Check cookies and debug output
Confirm
agentref_cid and agentref_pid, then add ?agentref_debug=1.3
Check diagnostics
Use the AgentRef dashboard, tracking status endpoint, or MCP
verify_tracking tool.Troubleshooting
window.AgentRefnever appears: install the script earlier, ideally inindex.html.- Conversions are missing while clicks arrive: your Stripe session creation path still needs the Stripe guide.
- Cookies disappear between domains: use one shared root domain or install deliberately on every participating subdomain.
Related docs
Stripe Checkout
Metadata handoff for custom checkout sessions.
JavaScript Snippet
Cookie, parameter, and DOM API reference.
Debug Mode
Runtime inspection and warnings.