Skip to main content
All CollectionsTracking code
Identify users and add custom properties
Identify users and add custom properties
Kamil avatar
Written by Kamil
Updated over a week ago

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.

To pass data to LiveSession, you have to install our tracking code first. You can learn how to do it in this guide.

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"
}});

Remember to update sample values. You have to trigger the function on every page view as we do not store custom properties’ values in any way.

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" }});

Remember to update sample values. You have to trigger the function on every page view as we do not store custom properties’ values in any way.

Custom Params Limitations

  1. Name (string)- max. 128 characters

  2. Email (string)- max. 128 characters

  3. Params (JSON object) max 50 items

  4. param.key (string) max. 64 characters

  5. param.value (string) max. 64 characters

Did this answer your question?