How to identify users and add custom properties?
If you identify users visiting your website in any way, you can pass that data to LiveSession. It will add another dimension to your research and provide you with valuable information about your visitor’s behavior. In LiveSession, you can define up to 50 custom properties for each session.
Users identification
The most common way to identify a user is to use their name or email address. You can use one or both strings, according to your needs:
__ls("identify", {
name: "Adam McKenzie",
email: "[email protected]"
});
To pass additional parameters, add them as params: {key: value}
:
__ls("identify", {
name: "Adam McKenzie",
email: "[email protected]",
params: {
account_id: "101",
plan: "premium"
}
});
Custom properties are available from the Starter plan up. If you’d like to add custom properties and you’re on a Micro plan, consider switching plans.
Sessions from identified users will be listed on the sessions list, along with their email addresses. From here, you will also be able to access all of the custom properties you passed to LiveSession:
You can also access custom properties directly from the session player. They are available in the right panel, under the “Properties” tab:
You can also use the user’s name, email address and custom parameters you passed as filters to search sessions matching your criteria:
Set custom properties without identifying users
You can pass custom properties to LiveSession without identifying your users. To do so, use the__ls("setCustomParams", data)
function. Here’s an example of the snippet you can use to update sessions’ parameters:
__ls("setCustomParams", {
params: {
order_id: "123-abc-def",
plan: "premium",
},
});
Custom Params Limitations
Name | Type | Maximum length | Details |
Name | String | 128 | Displays user names in app |
String | 128 | Displays user email | |
Params | JSON object | 50 items | Valid JSON object {param1: value, param2: value, ... } |
param.key | string | 64 | {key:value} |
param.value | string | 64 | {key:value} |
Rate limiting
Calls to Record Session API (rs.livesession.io) for __ls('identify')
are rate limited per-session to 5 requests per second and 10 request per minute. If these limits are exceeded, custom params won't be set.