← Back

User Properties

It is possible to set custom user data that can be viewed inside the dashboard for each individual user.

Set user display name using JavaScript

The Splitbee JS library is exposed on the global window object called splitbee.

Use the splitbee.user.set() function to store data to a user.

splitbee.user.set({plan:"Enterprise", appVersion: '1.0.0'})
splitbee.user.set({displayName: "Anna"})
splitbee.user.set({email: "hello@splitbee.io"})

This function can be called at any time. It will overwrite all fields that are sent within the object.

Example of sending multiple calls

Nr.Event DataStored Data of User
1{plan:'Sandbox', appVersion: '1.0.0'}{plan:'Sandbox', appVersion: '1.0.0'}
2{appVersion: '1.1.0'}{plan:'Sandbox', appVersion: '1.1.0'}
3{name: 'Emily'}{plan:'Sandbox', appVersion: '1.1.0', name: 'Emily'}