Agent Attributed Conversions is enabled per organization. If you do not see this panel under Agent Analytics, ask Lightsage to enable attribution for your organization.
What agent-attributed means
Lightsage attributes a conversion when the visitor’s browser carries a recognized AI agent source and your application sends an explicit conversion event. The source can come from:- An external referrer such as
chatgpt.com,claude.ai, orperplexity.ai - A source parameter such as
utm_source=chatgpt.com - A stored first-touch or session touch captured earlier in the same browser
chat.openai.com, chatgpt.com, and openai resolve to ChatGPT. Plain GitHub referrals are excluded, while github-copilot remains a valid agent source.
How the attribution flow works
1
A visitor arrives from an AI source
The browser helper resolves the current source from explicit URL parameters first, then from an external referrer. Internal referrals across your own subdomains are ignored.
2
Lightsage creates browser identity
Lightsage stores a first-party visitor ID and a rolling session ID. By default, the visitor ID lasts 365 days and the session lasts 30 minutes.
3
Your application records milestones
Send an
intent event for a meaningful action such as starting sign-up. Send a completed event only after the outcome is confirmed.4
Your application identifies the user
After authentication, attach your stable application user ID. This connects the known user to the existing anonymous browser journey.
5
Agent Analytics builds the funnel
Lightsage keeps conversions from recognized agent sources, deduplicates events by event ID, groups events by browser or user identity, and orders funnel steps from observed journeys. You can override the displayed order in the dashboard.
Before you begin
You need:- An Agent Analytics site configured with the agent tracking middleware or another supported request-tracking integration
@lightsage/agent-trackerinstalled on the pages where conversions happen- A stable event naming scheme for your funnel
- An opaque application user ID if you want known-user lookup
www.example.com and conversions happen on app.example.com, configure the apex domain in both the middleware and browser helper. This keeps visitor, session, and attribution cookies available across subdomains.
middleware.ts
Set up browser attribution
Initialize the browser helper
Mount the browser helper once near the root of your client application.app/lightsage-attribution.tsx
siteDomain and cookieDomain when all tracked pages use one hostname. Do not commit the tracking key directly in source control.
If your security policy requires the tracking key to remain server-side, set
conversionEndpoint to a same-origin proxy and add the key in that server route.Track intent
Useintent for an action that shows conversion interest but does not confirm the outcome.
initLightsagePixel also supports declarative capture:
Identify the user and track completion
CallidentifyUser after authentication succeeds, then record the confirmed outcome.
Design your conversion events
Track a small set of meaningful milestones instead of every click.
Keep the event name stable because Lightsage uses it as the aggregation key. Use the label for the human-readable name shown in the dashboard.
Each conversion has an automatically generated event ID. Lightsage deduplicates repeated submissions of the same event ID for the same tracked site. Custom properties must be valid JSON and no larger than 8 KB.
Read the dashboard
The Agent Attributed Conversions panel applies the selected Agent Analytics time range.
Identity resolution uses the browser visitor ID first, then your external user ID, then the session ID. A completed event without an earlier intent event still appears in the event breakdown, but it does not increase the overall Completed metric or conversion rate.
The conversion event chart uses unique identities for each event type. Lightsage infers the default order from observed journeys. Click Edit order to pin important events into a specific sequence; events you do not pin continue to use the inferred order.
Use the activity views to inspect the underlying data:
- Visitors groups conversion milestones by identity and shows known user IDs when available.
- Live logs refreshes recent agent-attributed activity every five seconds.
- Search user ID finds events with an exact external user ID match.
- Export downloads conversion and available journey rows as CSV.
Validate your setup
1
Open a recognized test source
Visit a tracked page with an explicit agent source, for example:Do not use an arbitrary value such as
utm_source=test; conversions from unrecognized sources are not included in this panel.2
Trigger an intent event
Use the tracked CTA or call
trackConversion with eventStage: "intent".3
Trigger a completed event
Complete the workflow, identify the user, and send the matching
completed event.4
Confirm the result
Open Agent Analytics, select the relevant site and time range, and check Agent Attributed Conversions. The event should show the normalized agent source, visitor ID, and user ID when supplied.
Attribution limitations
- Cookies and storage restrictions can prevent identity from persisting.
- Anonymous journeys do not merge across browsers or devices automatically.
- Identifying a user improves known-user lookup but does not recreate events that occurred before Lightsage tracking was installed.
- Direct, search, social, and other non-agent conversions are intentionally excluded from this panel.
- Referrer data can be missing when an agent or browser removes it. Use explicit source parameters when you control the link.