JavaScript SDK Reference
Complete method signature reference for @solvof/sdk-js.
Solvof.init()
Initializes the SDK. Must be called before any other method.
| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | Yes | Your project's Public API key. |
| options | object | Yes | Configuration options (distinctId, debug). |
Solvof.track()
Queues an event to be sent to Solvof.
| Parameter | Type | Required | Description |
|---|---|---|---|
| eventName | string | Yes | The name of the event. |
| properties | object | No | Optional custom properties for the event. |
Solvof.setUserProperties()
Updates the currently identified user's profile without sending an event.
| Parameter | Type | Required | Description |
|---|---|---|---|
| properties | object | Yes | A dictionary of key-value pairs to set on the user. |
Solvof.increment()
Increments a numeric property on the user's profile.
| Parameter | Type | Required | Description |
|---|---|---|---|
| property | string | Yes | The name of the numeric property. |
| amount | number | Yes | The amount to increment by. |