JavaScript SDK Reference

Complete method signature reference for @solvof/sdk-js.

Solvof.init()

Initializes the SDK. Must be called before any other method.

ParameterTypeRequiredDescription
apiKeystringYesYour project's Public API key.
optionsobjectYesConfiguration options (distinctId, debug).

Solvof.track()

Queues an event to be sent to Solvof.

ParameterTypeRequiredDescription
eventNamestringYesThe name of the event.
propertiesobjectNoOptional custom properties for the event.

Solvof.setUserProperties()

Updates the currently identified user's profile without sending an event.

ParameterTypeRequiredDescription
propertiesobjectYesA dictionary of key-value pairs to set on the user.

Solvof.increment()

Increments a numeric property on the user's profile.

ParameterTypeRequiredDescription
propertystringYesThe name of the numeric property.
amountnumberYesThe amount to increment by.