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: "adam@goodstuffinc.com"
});

To pass additional parameters, add them as params: {key: value}:

__ls("identify", { 
    name: "Adam McKenzie", 
    email: "adam@goodstuffinc.com",
    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:

Adding custom properties and identify users

You can also access custom properties directly from the session player. They are available in the right panel, under the “Properties” tab:

Adding custom properties and identify users

You can also use the user’s name, email address and custom parameters you passed as filters to search sessions matching your criteria:

Adding custom properties and identify users

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

Email

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.

Didn’t find an answer?

Try using the search engine or just contact us

hello@livesession.ioChat with us

Start using LiveSession for free now.

Free 14-day trial

No credit card required

Easy setup