> ## Documentation Index
>
> Fetch the complete documentation index at: [/docs/llms.txt](/content/docs/llms.txt)
>
> Use this file to discover all available pages before exploring further.

[Skip to main content](/content/docs/agent-analytics/attributed-growth#content-area/index.html)

Agent-attributed growth connects a browser visit from a recognized AI source to conversion milestones that happen on your website or app. Use it to measure outcomes such as sign-up intent, completed registration, demo requests, checkout, and API key creation.

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.

## [​](/content/docs/agent-analytics/attributed-growth\#what-agent-attributed-means/index.html)  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`, or `perplexity.ai`
- A source parameter such as `utm_source=chatgpt.com`
- A stored first-touch or session touch captured earlier in the same browser

Lightsage normalizes known aliases and domains to agent names. For example, `chat.openai.com`, `chatgpt.com`, and `openai` resolve to ChatGPT. Plain GitHub referrals are excluded, while `github-copilot` remains a valid agent source.

An agent crawler request does not automatically become a human conversion. The human browser must retain an agent source through its referrer, URL parameters, or stored attribution state. Treat this as acquisition attribution, not proof that a specific crawler request caused the outcome.

## [​](/content/docs/agent-analytics/attributed-growth\#how-the-attribution-flow-works/index.html)  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.

Lightsage stores three attribution touchpoints:

| Touchpoint | Meaning |
| --- | --- |
| **First touch** | The first valid acquisition source for the visitor. A later agent source can replace an initial `direct` touch. |
| **Session touch** | The source that began the current browser session. |
| **Current touch** | The source resolved from the current page URL and referrer. |

## [​](/content/docs/agent-analytics/attributed-growth\#before-you-begin/index.html)  Before you begin

You need:

- An Agent Analytics site configured with the [agent tracking middleware](/content/docs/guides/agent-tracking-middleware/index.html) or another supported request-tracking integration
- `@lightsage/agent-tracker` installed 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

If visits begin on `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

```
import { withAgentTracking } from "@lightsage/agent-tracker/next";

export default withAgentTracking({
  apiKey: process.env.LIGHTSAGE_API_KEY!,
  siteDomain: "example.com",
});
```

## [​](/content/docs/agent-analytics/attributed-growth\#set-up-browser-attribution/index.html)  Set up browser attribution

### [​](/content/docs/agent-analytics/attributed-growth\#initialize-the-browser-helper/index.html)  Initialize the browser helper

Mount the browser helper once near the root of your client application.

app/lightsage-attribution.tsx

```
"use client";

import { useEffect } from "react";
import { initLightsagePixel } from "@lightsage/agent-tracker/browser";

export const lightsageOptions = {
  apiKey: process.env.NEXT_PUBLIC_LIGHTSAGE_API_KEY!,
  siteDomain: "example.com",
  cookieDomain: ".example.com",
};

export function LightsageAttribution() {
  useEffect(() => {
    void initLightsagePixel(lightsageOptions);
  }, []);

return null;
}
```

Omit `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.

### [​](/content/docs/agent-analytics/attributed-growth\#track-intent/index.html)  Track intent

Use `intent` for an action that shows conversion interest but does not confirm the outcome.

```
import { trackConversion } from "@lightsage/agent-tracker/browser";
import { lightsageOptions } from "./lightsage-attribution";

await trackConversion(
  "signup.intent",
  { placement: "pricing" },
  {
    ...lightsageOptions,
    label: "Start sign up",
    eventStage: "intent",
  },
);
```

For simple CTA clicks, `initLightsagePixel` also supports declarative capture:

```
<button
  data-lightsage-conversion="signup.intent"
  data-lightsage-conversion-stage="intent"
  data-lightsage-label="Start sign up"
>
  Start free trial
</button>
```

### [​](/content/docs/agent-analytics/attributed-growth\#identify-the-user-and-track-completion/index.html)  Identify the user and track completion

Call `identifyUser` after authentication succeeds, then record the confirmed outcome.

```
import {
  identifyUser,
  trackConversion,
} from "@lightsage/agent-tracker/browser";
import { lightsageOptions } from "./lightsage-attribution";

async function onSignupComplete(user: { id: string; plan: string }) {
  await identifyUser(user.id, lightsageOptions);

await trackConversion(
    "signup.completed",
    { plan: user.plan },
    {
      ...lightsageOptions,
      label: "Complete sign up",
      eventStage: "completed",
    },
  );
}
```

Use an opaque, stable user ID. Do not use an email address or other personal data as the identifier.

## [​](/content/docs/agent-analytics/attributed-growth\#design-your-conversion-events/index.html)  Design your conversion events

Track a small set of meaningful milestones instead of every click.

| Event name | Label | Stage |
| --- | --- | --- |
| `signup.intent` | Start sign up | `intent` |
| `signup.completed` | Complete sign up | `completed` |
| `demo.requested` | Request a demo | `completed` |
| `checkout.completed` | Complete checkout | `completed` |
| `api_key.created` | Create API key | `completed` |

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.

## [​](/content/docs/agent-analytics/attributed-growth\#read-the-dashboard/index.html)  Read the dashboard

The **Agent Attributed Conversions** panel applies the selected Agent Analytics time range.

| Metric | Calculation |
| --- | --- |
| **Intent** | Unique identities that recorded at least one `intent` event. |
| **Completed** | Unique identities that recorded a `completed` event after an `intent` event in the selected range. |
| **Conversion rate** | Completed identities divided by intent identities. |
| **Drop-off** | Intent identities minus completed identities. |

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.

The browser helper initializes identity and conversion capture. It does not replace the request tracker that powers the main Agent Analytics visit, page, status, and latency reports. Browser page steps appear in conversion journeys only when your integration sends client-navigation events.

## [​](/content/docs/agent-analytics/attributed-growth\#validate-your-setup/index.html)  Validate your setup

1

Open a recognized test source

Visit a tracked page with an explicit agent source, for example:

```
https://www.example.com/pricing?utm_source=chatgpt.com&utm_medium=organic_ai
```

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.

## [​](/content/docs/agent-analytics/attributed-growth\#attribution-limitations/index.html)  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.

For agent visit detection and hosting-specific installation options, see [Detect AI agent visits with agent tracking middleware](/content/docs/guides/agent-tracking-middleware/index.html).

{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Lightsage","colors":{"primary":"#0EA5E9","light":"#38BDF8","dark":"#0284C7"},"logo":{"light":"https://mintcdn.com/sapient-14d4e375/0RQiSxJPQv6MyuZt/images/lightsage-logo-with-text-light.svg?fit=max\\u0026auto=format\\u0026n=0RQiSxJPQv6MyuZt\\u0026q=85\\u0026s=843d0563baa54c778891f942711ab938","dark":"https://mintcdn.com/sapient-14d4e375/0RQiSxJPQv6MyuZt/images/lightsage-logo-with-text-dark.svg?fit=max\\u0026auto=format\\u0026n=0RQiSxJPQv6MyuZt\\u0026q=85\\u0026s=0ec933f6e5153f8392cb4c5f19b7017f"},"favicon":"https://mintcdn.com/sapient-14d4e375/lnqlKs8p\_hzadcGt/images/favicon.png?fit=max\\u0026auto=format\\u0026n=lnqlKs8p\_hzadcGt\\u0026q=85\\u0026s=358b3be56f25189cd6d5417fd300fefc","background":{"color":{"light":"#FFFFFF","dark":"#0D0C0C"}},"navbar":{"links":\[{"href":"https://lightsage.com","label":"Homepage"}\],"primary":{"type":"button","label":"Dashboard","href":"https://app.lightsage.com"}},"seo":{"indexing":"all"},"fonts":{"family":"Geist"},"integrations":{"ga4":{"measurementId":"G-417S0EJVMS"},"posthog":{"apiKey":"phc\_yrA1TjjqeYfsoJEofjxd0Bw7cTrxs8N402k3NwusII7"}},"contextual":{"options":\["copy","chatgpt","cursor","vscode"\],"display":"header"},"styling":{"latex":false},"navigation":{"pages":\[\]}},"deployment":{"deploymentMetadataValue":{"subdomain":"sapient-14d4e375","hasAudioNarration":false,"actualSubdomain":"sapient-14d4e375","customDomains":\["lightsage.com"\],"gitSource":{"type":"github","owner":"lightsagehq","repo":"docs","deployBranch":"main","isPrivate":true,"contentDirectory":"","mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae02c324c09e96410641fcb","collectionId":"82419905-7508-4f98-a30d-d180f437b2ae","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae02c324c09e96410641fcb"},"entitlements":{"AI\_CHAT":{"status":"DISABLED"}},"buildId":"6ae02c324c09e96410641fcb","clientVersion":"0.0.3971","searchFilterCounts":\[{"language":"default","tag":"API Reference","count":74},{"language":"default","tag":"CLI Reference","count":18},{"language":"default","tag":"Evals","count":14},{"language":"default","tag":"Documentation","count":13},{"language":"default","tag":"Prompts","count":13},{"language":"default","tag":"Visibility","count":12},{"language":"default","tag":"MCP Reference","count":10},{"language":"default","tag":"Clients","count":9},{"language":"default","tag":"Agent Preference","count":8},{"language":"default","tag":"Agent Analytics","count":7}\]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":\[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature\_enabled":true},"impressionData":false}\],"isAtlas":false,"googleFontsInlined":true},"customCss":\[\],"page":{"pagePath":"agent-analytics/attributed-growth","slug":"/agent-analytics/attributed-growth","pageMetadata":{"title":"Measure agent-attributed growth","description":"Connect visits from recognized AI agent sources to sign-up, demo, checkout, and activation milestones in Agent Analytics.","sidebarTitle":"Attributed growth","href":"/agent-analytics/attributed-growth"},"description":{"compiledSource":"\\"use strict\\";\\nconst {jsx: \_jsx} = arguments\[0\];\\nconst {useMDXComponents: \_provideComponents} = arguments\[0\];\\nfunction \_createMdxContent(props) {\\n const \_components = {\\n p: \\"p\\",\\n ...\_provideComponents(),\\n ...props.components\\n };\\n return \_jsx(\_components.p, {\\n children: \\"Connect visits from recognized AI agent sources to sign-up, demo, checkout, and activation milestones in Agent Analytics.\\"\\n });\\n}\\nfunction MDXContent(props = {}) {\\n const {wrapper: MDXLayout} = {\\n ...\_provideComponents(),\\n ...props.components\\n };\\n return MDXLayout ? \_jsx(MDXLayout, {\\n ...props,\\n children: \_jsx(\_createMdxContent, {\\n ...props\\n })\\n }) : \_createMdxContent(props);\\n}\\nreturn {\\n default: MDXContent\\n};\\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\\"use strict\\";const{Fragment:\_Fragment,jsx:\_jsx,jsxs:\_jsxs}=arguments\[0\];const{useMDXComponents:\_provideComponents}=arguments\[0\];function \_createMdxContent(props){const \_components={a:\`a\`,code:\`code\`,li:\`li\`,p:\`p\`,pre:\`pre\`,span:\`span\`,strong:\`strong\`,tbody:\`tbody\`,td:\`td\`,th:\`th\`,thead:\`thead\`,tr:\`tr\`,ul:\`ul\`,...\_provideComponents(),...props.components},{CodeBlock,Heading,Info,Note,Step,Steps,Table,Warning}=\_components;if(!CodeBlock)\_missingMdxReference(\`CodeBlock\`,true);if(!Heading)\_missingMdxReference(\`Heading\`,true);if(!Info)\_missingMdxReference(\`Info\`,true);if(!Note)\_missingMdxReference(\`Note\`,true);if(!Step)\_missingMdxReference(\`Step\`,true);if(!Steps)\_missingMdxReference(\`Steps\`,true);if(!Table)\_missingMdxReference(\`Table\`,true);if(!Warning)\_missingMdxReference(\`Warning\`,true);return \_jsxs(\_Fragment,{children:\[\_jsx(\_components.p,{children:\`Agent-attributed growth connects a browser visit from a recognized AI source to conversion milestones that happen on your website or app. Use it to measure outcomes such as sign-up intent, completed registration, demo requests, checkout, and API key creation.\`}),\`\\n\`,\_jsx(Info,{children:\_jsxs(\_components.p,{children:\[\`Agent Attributed Conversions is enabled per organization. If you do not see this panel under \`,\_jsx(\_components.strong,{children:\`Agent Analytics\`}),\`, ask Lightsage to enable attribution for your organization.\`\]})}),\`\\n\`,\_jsx(Heading,{level:\`2\`,id:\`what-agent-attributed-means\`,children:\`What agent-attributed means\`}),\`\\n\`,\_jsx(\_components.p,{children:\`Lightsage attributes a conversion when the visitor’s browser carries a recognized AI agent source and your application sends an explicit conversion event.\`}),\`\\n\`,\_jsx(\_components.p,{children:\`The source can come from:\`}),\`\\n\`,\_jsxs(\_components.ul,{children:\[\`\\n\`,\_jsxs(\_components.li,{children:\[\`An external referrer such as \`,\_jsx(\_components.code,{children:\`chatgpt.com\`}),\`, \`,\_jsx(\_components.code,{children:\`claude.ai\`}),\`, or \`,\_jsx(\_components.code,{children:\`perplexity.ai\`})\]}),\`\\n\`,\_jsxs(\_components.li,{children:\[\`A source parameter such as \`,\_jsx(\_components.code,{children:\`utm\_source=chatgpt.com\`})\]}),\`\\n\`,\_jsx(\_components.li,{children:\`A stored first-touch or session touch captured earlier in the same browser\`}),\`\\n\`\]}),\`\\n\`,\_jsxs(\_components.p,{children:\[\`Lightsage normalizes known aliases and domains to agent names. For example, \`,\_jsx(\_components.code,{children:\`chat.openai.com\`}),\`, \`,\_jsx(\_components.code,{children:\`chatgpt.com\`}),\`, and \`,\_jsx(\_components.code,{children:\`openai\`}),\` resolve to ChatGPT. Plain GitHub referrals are excluded, while \`,\_jsx(\_components.code,{children:\`github-copilot\`}),\` remains a valid agent source.\`\]}),\`\\n\`,\_jsx(Warning,{children:\_jsx(\_components.p,{children:\`An agent crawler request does not automatically become a human conversion. The human browser must retain an agent source through its referrer, URL parameters, or stored attribution state. Treat this as acquisition attribution, not proof that a specific crawler request caused the outcome.\`})}),\`\\n\`,\_jsx(Heading,{level:\`2\`,id:\`how-the-attribution-flow-works\`,children:\`How the attribution flow works\`}),\`\\n\`,\_jsxs(Steps,{children:\[\_jsx(Step,{title:\`A visitor arrives from an AI source\`,children:\_jsx(\_components.p,{children:\`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.\`})}),\_jsx(Step,{title:\`Lightsage creates browser identity\`,children:\_jsx(\_components.p,{children:\`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.\`})}),\_jsx(Step,{title:\`Your application records milestones\`,children:\_jsxs(\_components.p,{children:\[\`Send an \`,\_jsx(\_components.code,{children:\`intent\`}),\` event for a meaningful action such as starting sign-up. Send a \`,\_jsx(\_components.code,{children:\`completed\`}),\` event only after the outcome is confirmed.\`\]})}),\_jsx(Step,{title:\`Your application identifies the user\`,children:\_jsx(\_components.p,{children:\`After authentication, attach your stable application user ID. This connects the known user to the existing anonymous browser journey.\`})}),\_jsx(Step,{title:\`Agent Analytics builds the funnel\`,children:\_jsx(\_components.p,{children:\`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.\`})})\]}),\`\\n\`,\_jsx(\_components.p,{children:\`Lightsage stores three attribution touchpoints:\`}),\`\\n\`,\_jsxs(Table,{children:\[\_jsx(\_components.thead,{children:\_jsxs(\_components.tr,{children:\[\_jsx(\_components.th,{children:\`Touchpoint\`}),\_jsx(\_components.th,{children:\`Meaning\`})\]})}),\_jsxs(\_components.tbody,{children:\[\_jsxs(\_components.tr,{children:\[\_jsx(\_components.td,{children:\_jsx(\_components.strong,{children:\`First touch\`})}),\_jsxs(\_components.td,{children:\[\`The first valid acquisition source for the visitor. A later agent source can replace an initial \`,\_jsx(\_components.code,{children:\`direct\`}),\` touch.\`\]})\]}),\_jsxs(\_components.tr,{children:\[\_jsx(\_components.td,{children:\_jsx(\_components.strong,{children:\`Session touch\`})}),\_jsx(\_components.td,{children:\`The source that began the current browser session.\`})\]}),\_jsxs(\_components.tr,{children:\[\_jsx(\_components.td,{children:\_jsx(\_components.strong,{children:\`Current touch\`})}),\_jsx(\_components.td,{children:\`The source resolved from the current page URL and referrer.\`})\]})\]})\]}),\`\\n\`,\_jsx(Heading,{level:\`2\`,id:\`before-you-begin\`,children:\`Before you begin\`}),\`\\n\`,\_jsx(\_components.p,{children:\`You need:\`}),\`\\n\`,\_jsxs(\_components.ul,{children:\[\`\\n\`,\_jsxs(\_components.li,{children:\[\`An Agent Analytics site configured with the \`,\_jsx(\_components.a,{href:\`/guides/agent-tracking-middleware\`,children:\`agent tracking middleware\`}),\` or another supported request-tracking integration\`\]}),\`\\n\`,\_jsxs(\_components.li,{children:\[\_jsx(\_components.code,{children:\`@lightsage/agent-tracker\`}),\` installed on the pages where conversions happen\`\]}),\`\\n\`,\_jsx(\_components.li,{children:\`A stable event naming scheme for your funnel\`}),\`\\n\`,\_jsx(\_components.li,{children:\`An opaque application user ID if you want known-user lookup\`}),\`\\n\`\]}),\`\\n\`,\_jsxs(\_components.p,{children:\[\`If visits begin on \`,\_jsx(\_components.code,{children:\`www.example.com\`}),\` and conversions happen on \`,\_jsx(\_components.code,{children:\`app.example.com\`}),\`, configure the apex domain in both the middleware and browser helper. This keeps visitor, session, and attribution cookies available across subdomains.\`\]}),\`\\n\`,\_jsx(CodeBlock,{filename:\`middleware.ts\`,numberOfLines:\`6\`,language:\`typescript\`,children:\_jsx(\_components.pre,{className:\`shiki shiki-themes github-light-default dark-plus\`,style:{backgroundColor:\`#ffffff\`,\\"--shiki-dark-bg\\":\`#0B0C0E\`,color:\`#1f2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},language:\`typescript\`,children:\_jsxs(\_components.code,{language:\`typescript\`,numberOfLines:\`6\`,children:\[\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`import\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` { \`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`withAgentTracking\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` } \`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`from\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"@lightsage/agent-tracker/next\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`;\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`export\`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\` default\`}),\_jsx(\_components.span,{style:{color:\`#8250DF\`,\\"--shiki-dark\\":\`#DCDCAA\`},children:\` withAgentTracking\`}),\_jsx(\_components.span,{style:{color:\`#953800\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`({\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` apiKey:\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` process\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`.\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`env\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`.\`}),\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#4FC1FF\`},children:\`LIGHTSAGE\_API\_KEY\`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`!\`}),\_jsx(\_components.span,{style:{color:\`#953800\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` siteDomain:\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"example.com\\"\`}),\_jsx(\_components.span,{style:{color:\`#953800\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#953800\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`})\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`;\`})\]}),\`\\n\`\]})})}),\`\\n\`,\_jsx(Heading,{level:\`2\`,id:\`set-up-browser-attribution\`,children:\`Set up browser attribution\`}),\`\\n\`,\_jsx(Heading,{level:\`3\`,id:\`initialize-the-browser-helper\`,children:\`Initialize the browser helper\`}),\`\\n\`,\_jsx(\_components.p,{children:\`Mount the browser helper once near the root of your client application.\`}),\`\\n\`,\_jsx(CodeBlock,{filename:\`app/lightsage-attribution.tsx\`,numberOfLines:\`18\`,language:\`tsx\`,children:\_jsx(\_components.pre,{className:\`shiki shiki-themes github-light-default dark-plus\`,style:{backgroundColor:\`#ffffff\`,\\"--shiki-dark-bg\\":\`#0B0C0E\`,color:\`#1f2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},language:\`tsx\`,children:\_jsxs(\_components.code,{language:\`tsx\`,numberOfLines:\`18\`,children:\[\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\`\\"use client\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`;\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`import\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` { \`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`useEffect\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` } \`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`from\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"react\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`;\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`import\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` { \`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`initLightsagePixel\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` } \`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`from\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"@lightsage/agent-tracker/browser\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`;\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`export\`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#569CD6\`},children:\` const\`}),\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#4FC1FF\`},children:\` lightsageOptions\`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` =\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` {\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` apiKey:\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` process\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`.\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`env\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`.\`}),\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#4FC1FF\`},children:\`NEXT\_PUBLIC\_LIGHTSAGE\_API\_KEY\`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`!\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` siteDomain:\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"example.com\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` cookieDomain:\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\".example.com\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`};\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`export\`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#569CD6\`},children:\` function\`}),\_jsx(\_components.span,{style:{color:\`#8250DF\`,\\"--shiki-dark\\":\`#DCDCAA\`},children:\` LightsageAttribution\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`() {\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#8250DF\`,\\"--shiki-dark\\":\`#DCDCAA\`},children:\` useEffect\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`(() \`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#569CD6\`},children:\`=>\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` {\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#569CD6\`},children:\` void\`}),\_jsx(\_components.span,{style:{color:\`#8250DF\`,\\"--shiki-dark\\":\`#DCDCAA\`},children:\` initLightsagePixel\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`(\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`lightsageOptions\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`);\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` }, \[\]);\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\` return\`}),\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#569CD6\`},children:\` null\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`;\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`}\`})}),\`\\n\`\]})})}),\`\\n\`,\_jsxs(\_components.p,{children:\[\`Omit \`,\_jsx(\_components.code,{children:\`siteDomain\`}),\` and \`,\_jsx(\_components.code,{children:\`cookieDomain\`}),\` when all tracked pages use one hostname. Do not commit the tracking key directly in source control.\`\]}),\`\\n\`,\_jsx(Note,{children:\_jsxs(\_components.p,{children:\[\`If your security policy requires the tracking key to remain server-side, set \`,\_jsx(\_components.code,{children:\`conversionEndpoint\`}),\` to a same-origin proxy and add the key in that server route.\`\]})}),\`\\n\`,\_jsx(Heading,{level:\`3\`,id:\`track-intent\`,children:\`Track intent\`}),\`\\n\`,\_jsxs(\_components.p,{children:\[\`Use \`,\_jsx(\_components.code,{children:\`intent\`}),\` for an action that shows conversion interest but does not confirm the outcome.\`\]}),\`\\n\`,\_jsx(CodeBlock,{filename:\`\`,numberOfLines:\`12\`,language:\`typescript\`,children:\_jsx(\_components.pre,{className:\`shiki shiki-themes github-light-default dark-plus\`,style:{backgroundColor:\`#ffffff\`,\\"--shiki-dark-bg\\":\`#0B0C0E\`,color:\`#1f2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},language:\`typescript\`,children:\_jsxs(\_components.code,{language:\`typescript\`,numberOfLines:\`12\`,children:\[\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`import\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` { \`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`trackConversion\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` } \`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`from\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"@lightsage/agent-tracker/browser\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`;\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`import\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` { \`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`lightsageOptions\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` } \`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`from\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"./lightsage-attribution\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`;\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`await\`}),\_jsx(\_components.span,{style:{color:\`#8250DF\`,\\"--shiki-dark\\":\`#DCDCAA\`},children:\` trackConversion\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`(\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"signup.intent\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` { \`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`placement:\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"pricing\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` },\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` {\`})}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` ...\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`lightsageOptions\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` label:\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"Start sign up\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` eventStage:\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"intent\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` },\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`);\`})}),\`\\n\`\]})})}),\`\\n\`,\_jsxs(\_components.p,{children:\[\`For simple CTA clicks, \`,\_jsx(\_components.code,{children:\`initLightsagePixel\`}),\` also supports declarative capture:\`\]}),\`\\n\`,\_jsx(CodeBlock,{filename:\`\`,numberOfLines:\`7\`,language:\`html\`,children:\_jsx(\_components.pre,{className:\`shiki shiki-themes github-light-default dark-plus\`,style:{backgroundColor:\`#ffffff\`,\\"--shiki-dark-bg\\":\`#0B0C0E\`,color:\`#1f2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},language:\`html\`,children:\_jsxs(\_components.code,{language:\`html\`,numberOfLines:\`7\`,children:\[\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#808080\`},children:\`\\u003c\`}),\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#569CD6\`},children:\`button\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` data-lightsage-conversion\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`=\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\`\\"signup.intent\\"\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` data-lightsage-conversion-stage\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`=\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\`\\"intent\\"\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` data-lightsage-label\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`=\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\`\\"Start sign up\\"\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#808080\`},children:\`>\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` Start free trial\`})}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#808080\`},children:\`\\u003c/\`}),\_jsx(\_components.span,{style:{color:\`#116329\`,\\"--shiki-dark\\":\`#569CD6\`},children:\`button\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#808080\`},children:\`>\`})\]}),\`\\n\`\]})})}),\`\\n\`,\_jsx(Heading,{level:\`3\`,id:\`identify-the-user-and-track-completion\`,children:\`Identify the user and track completion\`}),\`\\n\`,\_jsxs(\_components.p,{children:\[\`Call \`,\_jsx(\_components.code,{children:\`identifyUser\`}),\` after authentication succeeds, then record the confirmed outcome.\`\]}),\`\\n\`,\_jsx(CodeBlock,{filename:\`\`,numberOfLines:\`19\`,language:\`typescript\`,children:\_jsx(\_components.pre,{className:\`shiki shiki-themes github-light-default dark-plus\`,style:{backgroundColor:\`#ffffff\`,\\"--shiki-dark-bg\\":\`#0B0C0E\`,color:\`#1f2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},language:\`typescript\`,children:\_jsxs(\_components.code,{language:\`typescript\`,numberOfLines:\`19\`,children:\[\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`import\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` {\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` identifyUser\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` trackConversion\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`} \`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`from\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"@lightsage/agent-tracker/browser\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`;\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`import\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` { \`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`lightsageOptions\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` } \`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\`from\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"./lightsage-attribution\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`;\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#569CD6\`},children:\`async\`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#569CD6\`},children:\` function\`}),\_jsx(\_components.span,{style:{color:\`#8250DF\`,\\"--shiki-dark\\":\`#DCDCAA\`},children:\` onSignupComplete\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`(\`}),\_jsx(\_components.span,{style:{color:\`#953800\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`user\`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`:\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` { \`}),\_jsx(\_components.span,{style:{color:\`#953800\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`id\`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`:\`}),\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#4EC9B0\`},children:\` string\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`; \`}),\_jsx(\_components.span,{style:{color:\`#953800\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`plan\`}),\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`:\`}),\_jsx(\_components.span,{style:{color:\`#0550AE\`,\\"--shiki-dark\\":\`#4EC9B0\`},children:\` string\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` }) {\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\` await\`}),\_jsx(\_components.span,{style:{color:\`#8250DF\`,\\"--shiki-dark\\":\`#DCDCAA\`},children:\` identifyUser\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`(\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`user\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`.\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`id\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`, \`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`lightsageOptions\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`);\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#C586C0\`},children:\` await\`}),\_jsx(\_components.span,{style:{color:\`#8250DF\`,\\"--shiki-dark\\":\`#DCDCAA\`},children:\` trackConversion\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`(\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"signup.completed\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` { \`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`plan:\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` user\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`.\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`plan\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` },\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` {\`})}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#CF222E\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` ...\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\`lightsageOptions\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` label:\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"Complete sign up\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsxs(\_components.span,{className:\`line\`,children:\[\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#9CDCFE\`},children:\` eventStage:\`}),\_jsx(\_components.span,{style:{color:\`#0A3069\`,\\"--shiki-dark\\":\`#CE9178\`},children:\` \\"completed\\"\`}),\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`,\`})\]}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` },\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\` );\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{style:{color:\`#1F2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},children:\`}\`})}),\`\\n\`\]})})}),\`\\n\`,\_jsx(\_components.p,{children:\`Use an opaque, stable user ID. Do not use an email address or other personal data as the identifier.\`}),\`\\n\`,\_jsx(Heading,{level:\`2\`,id:\`design-your-conversion-events\`,children:\`Design your conversion events\`}),\`\\n\`,\_jsx(\_components.p,{children:\`Track a small set of meaningful milestones instead of every click.\`}),\`\\n\`,\_jsxs(Table,{children:\[\_jsx(\_components.thead,{children:\_jsxs(\_components.tr,{children:\[\_jsx(\_components.th,{children:\`Event name\`}),\_jsx(\_components.th,{children:\`Label\`}),\_jsx(\_components.th,{children:\`Stage\`})\]})}),\_jsxs(\_components.tbody,{children:\[\_jsxs(\_components.tr,{children:\[\_jsx(\_components.td,{children:\_jsx(\_components.code,{children:\`signup.intent\`})}),\_jsx(\_components.td,{children:\`Start sign up\`}),\_jsx(\_components.td,{children:\_jsx(\_components.code,{children:\`intent\`})})\]}),\_jsxs(\_components.tr,{children:\[\_jsx(\_components.td,{children:\_jsx(\_components.code,{children:\`signup.completed\`})}),\_jsx(\_components.td,{children:\`Complete sign up\`}),\_jsx(\_components.td,{children:\_jsx(\_components.code,{children:\`completed\`})})\]}),\_jsxs(\_components.tr,{children:\[\_jsx(\_components.td,{children:\_jsx(\_components.code,{children:\`demo.requested\`})}),\_jsx(\_components.td,{children:\`Request a demo\`}),\_jsx(\_components.td,{children:\_jsx(\_components.code,{children:\`completed\`})})\]}),\_jsxs(\_components.tr,{children:\[\_jsx(\_components.td,{children:\_jsx(\_components.code,{children:\`checkout.completed\`})}),\_jsx(\_components.td,{children:\`Complete checkout\`}),\_jsx(\_components.td,{children:\_jsx(\_components.code,{children:\`completed\`})})\]}),\_jsxs(\_components.tr,{children:\[\_jsx(\_components.td,{children:\_jsx(\_components.code,{children:\`api\_key.created\`})}),\_jsx(\_components.td,{children:\`Create API key\`}),\_jsx(\_components.td,{children:\_jsx(\_components.code,{children:\`completed\`})})\]})\]})\]}),\`\\n\`,\_jsx(\_components.p,{children:\`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.\`}),\`\\n\`,\_jsx(\_components.p,{children:\`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.\`}),\`\\n\`,\_jsx(Heading,{level:\`2\`,id:\`read-the-dashboard\`,children:\`Read the dashboard\`}),\`\\n\`,\_jsxs(\_components.p,{children:\[\`The \`,\_jsx(\_components.strong,{children:\`Agent Attributed Conversions\`}),\` panel applies the selected Agent Analytics time range.\`\]}),\`\\n\`,\_jsxs(Table,{children:\[\_jsx(\_components.thead,{children:\_jsxs(\_components.tr,{children:\[\_jsx(\_components.th,{children:\`Metric\`}),\_jsx(\_components.th,{children:\`Calculation\`})\]})}),\_jsxs(\_components.tbody,{children:\[\_jsxs(\_components.tr,{children:\[\_jsx(\_components.td,{children:\_jsx(\_components.strong,{children:\`Intent\`})}),\_jsxs(\_components.td,{children:\[\`Unique identities that recorded at least one \`,\_jsx(\_components.code,{children:\`intent\`}),\` event.\`\]})\]}),\_jsxs(\_components.tr,{children:\[\_jsx(\_components.td,{children:\_jsx(\_components.strong,{children:\`Completed\`})}),\_jsxs(\_components.td,{children:\[\`Unique identities that recorded a \`,\_jsx(\_components.code,{children:\`completed\`}),\` event after an \`,\_jsx(\_components.code,{children:\`intent\`}),\` event in the selected range.\`\]})\]}),\_jsxs(\_components.tr,{children:\[\_jsx(\_components.td,{children:\_jsx(\_components.strong,{children:\`Conversion rate\`})}),\_jsx(\_components.td,{children:\`Completed identities divided by intent identities.\`})\]}),\_jsxs(\_components.tr,{children:\[\_jsx(\_components.td,{children:\_jsx(\_components.strong,{children:\`Drop-off\`})}),\_jsx(\_components.td,{children:\`Intent identities minus completed identities.\`})\]})\]})\]}),\`\\n\`,\_jsxs(\_components.p,{children:\[\`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 \`,\_jsx(\_components.strong,{children:\`Completed\`}),\` metric or conversion rate.\`\]}),\`\\n\`,\_jsxs(\_components.p,{children:\[\`The conversion event chart uses unique identities for each event type. Lightsage infers the default order from observed journeys. Click \`,\_jsx(\_components.strong,{children:\`Edit order\`}),\` to pin important events into a specific sequence; events you do not pin continue to use the inferred order.\`\]}),\`\\n\`,\_jsx(\_components.p,{children:\`Use the activity views to inspect the underlying data:\`}),\`\\n\`,\_jsxs(\_components.ul,{children:\[\`\\n\`,\_jsxs(\_components.li,{children:\[\_jsx(\_components.strong,{children:\`Visitors\`}),\` groups conversion milestones by identity and shows known user IDs when available.\`\]}),\`\\n\`,\_jsxs(\_components.li,{children:\[\_jsx(\_components.strong,{children:\`Live logs\`}),\` refreshes recent agent-attributed activity every five seconds.\`\]}),\`\\n\`,\_jsxs(\_components.li,{children:\[\_jsx(\_components.strong,{children:\`Search user ID\`}),\` finds events with an exact external user ID match.\`\]}),\`\\n\`,\_jsxs(\_components.li,{children:\[\_jsx(\_components.strong,{children:\`Export\`}),\` downloads conversion and available journey rows as CSV.\`\]}),\`\\n\`\]}),\`\\n\`,\_jsx(\_components.p,{children:\`The browser helper initializes identity and conversion capture. It does not replace the request tracker that powers the main Agent Analytics visit, page, status, and latency reports. Browser page steps appear in conversion journeys only when your integration sends client-navigation events.\`}),\`\\n\`,\_jsx(Heading,{level:\`2\`,id:\`validate-your-setup\`,children:\`Validate your setup\`}),\`\\n\`,\_jsxs(Steps,{children:\[\_jsxs(Step,{title:\`Open a recognized test source\`,children:\[\_jsx(\_components.p,{children:\`Visit a tracked page with an explicit agent source, for example:\`}),\_jsx(CodeBlock,{filename:\`\`,numberOfLines:\`2\`,language:\`text\`,children:\_jsx(\_components.pre,{className:\`shiki shiki-themes github-light-default dark-plus\`,style:{backgroundColor:\`#ffffff\`,\\"--shiki-dark-bg\\":\`#0B0C0E\`,color:\`#1f2328\`,\\"--shiki-dark\\":\`#D4D4D4\`},language:\`text\`,children:\_jsxs(\_components.code,{language:\`text\`,numberOfLines:\`2\`,children:\[\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{children:\`https://www.example.com/pricing?utm\_source=chatgpt.com\\u0026utm\_medium=organic\_ai\`})}),\`\\n\`,\_jsx(\_components.span,{className:\`line\`,children:\_jsx(\_components.span,{})})\]})})}),\_jsxs(\_components.p,{children:\[\`Do not use an arbitrary value such as \`,\_jsx(\_components.code,{children:\`utm\_source=test\`}),\`; conversions from unrecognized sources are not included in this panel.\`\]})\]}),\_jsx(Step,{title:\`Trigger an intent event\`,children:\_jsxs(\_components.p,{children:\[\`Use the tracked CTA or call \`,\_jsx(\_components.code,{children:\`trackConversion\`}),\` with \`,\_jsx(\_components.code,{children:\`eventStage: \\"intent\\"\`}),\`.\`\]})}),\_jsx(Step,{title:\`Trigger a completed event\`,children:\_jsxs(\_components.p,{children:\[\`Complete the workflow, identify the user, and send the matching \`,\_jsx(\_components.code,{children:\`completed\`}),\` event.\`\]})}),\_jsx(Step,{title:\`Confirm the result\`,children:\_jsxs(\_components.p,{children:\[\`Open \`,\_jsx(\_components.strong,{children:\`Agent Analytics\`}),\`, select the relevant site and time range, and check \`,\_jsx(\_components.strong,{children:\`Agent Attributed Conversions\`}),\`. The event should show the normalized agent source, visitor ID, and user ID when supplied.\`\]})})\]}),\`\\n\`,\_jsx(Heading,{level:\`2\`,id:\`attribution-limitations\`,children:\`Attribution limitations\`}),\`\\n\`,\_jsxs(\_components.ul,{children:\[\`\\n\`,\_jsx(\_components.li,{children:\`Cookies and storage restrictions can prevent identity from persisting.\`}),\`\\n\`,\_jsx(\_components.li,{children:\`Anonymous journeys do not merge across browsers or devices automatically.\`}),\`\\n\`,\_jsx(\_components.li,{children:\`Identifying a user improves known-user lookup but does not recreate events that occurred before Lightsage tracking was installed.\`}),\`\\n\`,\_jsx(\_components.li,{children:\`Direct, search, social, and other non-agent conversions are intentionally excluded from this panel.\`}),\`\\n\`,\_jsx(\_components.li,{children:\`Referrer data can be missing when an agent or browser removes it. Use explicit source parameters when you control the link.\`}),\`\\n\`\]}),\`\\n\`,\_jsxs(\_components.p,{children:\[\`For agent visit detection and hosting-specific installation options, see \`,\_jsx(\_components.a,{href:\`/guides/agent-tracking-middleware\`,children:\`Detect AI agent visits with agent tracking middleware\`}),\`.\`\]})\]})}function MDXContent(props={}){const{wrapper:MDXLayout}={...\_provideComponents(),...props.components};return MDXLayout?\_jsx(MDXLayout,{...props,children:\_jsx(\_createMdxContent,{...props})}):\_createMdxContent(props)}return{default:MDXContent};function \_missingMdxReference(id,component){throw new Error(\`Expected \`+(component?\`component\`:\`object\`)+\\" \`\\"+id+\\"\` to be defined: you likely forgot to import, pass, or provide it.\\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Measure agent-attributed growth","description":"Connect visits from recognized AI agent sources to sign-up, demo, checkout, and activation milestones in Agent Analytics.","sidebarTitle":"Attributed growth","href":"/agent-analytics/attributed-growth"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":\[{"title":"What agent-attributed means","slug":"what-agent-attributed-means","depth":2,"children":\[\]},{"title":"How the attribution flow works","slug":"how-the-attribution-flow-works","depth":2,"children":\[\]},{"title":"Before you begin","slug":"before-you-begin","depth":2,"children":\[\]},{"title":"Set up browser attribution","slug":"set-up-browser-attribution","depth":2,"children":\[{"title":"Initialize the browser helper","slug":"initialize-the-browser-helper","depth":3,"children":\[\]},{"title":"Track intent","slug":"track-intent","depth":3,"children":\[\]},{"title":"Identify the user and track completion","slug":"identify-the-user-and-track-completion","depth":3,"children":\[\]}\]},{"title":"Design your conversion events","slug":"design-your-conversion-events","depth":2,"children":\[\]},{"title":"Read the dashboard","slug":"read-the-dashboard","depth":2,"children":\[\]},{"title":"Validate your setup","slug":"validate-your-setup","depth":2,"children":\[\]},{"title":"Attribution limitations","slug":"attribution-limitations","depth":2,"children":\[\]}\],"codeExamples":{}},"jsLinks":\[\],"subdomain":"sapient-14d4e375","siteName":"Lightsage","title":"Measure agent-attributed growth - Lightsage","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-10T16:52:56.235Z","originalFileLocation":"agent-analytics/attributed-growth.mdx"},"headHtml":"\\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\\"isDarkMode\\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\\u0026\\u0026p!=='dark'\\u0026\\u0026p!=='system')p=\\"system\\"}var r=p==='system'?(matchMedia(\\"(prefers-color-scheme: dark)\\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\\"data-theme-preference\\",p)})();\\u003c/script>\\u003cmeta data-mint-head name=\\"description\\" content=\\"Connect visits from recognized AI agent sources to sign-up, demo, checkout, and activation milestones in Agent Analytics.\\">\\u003cmeta data-mint-head name=\\"application-name\\" content=\\"Lightsage\\">\\u003cmeta data-mint-head name=\\"generator\\" content=\\"Mintlify\\">\\u003clink data-mint-head rel=\\"icon\\" type=\\"image/png\\" sizes=\\"192x192\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/sapient-14d4e375/dqjrUzdCO-t6TId6/\_generated/favicon/android-chrome-192x192.png\\" media=\\"(prefers-color-scheme: light)\\">\\u003clink data-mint-head rel=\\"apple-touch-icon\\" type=\\"image/png\\" sizes=\\"180x180\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/sapient-14d4e375/dqjrUzdCO-t6TId6/\_generated/favicon/apple-touch-icon.png\\">\\u003clink data-mint-head rel=\\"icon\\" type=\\"image/png\\" sizes=\\"16x16\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/sapient-14d4e375/dqjrUzdCO-t6TId6/\_generated/favicon/favicon-16x16.png\\" media=\\"(prefers-color-scheme: light)\\">\\u003clink data-mint-head rel=\\"icon\\" type=\\"image/png\\" sizes=\\"32x32\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/sapient-14d4e375/dqjrUzdCO-t6TId6/\_generated/favicon/favicon-32x32.png\\" media=\\"(prefers-color-scheme: light)\\">\\u003clink data-mint-head rel=\\"shortcut icon\\" type=\\"image/x-icon\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/sapient-14d4e375/dqjrUzdCO-t6TId6/\_generated/favicon/favicon.ico\\" media=\\"(prefers-color-scheme: light)\\">\\u003clink data-mint-head rel=\\"icon\\" type=\\"image/png\\" sizes=\\"192x192\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/sapient-14d4e375/dqjrUzdCO-t6TId6/\_generated/favicon-dark/android-chrome-192x192.png\\" media=\\"(prefers-color-scheme: dark)\\">\\u003clink data-mint-head rel=\\"icon\\" type=\\"image/png\\" sizes=\\"16x16\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/sapient-14d4e375/dqjrUzdCO-t6TId6/\_generated/favicon-dark/favicon-16x16.png\\" media=\\"(prefers-color-scheme: dark)\\">\\u003clink data-mint-head rel=\\"icon\\" type=\\"image/png\\" sizes=\\"32x32\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/sapient-14d4e375/dqjrUzdCO-t6TId6/\_generated/favicon-dark/favicon-32x32.png\\" media=\\"(prefers-color-scheme: dark)\\">\\u003clink data-mint-head rel=\\"shortcut icon\\" type=\\"image/x-icon\\" href=\\"/docs/mintlify-assets/\_mintlify/favicons/sapient-14d4e375/dqjrUzdCO-t6TId6/\_generated/favicon-dark/favicon.ico\\" media=\\"(prefers-color-scheme: dark)\\">\\u003cmeta data-mint-head property=\\"og:title\\" content=\\"Measure agent-attributed growth - Lightsage\\">\\u003cmeta data-mint-head property=\\"og:description\\" content=\\"Connect visits from recognized AI agent sources to sign-up, demo, checkout, and activation milestones in Agent Analytics.\\">\\u003cmeta data-mint-head property=\\"og:site\_name\\" content=\\"Lightsage\\">\\u003cmeta data-mint-head property=\\"og:url\\" content=\\"https://lightsage.com/docs/agent-analytics/attributed-growth\\">\\u003cmeta data-mint-head property=\\"og:type\\" content=\\"website\\">\\u003cmeta data-mint-head property=\\"og:image\\" content=\\"https://sapient-14d4e375.mintlify.app/\_mintlify/api/og/v2?division=Agent+Analytics\\u0026amp;title=Measure+agent-attributed+growth\\u0026amp;description=Connect+visits+from+recognized+AI+agent+sources+to+sign-up%2C+demo%2C+checkout%2C+and+activation+milestones+in+Agent+Analytics.\\u0026amp;theme=dd8ce0054346ff07fc865000\\u0026amp;signature=fadab255a06e4cde2fe36f3baa83bf9cd81537e23b8827a6ec8a950876e364d6\\">\\u003cmeta data-mint-head property=\\"og:image:width\\" content=\\"1200\\">\\u003cmeta data-mint-head property=\\"og:image:height\\" content=\\"630\\">\\u003cmeta data-mint-head name=\\"twitter:card\\" content=\\"summary\_large\_image\\">\\u003cmeta data-mint-head name=\\"twitter:title\\" content=\\"Measure agent-attributed growth - Lightsage\\">\\u003cmeta data-mint-head name=\\"twitter:description\\" content=\\"Connect visits from recognized AI agent sources to sign-up, demo, checkout, and activation milestones in Agent Analytics.\\">\\u003cmeta data-mint-head name=\\"twitter:image\\" content=\\"https://sapient-14d4e375.mintlify.app/\_mintlify/api/og/v2?division=Agent+Analytics\\u0026amp;title=Measure+agent-attributed+growth\\u0026amp;description=Connect+visits+from+recognized+AI+agent+sources+to+sign-up%2C+demo%2C+checkout%2C+and+activation+milestones+in+Agent+Analytics.\\u0026amp;theme=dd8ce0054346ff07fc865000\\u0026amp;signature=fadab255a06e4cde2fe36f3baa83bf9cd81537e23b8827a6ec8a950876e364d6\\">\\u003cmeta data-mint-head name=\\"twitter:image:width\\" content=\\"1200\\">\\u003cmeta data-mint-head name=\\"twitter:image:height\\" content=\\"630\\">\\u003cmeta data-mint-head name=\\"msapplication-config\\" content=\\"/docs/mintlify-assets/\_mintlify/favicons/sapient-14d4e375/dqjrUzdCO-t6TId6/\_generated/favicon/browserconfig.xml\\">\\u003cmeta data-mint-head name=\\"apple-mobile-web-app-title\\" content=\\"Lightsage\\">\\u003cmeta data-mint-head name=\\"msapplication-TileColor\\" content=\\"#0EA5E9\\">\\u003clink data-mint-head rel=\\"canonical\\" href=\\"https://lightsage.com/docs/agent-analytics/attributed-growth\\">\\u003clink data-mint-head rel=\\"alternate\\" type=\\"application/xml\\" href=\\"/docs/sitemap.xml\\">\\u003clink data-mint-head rel=\\"alternate\\" type=\\"text/markdown\\" href=\\"/docs/agent-analytics/attributed-growth.md\\">\\u003cscript data-mint-head type=\\"application/ld+json\\">{\\"@context\\":\\"https://schema.org\\",\\"@graph\\":\[{\\"@type\\":\\"Organization\\",\\"@id\\":\\"https://lightsage.com/#organization\\",\\"name\\":\\"Lightsage\\",\\"url\\":\\"https://lightsage.com\\",\\"logo\\":{\\"@type\\":\\"ImageObject\\",\\"url\\":\\"https://mintcdn.com/sapient-14d4e375/0RQiSxJPQv6MyuZt/images/lightsage-logo-with-text-light.svg?fit=max\\u0026auto=format\\u0026n=0RQiSxJPQv6MyuZt\\u0026q=85\\u0026s=843d0563baa54c778891f942711ab938\\"}},{\\"@type\\":\\"WebSite\\",\\"@id\\":\\"https://lightsage.com/docs#website\\",\\"name\\":\\"Lightsage\\",\\"url\\":\\"https://lightsage.com/docs\\",\\"publisher\\":{\\"@id\\":\\"https://lightsage.com/#organization\\"}},{\\"@type\\":\\"WebPage\\",\\"@id\\":\\"https://lightsage.com/docs/agent-analytics/attributed-growth#webpage\\",\\"url\\":\\"https://lightsage.com/docs/agent-analytics/attributed-growth\\",\\"name\\":\\"Measure agent-attributed growth\\",\\"description\\":\\"Connect visits from recognized AI agent sources to sign-up, demo, checkout, and activation milestones in Agent Analytics.\\",\\"dateModified\\":\\"2026-08-10T16:52:56.235Z\\",\\"isPartOf\\":{\\"@id\\":\\"https://lightsage.com/docs#website\\"},\\"breadcrumb\\":{\\"@id\\":\\"https://lightsage.com/docs/agent-analytics/attributed-growth#breadcrumb\\"}},{\\"@type\\":\\"BreadcrumbList\\",\\"@id\\":\\"https://lightsage.com/docs/agent-analytics/attributed-growth#breadcrumb\\",\\"itemListElement\\":\[{\\"@type\\":\\"ListItem\\",\\"position\\":1,\\"name\\":\\"Lightsage\\",\\"item\\":\\"https://lightsage.com/docs\\"},{\\"@type\\":\\"ListItem\\",\\"position\\":2,\\"name\\":\\"Measure agent-attributed growth\\",\\"item\\":\\"https://lightsage.com/docs/agent-analytics/attributed-growth\\"}\]},{\\"@type\\":\[\\"Article\\",\\"TechArticle\\"\],\\"@id\\":\\"https://lightsage.com/docs/agent-analytics/attributed-growth#article\\",\\"headline\\":\\"Measure agent-attributed growth\\",\\"name\\":\\"Measure agent-attributed growth\\",\\"description\\":\\"Connect visits from recognized AI agent sources to sign-up, demo, checkout, and activation milestones in Agent Analytics.\\",\\"url\\":\\"https://lightsage.com/docs/agent-analytics/attributed-growth\\",\\"mainEntityOfPage\\":{\\"@id\\":\\"https://lightsage.com/docs/agent-analytics/attributed-growth#webpage\\"},\\"dateModified\\":\\"2026-08-10T16:52:56.235Z\\",\\"publisher\\":{\\"@id\\":\\"https://lightsage.com/#organization\\"},\\"isPartOf\\":{\\"@id\\":\\"https://lightsage.com/docs#website\\"}}\]}\\u003c/script>\\u003cscript data-mint-head type=\\"application/ld+json\\">{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebSite\\",\\"name\\":\\"Lightsage\\",\\"creator\\":{\\"@type\\":\\"Organization\\",\\"name\\":\\"Mintlify\\",\\"url\\":\\"https://mintlify.com\\"}}\\u003c/script>","siteName":"Lightsage","nav":{"global":null,"tabs":\[{"tab":"Documentation","pages":\[{"group":"Quickstart","pages":\[{"title":"Quickstart","sidebarTitle":"Quickstart","href":""},{"title":"Migrate from Sapient to Lightsage","sidebarTitle":"Migrate from Sapient","icon":"arrows-rotate","href":"/migration-guide"},{"group":"Onboard your AI agent","root":{"title":"Onboard your AI agent to Lightsage","sidebarTitle":"Onboard your AI agent","href":"/agent-onboarding"},"expanded":true,"pages":\[{"title":"Agent Skills","href":"/agent-onboarding/agent-skills"},{"title":"Lightsage MCP","href":"/agent-onboarding/lightsage-mcp"},{"title":"Lightsage CLI","href":"/agent-onboarding/lightsage-cli"},{"title":"Workflows","href":"/agent-onboarding/workflows"},{"title":"Docs for agents","href":"/agent-onboarding/docs-for-agents"}\]}\]},{"group":"Guides","pages":\[{"title":"Pull actionables into your agent","href":"/workflows/pull-actionables-into-your-agent"},{"title":"Running evals","description":"Create, fan out, monitor, and inspect coding-agent evals with the Lightsage CLI.","href":"/guides/running-evals"}\]},{"group":"Agent Analytics","pages":\[{"title":"Measure agent-attributed growth","sidebarTitle":"Attributed growth","href":"/agent-analytics/attributed-growth"}\]},{"group":"Integrations","pages":\[{"title":"Google Cloud DNS integration","description":"Set up Lightsage Agent Analytics for a domain managed in Google Cloud DNS by routing traffic through a Google load balancer and exporting request logs.","sidebarTitle":"Google Cloud DNS","href":"/agent-analytics/integrations/google-cloud-dns"}\]},{"group":"Lightsage Docs Agent","pages":\[{"title":"Lightsage Docs Agent","sidebarTitle":"Overview","href":"/lightsage-docs-agent/overview"},{"title":"Run docs evals from GitHub","sidebarTitle":"GitHub PR evals","href":"/lightsage-docs-agent/github-pr-evals"}\]}\]},{"tab":"CLI Reference","pages":\[{"title":"CLI Reference","href":"/cli-reference"}\]},{"tab":"MCP Reference","pages":\[{"title":"MCP Reference","href":"/mcp-reference"}\]},{"tab":"API Reference","pages":\[{"title":"API Reference","href":"/api-reference/introduction"}\]},{"tab":"Changelog","pages":\[{"title":"Changelog","href":"/changelog"}\]}\]},"title":"Measure agent-attributed growth - Lightsage","buildId":"dpl\_GvhK4qVXq51DpfYJLCtPpYNN4YHN","deploymentId":"dpl\_GvhK4qVXq51DpfYJLCtPpYNN4YHN","dynamics":\[\],"chunks":\[\]}
