Reference
Methods Reference

Methods reference

id

id: (userData: UserProps, doNotSendEvent?: boolean) => Promise

Sets a user and company data.


Param

TypeDescription

userData

UserProps

user and company data


doNotSendEvent?

boolean


if true (false by default), separate "id" event won't be sent to server


track

track: (typeName: string, payload?: EventPayload) => Promise

Sends a track event to server.


Param

TypeDescription

typeName

string

event name


payload?

EventPayload

event payloadx


group

group: (props: companyProps, doNotSendEvent?: boolean) => Promise

Send company attributes to server.


Param

TypeDescription

props

CompanyProps


Company event payload. The required fields are id, name, created_at.


doNotSendEvent?

boolean


if true (false by default), separate "id" event won't be sent to server


reset

reset: (resetAnonId?: boolean) => Promise

Reset the user and company data


Param

TypeDescription

resetAnonId?

boolean

Flush the anonymous id along with user and company data.