How to identfiy users and add custom properties

Sometimes you need to identify users on your website. LiveSession provides you with a method, which you can use to give an additional context to session replays.

If you want to identify your user by name or email, please add this JavaScript snippet after LiveSession installation tag:

__ls("identify", { name: "Adam McKenzie", email: ""})

You need to add values dynamically to these properties. This method should be used every page view (LiveSession tracking code doesn't add a cookie with these values). A recorded session would look like that on the session list in LiveSession:

There's also a way to define custom properties for each session. Please check the code below:

__ls("identify", { name: "Adam McKenzie", email: "", params: {hubspot_id: "101", plan: "premium" }})

The result would look like that in session replay player:

You can also filter sessions by custom properties to search specific users: