Skip to main content

Methods

flush()

Sends queued events now.

Parameters

{ keepalive: boolean }

Returns

IngestBatchResponse

identify()

Attaches the session to a customer. null at sign-out starts a new anonymous session and erases the old customer’s journeys. With Native Support, the conversation runtime sets the identity; another identity kind replaces the one it checks, so sends fail.

Parameters

SessionIdentity | null
required

journey()

Returns this tab’s open instance of the journey key, or starts one and reports started. Calling it again while the instance is open returns the same instance, across reloads and same-tab redirects. After succeed(), the next call starts a new instance. Journeys need a signed-in subject: initialIdentity, or a bound conversation. Without one, or with an invalid key or metadata, the handle is inert and instanceId is null.

Parameters

string
required
A token: a lowercase letter, then up to 38 lowercase letters, digits, or _.

Returns

JourneyHandle

journeyRefs()

The journeys a support conversation links to: open instances and those that succeeded in the last 10 minutes, newest activity first, at most 5. Each ref names the last step reported.

Returns

JourneyRef

onJourneyUpload()

Calls listener each time an upload carrying the current subject’s journey steps reaches Hinto, so a help offer read can follow at once. Returns a function that stops the calls. Optional: a capture client without it still works, and runtime.offers then notices new steps within 2 seconds.

Parameters

() => void
required

Returns

() => void

shutdown()

Stops capture at once. Events not yet sent are dropped, including a send in progress; await flush() first to send them.

track()

Records a custom event with redacted properties.

Parameters

string
required
Record<string, unknown>