We raised €3M to grow your revenue on autopilot. Read the announcement
  • Sign in
  • Try for free

Docs

Quick startAPI referenceSupported languagesTracking eventsFramework examples

Tracking events

Subscribe to SDK events (session starts, user messages, captured fields, and action clicks) for your analytics.

The SDK emits events you can subscribe to for analytics. You need the embed.js script from the quick start on the page.

window.handhold only exists once embed.js has executed, so attach listeners from the script's load event (or any code that is guaranteed to run after it):

<script
  async
  src="https://handhold.io/demo/embed.js"
  onload="window.handhold.addEventListener('onusermessage', (data) => console.log(data))"
></script>

Unsubscribe with window.handhold.removeEventListener('onusermessage', handler). Attaching from React or Vue components is shown in the framework examples.

Events

Event nameDescriptionPayload
onusermessageUser sends a message via the input{ event, agentId, sessionId }
oncloseUser closes the demo overlay{ event, agentId, sessionId? }
onfieldvaluesetA discovery field value is captured{ event, agentId, sessionId, field: { id, name, type }, value }
onnudgeactionUser clicks a nudge action{ event, agentId, sessionId?, actionId, label? }
onsessionstartedA session starts{ event, agentId, sessionId, qualificationFieldPresets? }
onsessionfinishedAI agent completes the session{ event, agentId, sessionId }
onactionclickUser clicks an action button (e.g. CTA on the finished screen){ event, agentId, sessionId, actionId, label }

For AI agents: a clean Markdown version is available at /docs/events.md.

Handhold (“Handhold”) provides technology and AI-powered agents designed to help businesses engage visitors, qualify inbound leads, deliver personalized product experiences, and guide users through onboarding. Handhold is a software platform and does not provide sales, marketing, legal, or advisory services.

Any customer interactions, product information, or recommendations generated through Handhold agents are based on the configuration and data provided by the customer. Handhold does not control, verify, or guarantee the accuracy, completeness, or suitability of any information presented through its platform. By using this website or the Handhold platform, you acknowledge that all content is provided for informational and operational purposes only and agree to our Terms of Use and Privacy Policy.

Handhold

Sign inContact usCareers

Legal

Privacy policyCookie policyResponsible disclosure