@elevio/kb-events / Exports
▸ 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.
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(languageId
: string | null): void
This will set the language id that articles + categories are currently displayed in.
Name | Type |
---|---|
languageId |
string | null |
Returns: void
Defined in: index.ts:105
▸ setUser(user
: User | null): void
This will set the user
Name | Type |
---|---|
user |
User | null |
Returns: void
Defined in: index.ts:97
▸ setup(options
: SetupOptions): void
Instantiates and configures the analytics sender.
Name | Type | Description |
---|---|---|
options |
SetupOptions | see [[Opts]] |
Returns: void
Defined in: index.ts:59
▸ track(event
: Events, opts?
: SendOptions): void
This is the thing that adds the event to the dispatch queue. This is non-blocking.
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