Attribution (vm.js)
Install vm.js with data-key to prove which customers came from AI referrals.
Updated 2026-08-06
Revenue in the VisibleMax OS is proven with a lightweight `vm.js` script. It attributes visits and conversions from AI referral traffic so you can connect recommendation wins to sessions, signups, customers, and revenue.
Install the snippet
Copy the snippet from Attribution at /app/p/[projectId]/attribution. It requires your workspace public key in data-key:
<script src="https://visiblemax.site/vm.js"
data-key="vmk_…"
defer></script>Events you can send
| API | When to call | Notes |
|---|---|---|
pageview | Automatic on load | Includes path, referrer, and UTM params |
VisibleMax.signup() | After account creation | Marks an AI-influenced signup |
VisibleMax.customer() | When a user becomes a paying customer | Funnel step after signup |
VisibleMax.revenue(cents) | On charge / invoice paid | Pass integer cents |
VisibleMax.survey(answer) | “How did you hear about us?” | Captures self-reported AI assistant answers |
VisibleMax.track(event, extra) | Custom milestones | Use sparingly; prefer named helpers |
Example conversion hooks
// after signup
window.VisibleMax?.signup({ meta: { plan: "trial" } });
// after first payment (amount in cents)
window.VisibleMax?.customer();
window.VisibleMax?.revenue(4900);
// optional survey
window.VisibleMax?.survey("ChatGPT recommendation");How AI referrals are detected
The collector records referrer and UTM context with each event. Sessions that originate from assistant properties (or campaigns you tag) appear as AI-referred in the Attribution funnel: sessions → signups → customers → revenue.
Verify the install
- 1
Deploy the snippet
Add
vm.jsto your marketing site layout (every page you care about attributing). - 2
Load a page
Open the site, confirm a
pageviewappears in Attribution within a few minutes. - 3
Fire a test conversion
From a staging page, call
VisibleMax.signup()once and confirm the funnel increments. - 4
Watch weekly
As monitoring and probes show recommendation gains, Attribution should trend with AI-referred sessions.
FAQ
Does vm.js set cookies for ads retargeting?
It is a lightweight first-party attribution helper focused on AI referral proof — not an ad pixel suite. Still disclose analytics in your privacy policy.
Can I use one key across multiple domains?
Yes if they belong to the same workspace. Separate brands should use separate workspaces/projects for clean reporting.
No events showing up?
Confirm data-key, check ad blockers, ensure the script URL is reachable, and verify you are viewing the correct workspace Attribution page. Email [email protected] with your project ID if it still fails.
Related
Still stuck? Contact support with your project URL and what you already tried.