elevio-kb-events

@elevio/kb-events / Exports

@elevio/kb-events

Table of contents

Namespaces

Functions

Functions

sendNow

sendNow(eventArray: Events[], opts?: SendOptions): Promise<void>

This sends the events without using the batching q. It returns a promise so you can wait for it and will throw an error if it fails.

Parameters:

Name Type Description
eventArray Events[] -
opts? SendOptions allows you to “alter” the events before being sent

Returns: Promise<void>

Defined in: index.ts:127


setLanguageId

setLanguageId(languageId: string | null): void

This will set the language id that articles + categories are currently displayed in.

Parameters:

Name Type
languageId string | null

Returns: void

Defined in: index.ts:105


setUser

setUser(user: User | null): void

This will set the user

Parameters:

Name Type
user User | null

Returns: void

Defined in: index.ts:97


setup

setup(options: SetupOptions): void

Instantiates and configures the analytics sender.

Parameters:

Name Type Description
options SetupOptions see [[Opts]]

Returns: void

Defined in: index.ts:59


track

track(event: Events, opts?: SendOptions): void

This is the thing that adds the event to the dispatch queue. This is non-blocking.

Parameters:

Name Type Description
event Events the event to be sent.
opts? SendOptions allows you to “alter” the events before being sent

Returns: void

Defined in: index.ts:115