Push leads into Oktivo CRM from forms, chatbots, ad platforms, and your own backend
The Lead API lets any external system drop a lead straight into your Oktivo CRM
dashboard. This guide walks through a working integration end to end.
1. Create an API token
The Lead API is authenticated with an account API token. Create one from your
account settings:
1
Open account settings
In the dashboard, click your account and open Settings
(app.oktivo.com/account).
2
Go to API Tokens
In the settings sidebar, select the API Tokens tab. You’ll see the
API Tokens panel listing any existing tokens with their expiry and
last-used date.
Settings → API Tokens: create, rotate, and delete tokens
3
Create the token
Click Create Token (top right), give it a recognisable name
(e.g. website-lead-capture), and choose an expiry (1–365 days).
4
Copy and store it
Copy the okt_... value immediately — it is shown only once. Store it
as a secret in whatever system will call the API; never commit it to source
control.
Each account can have a maximum of 5 active tokens. If you’ve hit the
limit, delete an unused token (trash icon) before creating a new one. Use the
rotate icon to replace a token’s value in a single step without changing where
it’s referenced.
See Authentication for token rotation and expiry details.
2. Send your first lead
The only hard requirement is a phone or an email. Everything else is
optional.
A 201 means a new lead was created; a 200 with "merged": true means the
person already existed and your data was merged in. See the full field reference
on Capture a Lead.
3. Attach your own fields
Any key that is not a reserved lead field is stored as a custom field and shows
up as a column on the CRM dashboard. Send them at the top level, or group them
under customFields:
You do not need to check whether a lead already exists. Oktivo keeps one lead
per phone (or email) per account:
A new acquisition source on an existing person merges and records a source
history entry.
Self-service sources (website, chatbot, whatsapp, google_form,
ai_powered_lead, payment_page_drop, landing) always merge on repeat and
keep the latest values — ideal for returning visitors and re-fired events.
Curated sources (api, webhook, manual, csv_import) return a 409 on a
repeat of the same source, protecting your data from accidental overwrites.
Set metadata.source to one of the known values so filtering and the merge
behaviour stay correct. Any unknown source is stored as api.
5. Forward from an unauthenticated webhook (optional)
If a platform can only send plain, unauthenticated webhooks (no custom headers),
put a tiny proxy in front of the Lead API that attaches your Bearer token. This
repo ships a ready-made Cloudflare Worker at
cloudflare-lead-worker/ that maps an arbitrary webhook payload into the Lead
API body and forwards it. Set your OKTIVO_API_TOKEN as a Worker secret and
point the platform’s webhook at the Worker URL.
Common pitfalls
Missing identity — sending neither phone nor email returns a 400.
Unexpected source — a typo in metadata.source silently becomes api;
use the exact values from the source table.
Hitting the field cap — more than 50 custom fields returns a 400 rather
than silently dropping columns.
Rate limits — on a 429, honour the Retry-After header and back off.
6. How Channel and Source are determined
Oktivo shows two normalized attribution values on every lead — Channel and
Source — in the lead’s Details & attribution panel, the Marketing
tab, and the Leads table. You never send these directly; Oktivo derives them
from the signals you do send (metadata.source, the utm* fields, the
referrer, and the ad platform). Sending the right signals is what makes them
accurate.
Channel
Channel is a fixed, reportable set — a lead always falls into exactly one:Website · WhatsApp · Offline · Facebook · Email · Outbound call ·
Inbound · Event · Affiliate · Online Other · Offline OtherIt is derived from your metadata.source:
A lead that carries no recognizable source but has any digital signal (a UTM, a
referrer, an email, a click id) becomes Online Other; with nothing digital
at all it becomes Offline Other. For Meta leads, the real ad surface
(Instagram vs Facebook) is preserved as a platform sub-detail and shown next to
the channel, e.g. Facebook (Instagram) — so no insight is lost.
Source
Source is derived in this strict order:
Meta leads (facebook_ad) → the real platform: Instagram or
Facebook (never the raw facebook_ad).
A UTM is present → the humanized utm_source (e.g. google, newsletter).
No UTM but an external referrer is present → Organic.
Neither → Direct.
So to get accurate Source for a website form, send utm_source when the landing
URL has one, and send the page’s document.referrer when it does not.
Channel and Source are computed once on the server when the lead is created and
returned on the lead’s classification object. Leads created before this
feature are classified on read, so older leads display correctly too.
Oktivo ships a tiny, dependency-free tracking snippet. Embed it on the
customer’s site and it captures marketing attribution (UTMs, referrer,
Google/Meta click ids) and anonymous page activity, keyed by a durable
first-party visitorId. When that same visitor later submits your
lead-capture form carrying the visitorId, Oktivo stitches the prior anonymous
activity (including the referrer that drives the Organic Source rule) onto
the created lead.Place this before </body>:
oktivo.getVisitorId() — the durable visitor id (put it on your forms).
oktivo.track(name, props?) — send a custom event, e.g. oktivo.track('add_to_cart', { sku }).
oktivo.pageview() — send a page view for the current URL.
The snippet needs no server work from you; the token in the embed tag authorizes
the data and the tenant is resolved from it, never from the page.
8. Complete website form example
A self-contained lead-capture form for a customer’s own site. It embeds the
tracking snippet, reads UTM params and the referrer from the landing URL, picks
up the visitorId, and POSTs to the Lead API. Channel and Source are derived
server-side from these signals.
<!-- 1. Tracking snippet (captures referrer + anonymous activity, mints visitorId) --><script src="https://client-backend.oktivo.com/api/v1/crm/track.js" data-token="okt_your_token_here" data-auto-pageview="true"></script><!-- 2. The lead form --><form id="oktivo-lead-form"> <input name="name" placeholder="Full name" required /> <input name="phone" placeholder="Phone (e.g. +919876543210)" required /> <input name="email" type="email" placeholder="Email" /> <button type="submit">Request a callback</button></form><script> // Read UTM params from the landing URL (persisted so they survive navigation). function captureUtms() { var KEY = "oktivo_form_utms"; var p = new URLSearchParams(window.location.search); var fresh = { utmSource: p.get("utm_source") || undefined, utmMedium: p.get("utm_medium") || undefined, utmCampaign: p.get("utm_campaign") || undefined, }; var hasFresh = fresh.utmSource || fresh.utmMedium || fresh.utmCampaign; try { if (hasFresh) localStorage.setItem(KEY, JSON.stringify(fresh)); return hasFresh ? fresh : JSON.parse(localStorage.getItem(KEY) || "{}"); } catch (e) { return fresh; } } document.getElementById("oktivo-lead-form").addEventListener("submit", function (e) { e.preventDefault(); var form = e.target; var utms = captureUtms(); var metadata = { source: "website", // drives Channel = Website referrer: document.referrer || undefined, // drives Source = Organic when no UTM platform: "web", }; if (utms.utmSource) metadata.utmSource = utms.utmSource; // drives Source = <utm_source> if (utms.utmMedium) metadata.utmMedium = utms.utmMedium; if (utms.utmCampaign) metadata.utmCampaign = utms.utmCampaign; // Stitch prior anonymous browsing (incl. referrer) onto this lead. if (window.oktivo && window.oktivo.getVisitorId) { metadata.visitorId = window.oktivo.getVisitorId(); } var body = { name: form.name.value.trim(), phone: form.phone.value.trim(), email: form.email.value.trim() || undefined, metadata: metadata, }; fetch("https://client-backend.oktivo.com/api/v1/crm/leads", { method: "POST", headers: { "Content-Type": "application/json", // NOTE: a browser-exposed token is capture-only. Scope it to lead // capture and rotate it regularly — anyone viewing source can read it. "Authorization": "Bearer okt_your_token_here", }, body: JSON.stringify(body), }) .then(function (r) { return r.json(); }) .then(function (res) { if (res.success) { form.reset(); // show your own "thanks" state here } }) .catch(function () { /* show a retry message */ }); });</script>
A token placed in client-side HTML is visible to anyone who views the page
source. For public websites, prefer routing the form POST through your own
backend (or the bundled Cloudflare Worker)
so the okt_ token stays server-side. If you must call the API directly from
the browser, use a token scoped only to lead capture and rotate it on a
schedule.
What this produces
For a visitor who arrived at https://site.com/?utm_source=google&utm_medium=cpc
and submitted the form, the lead is created with:
Channel:Website
Source:Google
For a visitor who arrived with no UTM but was referred from another site, the
lead shows Channel:Website and Source:Organic. With neither, the
Source is Direct.
Valid metadata.source values
Send one of these exact strings so Channel/Source and the duplicate-merge rules
stay reliable. An unrecognized value is stored as api.
Value
Typical use
website
A form on the customer’s own site
chatbot
A website/app chatbot lead_creator
landing
A hosted landing page / “try live call”
whatsapp
WhatsApp inbound
facebook_ad
Meta (Facebook/Instagram) lead ads
google_ad
Google Ads
google_form
Google Forms capture
google_sheet
Google Sheets import
campaign
Outbound voice campaign upload
apollo
Apollo.io enrichment / import
ai_powered_lead
Customer’s own AI lead-scoring engine
payment_page_drop
Abandoned checkout / payment page
kalki_intake
A bespoke per-customer intake form
manual
Added by hand in the dashboard
csv_import
Bulk CSV upload
api
Generic programmatic push (default fallback)
webhook
Generic webhook ingestion
9. Worked examples — what each capture path produces
Every capture path writes a few raw signals (metadata.source, metadata.platform,
utm*, referrer, sourceHistory). Oktivo’s classifier folds those into the
Channel, Source, and Platform you see in the Leads table and the
lead’s Details & attribution panel. The table below shows, for each real path,
the signals that arrive and the values the user ends up seeing.
Channel and Source are always derived — no path sets them directly.
Platform is only non-null for Meta ad surfaces (Instagram/Facebook).
platform: google, utmSource: google, utmMedium: cpc, sourceHistory[].channel: google
Online Other
Google
null
5
Google Forms capture
google_form
form answers in industryData
Online Other
Direct¹
null
6
Google Sheet import
google_sheet
row data in industryData
Online Other
Direct¹
null
7
Website form + UTM (Lead API, source: website)
website
utmSource: google, utmMedium: cpc, utmCampaign: spring
Website
Google
null
8
Website form + referrer only
website
referrer: https://news.ycombinator.com/..., no UTM
Website
Organic
null
9
Website form, direct
website
no UTM, no referrer
Website
Direct
null
10
Oktivo tracking script → stitched lead
website
visitorId links prior session’s referrer/UTMs onto the lead
Website
Google / Organic / Direct²
null
11
Website chatbot (lead_creator)
chatbot
chat-captured fields in industryData
Website
Direct¹
null
12
Landing page “try live call”
landing (+ landingSource: live-call)
platform: web
Inbound
Direct¹
null
13
Landing page form (no live-call)
landing
platform: web
Website
Direct¹
null
14
WhatsApp inbound
whatsapp
platform: whatsapp
WhatsApp
Direct¹
null
15
Outbound voice campaign upload
campaign
contact row
Outbound call
Direct¹
null
16
Apollo.io import / enrichment
apollo
company/title/LinkedIn in industryData
Online Other
Direct¹
null
17
AI-scored lead (webhook)
ai_powered_lead
course/lead-type bag
Online Other
Direct¹
null
18
Abandoned checkout (webhook)
payment_page_drop
cart/payment bag
Website
Direct¹
null
19
Kalki / bespoke intake form (JWT path)
kalki_intake
rich custom-field bag
Online Other
Direct¹
null
20
Generic API push (no/unknown source)
api (fallback)
whatever you send
Online Other³
Direct⁴
null
21
Generic webhook
webhook
mapped payload
Online Other
Direct¹
null
22
Manual entry (dashboard)
manual
typed by a rep
Offline
Direct
null
23
CSV bulk import
csv_import
spreadsheet rows
Offline
Direct¹
null
24
Cloudflare Worker proxy
(whatever it forwards)
maps a plain webhook → Lead API body; source falls back to api unless the payload sets metadata.source
follows the forwarded source
follows the signals
null/Meta
Footnotes
Direct is the terminal default: the path carries no UTM and no referrer, so
Source rules 2 and 3 don’t fire. If the same lead also carries a UTM or
referrer (e.g. a website form that passed them through), Source becomes that
UTM’s utm_source or Organic instead.
The stitched Source depends on what the tracking script captured in the
visitor’s session: a UTM → that utm_source; a referrer only → Organic;
neither → Direct.
A generic api lead with any digital signal (UTM, referrer, email, click id)
lands in Online Other; with nothing digital at all it would be
Offline Other. In practice an API lead almost always has an email, so
Online Other is the usual result.
If you send utmSource/referrer alongside a generic api push, Source
follows those (UTM → utm_source, referrer → Organic) instead of Direct.
Reading it in the Leads table
The Source column shows the derived Channel plus a platform badge where one
exists, e.g. a Meta/Instagram lead reads Facebook · Instagram, a Google
lead reads Online Other · Google, a plain website lead reads
Website · Direct.
The lead’s Details & attribution panel shows a Channel row
(e.g. Facebook (Instagram)) directly above a Source row
(e.g. Instagram). When a lead arrived from more than one source, the Source
row carries a +N badge that opens the full arrival journey.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Oktivo Voice Platform","colors":{"primary":"#6366F1","light":"#818CF8","dark":"#4F46E5"},"logo":{"light":"https://mintcdn.com/oktivo-stage-docs/c3bIROP6UAjDKw3o/logo/light.svg?fit=max\u0026auto=format\u0026n=c3bIROP6UAjDKw3o\u0026q=85\u0026s=1c98fac4d121323a27790697944c99b7","dark":"https://mintcdn.com/oktivo-stage-docs/c3bIROP6UAjDKw3o/logo/dark.svg?fit=max\u0026auto=format\u0026n=c3bIROP6UAjDKw3o\u0026q=85\u0026s=15f13a2059aaed381bcb0ce57887df79"},"favicon":"https://mintcdn.com/oktivo-stage-docs/c3bIROP6UAjDKw3o/favicon.svg?fit=max\u0026auto=format\u0026n=c3bIROP6UAjDKw3o\u0026q=85\u0026s=9c5dcbfa6a668979966a6d33ea53c9bc","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://client-backend.oktivo.com"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"oktivo-stage-docs","hasAudioNarration":false,"actualSubdomain":"oktivo-stage-docs","customDomains":["stage-docs.oktivo.com"],"gitSource":{"type":"github","owner":"op-oktivo","repo":"oktivo-voice-app","deployBranch":"stage","contentDirectory":"documentation","isPrivate":true,"mountPath":"","label":"","_id":"6afc2692fb78305a65834b0e"},"entitlements":{},"buildId":"6afd789936e6bb5efca0aa76","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"Documentation","count":15},{"language":"default","tag":"API Reference","count":14},{"language":"default","tag":"Webhooks","count":5},{"language":"default","tag":"Guides","count":5},{"language":"default","tag":"Authentication","count":4},{"language":"default","tag":"Core Concepts","count":4},{"language":"default","tag":"Calls","count":3},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Connectors","count":3},{"language":"default","tag":"Leads","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"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":"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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"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":"turbopuffer-dual-write","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},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"guides/lead-capture","slug":"/guides/lead-capture","pageMetadata":{"title":"Capturing Leads via API","description":"Push leads into Oktivo CRM from forms, chatbots, ad platforms, and your own backend","href":"/guides/lead-capture"},"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: \"Push leads into Oktivo CRM from forms, chatbots, ad platforms, and your own backend\"\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`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,Note,OptimizedImage,Step,Steps,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,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:`The Lead API lets any external system drop a lead straight into your Oktivo CRM\ndashboard. This guide walks through a working integration end to end.`}),`\n`,_jsx(Heading,{level:`2`,id:`1-create-an-api-token`,children:`1. Create an API token`}),`\n`,_jsx(_components.p,{children:`The Lead API is authenticated with an account API token. Create one from your\naccount settings:`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Open account settings`,children:_jsxs(_components.p,{children:[`In the dashboard, click your account and open `,_jsx(_components.strong,{children:`Settings`}),`\n(`,_jsx(_components.code,{children:`app.oktivo.com/account`}),`).`]})}),_jsxs(Step,{title:`Go to API Tokens`,children:[_jsxs(_components.p,{children:[`In the settings sidebar, select the `,_jsx(_components.strong,{children:`API Tokens`}),` tab. You’ll see the\n`,_jsx(_components.strong,{children:`API Tokens`}),` panel listing any existing tokens with their expiry and\nlast-used date.`]}),_jsx(Frame,{caption:`Settings → API Tokens: create, rotate, and delete tokens`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/oktivo-stage-docs/c3bIROP6UAjDKw3o/images/create_token.png?fit=max\u0026auto=format\u0026n=c3bIROP6UAjDKw3o\u0026q=85\u0026s=d7c9b9487b2e7ad498efceaddea85781`,alt:`Oktivo account API Tokens settings with the Create Token button`,\"data-og-width\":`1901`,width:`1901`,\"data-og-height\":`862`,height:`862`,\"data-path\":`images/create_token.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/oktivo-stage-docs/c3bIROP6UAjDKw3o/images/create_token.png?w=280\u0026fit=max\u0026auto=format\u0026n=c3bIROP6UAjDKw3o\u0026q=85\u0026s=c4329d9e086cef1dd99d40bd4a5990db 280w, https://mintcdn.com/oktivo-stage-docs/c3bIROP6UAjDKw3o/images/create_token.png?w=560\u0026fit=max\u0026auto=format\u0026n=c3bIROP6UAjDKw3o\u0026q=85\u0026s=73381eb62d45b9cb2c54c93e53f7941e 560w, https://mintcdn.com/oktivo-stage-docs/c3bIROP6UAjDKw3o/images/create_token.png?w=840\u0026fit=max\u0026auto=format\u0026n=c3bIROP6UAjDKw3o\u0026q=85\u0026s=470e41bf344699066d222d3e1f1d5432 840w, https://mintcdn.com/oktivo-stage-docs/c3bIROP6UAjDKw3o/images/create_token.png?w=1100\u0026fit=max\u0026auto=format\u0026n=c3bIROP6UAjDKw3o\u0026q=85\u0026s=45c81f745a849797bfbb699bd3f2e4a2 1100w, https://mintcdn.com/oktivo-stage-docs/c3bIROP6UAjDKw3o/images/create_token.png?w=1650\u0026fit=max\u0026auto=format\u0026n=c3bIROP6UAjDKw3o\u0026q=85\u0026s=e96b343d3ca8a3991a69049e8915d37b 1650w, https://mintcdn.com/oktivo-stage-docs/c3bIROP6UAjDKw3o/images/create_token.png?w=2500\u0026fit=max\u0026auto=format\u0026n=c3bIROP6UAjDKw3o\u0026q=85\u0026s=ff36df0f749d644ccf0cfe1114fdc130 2500w`})})]}),_jsx(Step,{title:`Create the token`,children:_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Create Token`}),` (top right), give it a recognisable name\n(e.g. `,_jsx(_components.code,{children:`website-lead-capture`}),`), and choose an expiry (1–365 days).`]})}),_jsx(Step,{title:`Copy and store it`,children:_jsxs(_components.p,{children:[`Copy the `,_jsx(_components.code,{children:`okt_...`}),` value immediately — it is shown `,_jsx(_components.strong,{children:`only once`}),`. Store it\nas a secret in whatever system will call the API; never commit it to source\ncontrol.`]})})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Each account can have a `,_jsx(_components.strong,{children:`maximum of 5 active tokens`}),`. If you’ve hit the\nlimit, delete an unused token (trash icon) before creating a new one. Use the\nrotate icon to replace a token’s value in a single step without changing where\nit’s referenced.`]})}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/authentication`,children:`Authentication`}),` for token rotation and expiry details.`]}),`\n`,_jsx(Heading,{level:`2`,id:`2-send-your-first-lead`,children:`2. Send your first lead`}),`\n`,_jsxs(_components.p,{children:[`The only hard requirement is a `,_jsx(_components.strong,{children:`phone or an email`}),`. Everything else is\noptional.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://client-backend.oktivo.com/api/v1/crm/leads`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer okt_your_token_here\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Priya Sharma\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"phone\": \"9876543210\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"[email protected]\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"metadata\": { \"source\": \"website\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`201`}),` means a new lead was created; a `,_jsx(_components.code,{children:`200`}),` with `,_jsx(_components.code,{children:`\"merged\": true`}),` means the\nperson already existed and your data was merged in. See the full field reference\non `,_jsx(_components.a,{href:`/api-reference/leads/create-lead`,children:`Capture a Lead`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`3-attach-your-own-fields`,children:`3. Attach your own fields`}),`\n`,_jsxs(_components.p,{children:[`Any key that is not a reserved lead field is stored as a custom field and shows\nup as a column on the CRM dashboard. Send them at the top level, or group them\nunder `,_jsx(_components.code,{children:`customFields`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Priya Sharma\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"9876543210\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customFields\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"course\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Data Science\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"budget\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"₹2,50,000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"preferred_batch\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Weekend\"`})]}),`\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:`You can send up to 50 custom fields per lead.`}),`\n`,_jsx(Heading,{level:`2`,id:`4-let-oktivo-de-duplicate-for-you`,children:`4. Let Oktivo de-duplicate for you`}),`\n`,_jsx(_components.p,{children:`You do not need to check whether a lead already exists. Oktivo keeps one lead\nper phone (or email) per account:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A new acquisition `,_jsx(_components.strong,{children:`source`}),` on an existing person merges and records a source\nhistory entry.`]}),`\n`,_jsxs(_components.li,{children:[`Self-service sources (`,_jsx(_components.code,{children:`website`}),`, `,_jsx(_components.code,{children:`chatbot`}),`, `,_jsx(_components.code,{children:`whatsapp`}),`, `,_jsx(_components.code,{children:`google_form`}),`,\n`,_jsx(_components.code,{children:`ai_powered_lead`}),`, `,_jsx(_components.code,{children:`payment_page_drop`}),`, `,_jsx(_components.code,{children:`landing`}),`) always merge on repeat and\nkeep the latest values — ideal for returning visitors and re-fired events.`]}),`\n`,_jsxs(_components.li,{children:[`Curated sources (`,_jsx(_components.code,{children:`api`}),`, `,_jsx(_components.code,{children:`webhook`}),`, `,_jsx(_components.code,{children:`manual`}),`, `,_jsx(_components.code,{children:`csv_import`}),`) return a `,_jsx(_components.code,{children:`409`}),` on a\nrepeat of the same source, protecting your data from accidental overwrites.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`metadata.source`}),` to one of the known values so filtering and the merge\nbehaviour stay correct. Any unknown source is stored as `,_jsx(_components.code,{children:`api`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`5-forward-from-an-unauthenticated-webhook-optional`,children:`5. Forward from an unauthenticated webhook (optional)`}),`\n`,_jsxs(_components.p,{children:[`If a platform can only send plain, unauthenticated webhooks (no custom headers),\nput a tiny proxy in front of the Lead API that attaches your Bearer token. This\nrepo ships a ready-made Cloudflare Worker at\n`,_jsx(_components.code,{children:`cloudflare-lead-worker/`}),` that maps an arbitrary webhook payload into the Lead\nAPI body and forwards it. Set your `,_jsx(_components.code,{children:`OKTIVO_API_TOKEN`}),` as a Worker secret and\npoint the platform’s webhook at the Worker URL.`]}),`\n`,_jsx(Heading,{level:`2`,id:`common-pitfalls`,children:`Common pitfalls`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Missing identity`}),` — sending neither `,_jsx(_components.code,{children:`phone`}),` nor `,_jsx(_components.code,{children:`email`}),` returns a `,_jsx(_components.code,{children:`400`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Unexpected `,_jsx(_components.code,{children:`source`})]}),` — a typo in `,_jsx(_components.code,{children:`metadata.source`}),` silently becomes `,_jsx(_components.code,{children:`api`}),`;\nuse the exact values from the `,_jsx(_components.a,{href:`/api-reference/leads/create-lead#lead-sources`,children:`source table`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Hitting the field cap`}),` — more than 50 custom fields returns a `,_jsx(_components.code,{children:`400`}),` rather\nthan silently dropping columns.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Rate limits`}),` — on a `,_jsx(_components.code,{children:`429`}),`, honour the `,_jsx(_components.code,{children:`Retry-After`}),` header and back off.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`6-how-channel-and-source-are-determined`,children:`6. How Channel and Source are determined`}),`\n`,_jsxs(_components.p,{children:[`Oktivo shows two normalized attribution values on every lead — `,_jsx(_components.strong,{children:`Channel`}),` and\n`,_jsx(_components.strong,{children:`Source`}),` — in the lead’s `,_jsx(_components.strong,{children:`Details \u0026 attribution`}),` panel, the `,_jsx(_components.strong,{children:`Marketing`}),`\ntab, and the Leads table. You never send these directly; Oktivo derives them\nfrom the signals you do send (`,_jsx(_components.code,{children:`metadata.source`}),`, the `,_jsx(_components.code,{children:`utm*`}),` fields, the\nreferrer, and the ad platform). Sending the right signals is what makes them\naccurate.`]}),`\n`,_jsx(Heading,{level:`3`,id:`channel`,children:`Channel`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Channel`}),` is a fixed, reportable set — a lead always falls into exactly one:`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Website`}),` · `,_jsx(_components.code,{children:`WhatsApp`}),` · `,_jsx(_components.code,{children:`Offline`}),` · `,_jsx(_components.code,{children:`Facebook`}),` · `,_jsx(_components.code,{children:`Email`}),` · `,_jsx(_components.code,{children:`Outbound call`}),` ·\n`,_jsx(_components.code,{children:`Inbound`}),` · `,_jsx(_components.code,{children:`Event`}),` · `,_jsx(_components.code,{children:`Affiliate`}),` · `,_jsx(_components.code,{children:`Online Other`}),` · `,_jsx(_components.code,{children:`Offline Other`})]}),`\n`,_jsxs(_components.p,{children:[`It is derived from your `,_jsx(_components.code,{children:`metadata.source`}),`:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsxs(_components.th,{children:[`You send `,_jsx(_components.code,{children:`metadata.source`})]}),_jsx(_components.th,{children:`Channel`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`website`}),`, `,_jsx(_components.code,{children:`chatbot`}),`, `,_jsx(_components.code,{children:`landing`}),`, `,_jsx(_components.code,{children:`payment_page_drop`})]}),_jsx(_components.td,{children:`Website`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`facebook_ad`}),` (any platform, incl. Instagram)`]}),_jsx(_components.td,{children:`Facebook`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`whatsapp`})}),_jsx(_components.td,{children:`WhatsApp`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`manual`}),`, `,_jsx(_components.code,{children:`csv_import`})]}),_jsx(_components.td,{children:`Offline`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`campaign`}),` (outbound voice)`]}),_jsx(_components.td,{children:`Outbound call`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`google_ad`}),`, `,_jsx(_components.code,{children:`google_form`}),`, `,_jsx(_components.code,{children:`google_sheet`}),`, `,_jsx(_components.code,{children:`api`}),`, `,_jsx(_components.code,{children:`webhook`}),`, `,_jsx(_components.code,{children:`apollo`}),`, `,_jsx(_components.code,{children:`ai_powered_lead`}),`, `,_jsx(_components.code,{children:`kalki_intake`})]}),_jsx(_components.td,{children:`Online Other`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`a landing “live-call” request`}),_jsx(_components.td,{children:`Inbound`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A lead that carries no recognizable source but has any digital signal (a UTM, a\nreferrer, an email, a click id) becomes `,_jsx(_components.strong,{children:`Online Other`}),`; with nothing digital\nat all it becomes `,_jsx(_components.strong,{children:`Offline Other`}),`. For Meta leads, the real ad surface\n(Instagram vs Facebook) is preserved as a platform sub-detail and shown next to\nthe channel, e.g. `,_jsx(_components.strong,{children:`Facebook (Instagram)`}),` — so no insight is lost.`]}),`\n`,_jsx(Heading,{level:`3`,id:`source`,children:`Source`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Source`}),` is derived in this strict order:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Meta leads`}),` (`,_jsx(_components.code,{children:`facebook_ad`}),`) → the real platform: `,_jsx(_components.strong,{children:`Instagram`}),` or\n`,_jsx(_components.strong,{children:`Facebook`}),` (never the raw `,_jsx(_components.code,{children:`facebook_ad`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`A UTM is present`}),` → the humanized `,_jsx(_components.code,{children:`utm_source`}),` (e.g. `,_jsx(_components.code,{children:`google`}),`, `,_jsx(_components.code,{children:`newsletter`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`No UTM but an external referrer is present`}),` → `,_jsx(_components.strong,{children:`Organic`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Neither`}),` → `,_jsx(_components.strong,{children:`Direct`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`So to get accurate Source for a website form, send `,_jsx(_components.code,{children:`utm_source`}),` when the landing\nURL has one, and send the page’s `,_jsx(_components.code,{children:`document.referrer`}),` when it does not.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Channel and Source are computed once on the server when the lead is created and\nreturned on the lead’s `,_jsx(_components.code,{children:`classification`}),` object. Leads created before this\nfeature are classified on read, so older leads display correctly too.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`7-website-tracking-snippet-referrer-+-anonymous-activity`,children:`7. Website tracking snippet (referrer + anonymous activity)`}),`\n`,_jsxs(_components.p,{children:[`Oktivo ships a tiny, dependency-free tracking snippet. Embed it on the\ncustomer’s site and it captures marketing attribution (UTMs, `,_jsx(_components.strong,{children:`referrer`}),`,\nGoogle/Meta click ids) and anonymous page activity, keyed by a durable\nfirst-party `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`visitorId`})}),`. When that same visitor later submits your\nlead-capture form carrying the `,_jsx(_components.code,{children:`visitorId`}),`, Oktivo stitches the prior anonymous\nactivity (including the referrer that drives the `,_jsx(_components.strong,{children:`Organic`}),` Source rule) onto\nthe created lead.`]}),`\n`,_jsxs(_components.p,{children:[`Place this before `,_jsx(_components.code,{children:`\u003c/body>`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,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:`script`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://client-backend.oktivo.com/api/v1/crm/track.js\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` data-token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"okt_your_token_here\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` data-auto-pageview`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"true\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`It exposes a small API on `,_jsx(_components.code,{children:`window.oktivo`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`oktivo.getVisitorId()`}),` — the durable visitor id (put it on your forms).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`oktivo.track(name, props?)`}),` — send a custom event, e.g. `,_jsx(_components.code,{children:`oktivo.track('add_to_cart', { sku })`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`oktivo.pageview()`}),` — send a page view for the current URL.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`The snippet needs no server work from you; the token in the embed tag authorizes\nthe data and the tenant is resolved from it, never from the page.`}),`\n`,_jsx(Heading,{level:`2`,id:`8-complete-website-form-example`,children:`8. Complete website form example`}),`\n`,_jsxs(_components.p,{children:[`A self-contained lead-capture form for a customer’s own site. It embeds the\ntracking snippet, reads UTM params and the referrer from the landing URL, picks\nup the `,_jsx(_components.code,{children:`visitorId`}),`, and POSTs to the Lead API. Channel and Source are derived\nserver-side from these signals.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`79`,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:`79`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`\u003c!-- 1. Tracking snippet (captures referrer + anonymous activity, mints visitorId) -->`})}),`\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:`script`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://client-backend.oktivo.com/api/v1/crm/track.js\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` data-token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"okt_your_token_here\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` data-auto-pageview`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"true\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`\u003c!-- 2. The lead form -->`})}),`\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:`form`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"oktivo-lead-form\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\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:`input`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` placeholder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Full name\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` required`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})]}),`\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:`input`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"phone\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` placeholder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Phone (e.g. +919876543210)\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` required`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})]}),`\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:`input`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"email\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"email\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` placeholder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})]}),`\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:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"submit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Request a callback`}),_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`,_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:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\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:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Read UTM params from the landing URL (persisted so they survive navigation).`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` captureUtms`}),_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:` var`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"oktivo_form_utms\"`}),_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:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` p`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` URLSearchParams`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`search`}),_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:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fresh`}),_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:` utmSource:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"utm_source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`||`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` undefined`}),_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:` utmMedium:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"utm_medium\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`||`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` undefined`}),_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:` utmCampaign:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"utm_campaign\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`||`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` undefined`}),_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\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` hasFresh`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fresh`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utmSource`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fresh`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utmMedium`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fresh`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utmCampaign`}),_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:` try`}),_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:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`hasFresh`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`localStorage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setItem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fresh`}),_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:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` hasFresh`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fresh`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`localStorage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getItem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`||`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_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:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fresh`}),_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`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getElementById`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"oktivo-lead-form\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addEventListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"submit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_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:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`preventDefault`}),_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:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` form`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`target`}),_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:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` utms`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` captureUtms`}),_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:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` metadata`}),_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:` source:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"website\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// drives Channel = Website`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` referrer:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`referrer`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` undefined`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// drives Source = Organic when no UTM`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` platform:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"web\"`}),_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\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utms`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utmSource`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`metadata`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utmSource`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` utms`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utmSource`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// drives Source = \u003cutm_source>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utms`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utmMedium`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`metadata`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utmMedium`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` utms`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utmMedium`}),_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:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utms`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utmCampaign`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`metadata`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utmCampaign`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` utms`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`utmCampaign`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Stitch prior anonymous browsing (incl. referrer) onto this lead.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`oktivo`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`oktivo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`getVisitorId`}),_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:` metadata`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`visitorId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`oktivo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getVisitorId`}),_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\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body`}),_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:` name:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`trim`}),_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:` phone:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`phone`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`trim`}),_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:` email:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`trim`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`||`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` undefined`}),_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:` metadata:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` metadata`}),_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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://client-backend.oktivo.com/api/v1/crm/leads\"`}),_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:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_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:` headers:`}),_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:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // NOTE: a browser-exposed token is capture-only. Scope it to lead`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // capture and rotate it regularly — anyone viewing source can read it.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bearer okt_your_token_here\"`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`r`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) { `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` r`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_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:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`success`}),_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:` form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`reset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // show your own \"thanks\" state here`})}),`\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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () { `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* show a retry message */`}),_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:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`A token placed in client-side HTML is visible to anyone who views the page\nsource. For public websites, prefer routing the form POST through your own\nbackend (or the bundled `,_jsx(_components.a,{href:`#5-forward-from-an-unauthenticated-webhook-optional`,children:`Cloudflare Worker`}),`)\nso the `,_jsx(_components.code,{children:`okt_`}),` token stays server-side. If you must call the API directly from\nthe browser, use a token scoped only to lead capture and rotate it on a\nschedule.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`what-this-produces`,children:`What this produces`}),`\n`,_jsxs(_components.p,{children:[`For a visitor who arrived at `,_jsx(_components.code,{children:`https://site.com/?utm_source=google\u0026utm_medium=cpc`}),`\nand submitted the form, the lead is created with:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Channel:`}),` `,_jsx(_components.code,{children:`Website`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Source:`}),` `,_jsx(_components.code,{children:`Google`})]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`For a visitor who arrived with no UTM but was referred from another site, the\nlead shows `,_jsx(_components.strong,{children:`Channel:`}),` `,_jsx(_components.code,{children:`Website`}),` and `,_jsx(_components.strong,{children:`Source:`}),` `,_jsx(_components.code,{children:`Organic`}),`. With neither, the\nSource is `,_jsx(_components.strong,{children:`Direct`}),`.`]}),`\n`,_jsxs(Heading,{level:`2`,id:`valid-metadata-source-values`,children:[`Valid `,_jsx(_components.code,{children:`metadata.source`}),` values`]}),`\n`,_jsxs(_components.p,{children:[`Send one of these exact strings so Channel/Source and the duplicate-merge rules\nstay reliable. An unrecognized value is stored as `,_jsx(_components.code,{children:`api`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Typical use`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`website`})}),_jsx(_components.td,{children:`A form on the customer’s own site`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`chatbot`})}),_jsx(_components.td,{children:`A website/app chatbot lead_creator`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`landing`})}),_jsx(_components.td,{children:`A hosted landing page / “try live call”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`whatsapp`})}),_jsx(_components.td,{children:`WhatsApp inbound`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`facebook_ad`})}),_jsx(_components.td,{children:`Meta (Facebook/Instagram) lead ads`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`google_ad`})}),_jsx(_components.td,{children:`Google Ads`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`google_form`})}),_jsx(_components.td,{children:`Google Forms capture`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`google_sheet`})}),_jsx(_components.td,{children:`Google Sheets import`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`campaign`})}),_jsx(_components.td,{children:`Outbound voice campaign upload`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`apollo`})}),_jsx(_components.td,{children:`Apollo.io enrichment / import`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ai_powered_lead`})}),_jsx(_components.td,{children:`Customer’s own AI lead-scoring engine`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`payment_page_drop`})}),_jsx(_components.td,{children:`Abandoned checkout / payment page`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`kalki_intake`})}),_jsx(_components.td,{children:`A bespoke per-customer intake form`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`manual`})}),_jsx(_components.td,{children:`Added by hand in the dashboard`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`csv_import`})}),_jsx(_components.td,{children:`Bulk CSV upload`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`api`})}),_jsx(_components.td,{children:`Generic programmatic push (default fallback)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`webhook`})}),_jsx(_components.td,{children:`Generic webhook ingestion`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`9-worked-examples-—-what-each-capture-path-produces`,children:`9. Worked examples — what each capture path produces`}),`\n`,_jsxs(_components.p,{children:[`Every capture path writes a few raw signals (`,_jsx(_components.code,{children:`metadata.source`}),`, `,_jsx(_components.code,{children:`metadata.platform`}),`,\n`,_jsx(_components.code,{children:`utm*`}),`, referrer, `,_jsx(_components.code,{children:`sourceHistory`}),`). Oktivo’s classifier folds those into the\n`,_jsx(_components.strong,{children:`Channel`}),`, `,_jsx(_components.strong,{children:`Source`}),`, and `,_jsx(_components.strong,{children:`Platform`}),` you see in the Leads table and the\nlead’s Details \u0026 attribution panel. The table below shows, for each real path,\nthe signals that arrive and the values the user ends up seeing.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Channel`}),` and `,_jsx(_components.strong,{children:`Source`}),` are always derived — no path sets them directly.\n`,_jsx(_components.strong,{children:`Platform`}),` is only non-null for Meta ad surfaces (Instagram/Facebook).`]})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`#`}),_jsx(_components.th,{children:`Capture path`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`metadata.source`})}),_jsx(_components.th,{children:`Key signals that arrive`}),_jsx(_components.th,{children:`→ Channel`}),_jsx(_components.th,{children:`→ Source`}),_jsx(_components.th,{children:`→ Platform`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`1`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Meta Lead Ad — Instagram`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`facebook_ad`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`platform: instagram`}),`, `,_jsx(_components.code,{children:`utmSource: instagram`}),`, `,_jsx(_components.code,{children:`metaPlatform: ig`}),`, `,_jsx(_components.code,{children:`sourceHistory[].channel: instagram`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Facebook`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Instagram`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Instagram`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`2`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Meta Lead Ad — Facebook`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`facebook_ad`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`platform: facebook`}),`, `,_jsx(_components.code,{children:`utmSource: facebook`}),`, `,_jsx(_components.code,{children:`metaPlatform: fb`}),`, `,_jsx(_components.code,{children:`sourceHistory[].channel: facebook`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Facebook`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Facebook`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Facebook`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`3`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Meta organic page form`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`facebook_ad`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`metaIsOrganic: true`}),`, `,_jsx(_components.code,{children:`utmMedium: organic_social`}),`, `,_jsx(_components.code,{children:`platform: facebook`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Facebook`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Facebook`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Facebook`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`4`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Google Lead Form / Ads`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`google_ad`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`platform: google`}),`, `,_jsx(_components.code,{children:`utmSource: google`}),`, `,_jsx(_components.code,{children:`utmMedium: cpc`}),`, `,_jsx(_components.code,{children:`sourceHistory[].channel: google`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Online Other`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Google`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`5`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Google Forms capture`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`google_form`})}),_jsxs(_components.td,{children:[`form answers in `,_jsx(_components.code,{children:`industryData`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Online Other`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`¹`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`6`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Google Sheet import`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`google_sheet`})}),_jsxs(_components.td,{children:[`row data in `,_jsx(_components.code,{children:`industryData`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Online Other`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`¹`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`7`}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Website form + UTM`}),` (Lead API, `,_jsx(_components.code,{children:`source: website`}),`)`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`website`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`utmSource: google`}),`, `,_jsx(_components.code,{children:`utmMedium: cpc`}),`, `,_jsx(_components.code,{children:`utmCampaign: spring`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Website`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Google`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`8`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Website form + referrer only`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`website`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`referrer: https://news.ycombinator.com/...`}),`, no UTM`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Website`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Organic`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`9`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Website form, direct`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`website`})}),_jsx(_components.td,{children:`no UTM, no referrer`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Website`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Direct`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`10`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Oktivo tracking script → stitched lead`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`website`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`visitorId`}),` links prior session’s `,_jsx(_components.code,{children:`referrer`}),`/UTMs onto the lead`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Website`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Google`}),` / `,_jsx(_components.code,{children:`Organic`}),` / `,_jsx(_components.code,{children:`Direct`}),`²`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`11`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Website chatbot (lead_creator)`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`chatbot`})}),_jsxs(_components.td,{children:[`chat-captured fields in `,_jsx(_components.code,{children:`industryData`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Website`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`¹`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`12`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Landing page “try live call”`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`landing`}),` (+ `,_jsx(_components.code,{children:`landingSource: live-call`}),`)`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`platform: web`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Inbound`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`¹`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`13`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Landing page form (no live-call)`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`landing`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`platform: web`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Website`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`¹`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`14`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`WhatsApp inbound`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`whatsapp`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`platform: whatsapp`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`WhatsApp`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`¹`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`15`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Outbound voice campaign upload`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`campaign`})}),_jsx(_components.td,{children:`contact row`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Outbound call`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`¹`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`16`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Apollo.io import / enrichment`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`apollo`})}),_jsxs(_components.td,{children:[`company/title/LinkedIn in `,_jsx(_components.code,{children:`industryData`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Online Other`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`¹`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`17`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`AI-scored lead (webhook)`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`ai_powered_lead`})}),_jsx(_components.td,{children:`course/lead-type bag`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Online Other`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`¹`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`18`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Abandoned checkout (webhook)`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`payment_page_drop`})}),_jsx(_components.td,{children:`cart/payment bag`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Website`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`¹`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`19`}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Kalki / bespoke intake form`}),` (JWT path)`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`kalki_intake`})}),_jsx(_components.td,{children:`rich custom-field bag`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Online Other`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`¹`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`20`}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Generic API push`}),` (no/unknown `,_jsx(_components.code,{children:`source`}),`)`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`api`}),` (fallback)`]}),_jsx(_components.td,{children:`whatever you send`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Online Other`}),`³`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`⁴`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`21`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Generic webhook`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`webhook`})}),_jsx(_components.td,{children:`mapped payload`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Online Other`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`¹`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`22`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Manual entry (dashboard)`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`manual`})}),_jsx(_components.td,{children:`typed by a rep`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Offline`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Direct`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`23`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`CSV bulk import`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`csv_import`})}),_jsx(_components.td,{children:`spreadsheet rows`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Offline`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Direct`}),`¹`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`null`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`24`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Cloudflare Worker proxy`})}),_jsx(_components.td,{children:`(whatever it forwards)`}),_jsxs(_components.td,{children:[`maps a plain webhook → Lead API body; `,_jsx(_components.code,{children:`source`}),` falls back to `,_jsx(_components.code,{children:`api`}),` unless the payload sets `,_jsx(_components.code,{children:`metadata.source`})]}),_jsxs(_components.td,{children:[`follows the forwarded `,_jsx(_components.code,{children:`source`})]}),_jsx(_components.td,{children:`follows the signals`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`null`}),`/Meta`]})]})]})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Footnotes`})}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Direct`}),` is the terminal default: the path carries no UTM and no referrer, so\nSource rules 2 and 3 don’t fire. If the same lead `,_jsx(_components.em,{children:`also`}),` carries a UTM or\nreferrer (e.g. a website form that passed them through), Source becomes that\nUTM’s `,_jsx(_components.code,{children:`utm_source`}),` or `,_jsx(_components.code,{children:`Organic`}),` instead.`]}),`\n`,_jsxs(_components.li,{children:[`The stitched Source depends on what the tracking script captured in the\nvisitor’s session: a UTM → that `,_jsx(_components.code,{children:`utm_source`}),`; a referrer only → `,_jsx(_components.code,{children:`Organic`}),`;\nneither → `,_jsx(_components.code,{children:`Direct`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`A generic `,_jsx(_components.code,{children:`api`}),` lead with any digital signal (UTM, referrer, email, click id)\nlands in `,_jsx(_components.strong,{children:`Online Other`}),`; with nothing digital at all it would be\n`,_jsx(_components.strong,{children:`Offline Other`}),`. In practice an API lead almost always has an email, so\n`,_jsx(_components.strong,{children:`Online Other`}),` is the usual result.`]}),`\n`,_jsxs(_components.li,{children:[`If you send `,_jsx(_components.code,{children:`utmSource`}),`/`,_jsx(_components.code,{children:`referrer`}),` alongside a generic `,_jsx(_components.code,{children:`api`}),` push, Source\nfollows those (UTM → `,_jsx(_components.code,{children:`utm_source`}),`, referrer → `,_jsx(_components.code,{children:`Organic`}),`) instead of `,_jsx(_components.code,{children:`Direct`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`reading-it-in-the-leads-table`,children:`Reading it in the Leads table`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.strong,{children:`Source column`}),` shows the derived Channel plus a platform badge where one\nexists, e.g. a Meta/Instagram lead reads `,_jsx(_components.strong,{children:`Facebook · Instagram`}),`, a Google\nlead reads `,_jsx(_components.strong,{children:`Online Other · Google`}),`, a plain website lead reads\n`,_jsx(_components.strong,{children:`Website · Direct`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`The lead’s `,_jsx(_components.strong,{children:`Details \u0026 attribution`}),` panel shows a `,_jsx(_components.strong,{children:`Channel`}),` row\n(e.g. `,_jsx(_components.code,{children:`Facebook (Instagram)`}),`) directly above a `,_jsx(_components.strong,{children:`Source`}),` row\n(e.g. `,_jsx(_components.code,{children:`Instagram`}),`). When a lead arrived from more than one source, the Source\nrow carries a `,_jsx(_components.code,{children:`+N`}),` badge that opens the full arrival journey.`]}),`\n`]})]})}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":"Capturing Leads via API","description":"Push leads into Oktivo CRM from forms, chatbots, ad platforms, and your own backend","href":"/guides/lead-capture"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"1. Create an API token","slug":"1-create-an-api-token","depth":2,"children":[]},{"title":"2. Send your first lead","slug":"2-send-your-first-lead","depth":2,"children":[]},{"title":"3. Attach your own fields","slug":"3-attach-your-own-fields","depth":2,"children":[]},{"title":"4. Let Oktivo de-duplicate for you","slug":"4-let-oktivo-de-duplicate-for-you","depth":2,"children":[]},{"title":"5. Forward from an unauthenticated webhook (optional)","slug":"5-forward-from-an-unauthenticated-webhook-optional","depth":2,"children":[]},{"title":"Common pitfalls","slug":"common-pitfalls","depth":2,"children":[]},{"title":"6. How Channel and Source are determined","slug":"6-how-channel-and-source-are-determined","depth":2,"children":[{"title":"Channel","slug":"channel","depth":3,"children":[]},{"title":"Source","slug":"source","depth":3,"children":[]}]},{"title":"7. Website tracking snippet (referrer + anonymous activity)","slug":"7-website-tracking-snippet-referrer-+-anonymous-activity","depth":2,"children":[]},{"title":"8. Complete website form example","slug":"8-complete-website-form-example","depth":2,"children":[{"title":"What this produces","slug":"what-this-produces","depth":3,"children":[]}]},{"title":"Valid metadata.source values","slug":"valid-metadata-source-values","depth":2,"children":[]},{"title":"9. Worked examples — what each capture path produces","slug":"9-worked-examples-—-what-each-capture-path-produces","depth":2,"children":[{"title":"Reading it in the Leads table","slug":"reading-it-in-the-leads-table","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"oktivo-stage-docs","siteName":"Oktivo Voice Platform","title":"Capturing Leads via API - Oktivo Voice Platform","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-17T10:08:20.806Z","originalFileLocation":"guides/lead-capture.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=\"Push leads into Oktivo CRM from forms, chatbots, ad platforms, and your own backend\">\u003cmeta data-mint-head name=\"application-name\" content=\"Oktivo Voice Platform\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/oktivo-stage-docs/PnhsQUrQRukt15PE/_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=\"/mintlify-assets/_mintlify/favicons/oktivo-stage-docs/PnhsQUrQRukt15PE/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/oktivo-stage-docs/PnhsQUrQRukt15PE/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/oktivo-stage-docs/PnhsQUrQRukt15PE/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/oktivo-stage-docs/PnhsQUrQRukt15PE/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/oktivo-stage-docs/PnhsQUrQRukt15PE/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/oktivo-stage-docs/PnhsQUrQRukt15PE/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/oktivo-stage-docs/PnhsQUrQRukt15PE/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/oktivo-stage-docs/PnhsQUrQRukt15PE/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Capturing Leads via API - Oktivo Voice Platform\">\u003cmeta data-mint-head property=\"og:description\" content=\"Push leads into Oktivo CRM from forms, chatbots, ad platforms, and your own backend\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Oktivo Voice Platform\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://stage-docs.oktivo.com/guides/lead-capture\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://oktivo-stage-docs.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Capturing+Leads+via+API\u0026amp;description=Push+leads+into+Oktivo+CRM+from+forms%2C+chatbots%2C+ad+platforms%2C+and+your+own+backend\u0026amp;theme=cfcb37cdab6bd5c33dbe394c\u0026amp;signature=88635ce7cad066b6baeeb1cf3132154c0cd1f141f6f50326c4f2cfe4dfe71e41\">\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=\"Capturing Leads via API - Oktivo Voice Platform\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Push leads into Oktivo CRM from forms, chatbots, ad platforms, and your own backend\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://oktivo-stage-docs.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Capturing+Leads+via+API\u0026amp;description=Push+leads+into+Oktivo+CRM+from+forms%2C+chatbots%2C+ad+platforms%2C+and+your+own+backend\u0026amp;theme=cfcb37cdab6bd5c33dbe394c\u0026amp;signature=88635ce7cad066b6baeeb1cf3132154c0cd1f141f6f50326c4f2cfe4dfe71e41\">\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=\"/mintlify-assets/_mintlify/favicons/oktivo-stage-docs/PnhsQUrQRukt15PE/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Oktivo Voice Platform\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366F1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://stage-docs.oktivo.com/guides/lead-capture\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/lead-capture.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://stage-docs.oktivo.com/#organization\",\"name\":\"Oktivo Voice Platform\",\"url\":\"https://stage-docs.oktivo.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/oktivo-stage-docs/c3bIROP6UAjDKw3o/logo/light.svg?fit=max\u0026auto=format\u0026n=c3bIROP6UAjDKw3o\u0026q=85\u0026s=1c98fac4d121323a27790697944c99b7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://stage-docs.oktivo.com#website\",\"name\":\"Oktivo Voice Platform\",\"url\":\"https://stage-docs.oktivo.com\",\"publisher\":{\"@id\":\"https://stage-docs.oktivo.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://stage-docs.oktivo.com/guides/lead-capture#webpage\",\"url\":\"https://stage-docs.oktivo.com/guides/lead-capture\",\"name\":\"Capturing Leads via API\",\"description\":\"Push leads into Oktivo CRM from forms, chatbots, ad platforms, and your own backend\",\"dateModified\":\"2026-11-17T10:08:20.806Z\",\"isPartOf\":{\"@id\":\"https://stage-docs.oktivo.com#website\"},\"breadcrumb\":{\"@id\":\"https://stage-docs.oktivo.com/guides/lead-capture#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://stage-docs.oktivo.com/guides/lead-capture#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://stage-docs.oktivo.com/guides/crm-integration\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Capturing Leads via API\",\"item\":\"https://stage-docs.oktivo.com/guides/lead-capture\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://stage-docs.oktivo.com/guides/lead-capture#article\",\"headline\":\"Capturing Leads via API\",\"name\":\"Capturing Leads via API\",\"description\":\"Push leads into Oktivo CRM from forms, chatbots, ad platforms, and your own backend\",\"url\":\"https://stage-docs.oktivo.com/guides/lead-capture\",\"mainEntityOfPage\":{\"@id\":\"https://stage-docs.oktivo.com/guides/lead-capture#webpage\"},\"dateModified\":\"2026-11-17T10:08:20.806Z\",\"publisher\":{\"@id\":\"https://stage-docs.oktivo.com/#organization\"},\"isPartOf\":{\"@id\":\"https://stage-docs.oktivo.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Oktivo Voice Platform\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Oktivo Voice Platform\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/lead-capture.md","siteName":"Oktivo Voice Platform","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"},{"title":"Authentication","href":"/authentication"}]},{"group":"Core Concepts","pages":[{"title":"Agents","href":"/concepts/agents"},{"title":"Campaigns","href":"/concepts/campaigns"},{"title":"Credits \u0026 Billing","href":"/concepts/credits"},{"title":"Webhooks","href":"/concepts/webhooks"}]},{"group":"Guides","pages":[{"title":"CRM Integration","description":"End-to-end guide for integrating Oktivo with your CRM","href":"/guides/crm-integration"},{"title":"Capturing Leads via API","href":"/guides/lead-capture"},{"title":"Retry Logic","description":"Configure automatic retries for failed or unanswered calls","href":"/guides/retry-logic"},{"title":"Webhook Filtering","href":"/guides/webhook-filtering"},{"title":"BYON Setup Guide","href":"/guides/byon-setup"}]},{"group":"Connectors","pages":[{"title":"Connectors Overview","href":"/connectors/overview"},{"title":"Panzo CRM","href":"/connectors/panzo"},{"title":"Yellow.ai","href":"/connectors/yellowai"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]}]},"basePath":"","title":"Capturing Leads via API - Oktivo Voice Platform","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-DevImLcx.js","DynamicMarkdown-BGHukeRM.js","zoom-image-lightbox-DQG3o8Eu.js","lightbox-handle-r17bVUz3.js"]}