This is a Jitsu.Classic documentation. For the lastest version, please visit docs.jitsu.com. Read about differences here.

šŸ“œ Configuration

Configuration UI

šŸ‘©ā€šŸ”¬ Extending Jitsu

Overview
Destination Extensions
Source Extensions
API Specs

Jitsu Internals

Jitsu Server

Methods Reference

id

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

Sets a user data.

ParamTypeDescription
userDataUserPropsuser data
doNotSendEvent?booleanif 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.

ParamTypeDescription
typeNamestringevent name
payload?EventPayloadevent payload


rawTrack

rawTrack: (payload: any) => Promise

Similar to track, but send unstructured payload to EventNative processing pipeline. No additional detection (user-agent, url and so on will be done). No payload structure is enforced.

ParamTypeDescription
payloadanyevent payload


set

set(properties: Record<string, any>, opts?: { eventType?: string, persist?: boolean })

Sets a permanent properties that will be persisted across sessions. On every track() call those properties will be merged with payload parameter

ParamTypeDescription
propertiesRecord<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

unset(propertyName: string, opts: { eventType?: string, persist?: boolean })

Unsets a permanent properties added with set()

ParamTypeDescription
propertyNamestringproperty 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


interceptAnalytics

interceptAnalytics: (analytics: any) => void

Explicit call for intercepting Segment's analytics.

ParamTypeDescription
analyticsanywindow.analytics object