Methods
Contributor Covenant Code of Conduct.
track
Sends a track event to server.
track: (typeName: string, payload?: EventPayload) => Promise
Param | Type | Description |
---|---|---|
typeName | string | event name |
payload? | EventPayload | event payload |
set
Sets a permanent properties that will be persisted across sessions. On every track()
call those properties will be merged with payload parameter.
set(properties: Record<string, any>, opts?: { eventType?: string, persist?: boolean })
Param | Type | Description |
---|---|---|
properties | Record<string, any> | set properties |
opts | { eventType?: string, persist?: boolean } | eventType - apply permanent properties to only certain event type (applied to all types by default)persist - persist properties across sessions (in cookies). True by default |
unset
Unsets a permanent properties added with set()
.
unset(propertyName: string, opts: { eventType?: string, persist?: boolean })
Param | Type | Description |
---|---|---|
propertyName | string | property to unset |
opts | { eventType?: string, persist?: boolean } | eventType - apply permanent properties to only certain event type (applied to all types by default)persist - persist properties across sessions (in cookies). True by default |