How do the Custom Events work?

Custom Events are available via JS API. Learn how to use it.

Custom Event - what is it?

Custom events allow you to capture more data with every interaction your customers make with your website, according to your business needs. You decide how custom events are triggered (i.e., clicking a specific button or performing a set of predefined actions). Use Custom events as filters to search sessions that match your research criteria to make it more accurate.

How to pass Custom Event to LiveSession?

To pass Custom Events to LiveSession, call the __ls(“track”) function:

ls("track", "User Subscribed")

Where can I find Custom Events?

Custom Events are available on our filters list. You can find it under toggled search input.

LiveSession App - Custom Events

Choose one or more Custom Events you passed to LiveSession and use them as a search term. All of the events you sent will be listed on a filters list. If you don’t see your events, please ensure you sent at least one custom event using our API.

The value of a custom event will be identical to its name:

LiveSession App - Custom Events - Terms

You can pass up to 50 properties with every event to better understand your visitors’ behavior. Here’s an example of a code snippet:

__ls("track", "User Subscribed", {
  plan_str: "premium",
  seats_int: 1,
  total_float: 255.50,
  isPatron_bool: true

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 events and their properties will be available on the session player’s timeline, on the right side of the screen:

LiveSession App - Custom Events - Session Replay

If you want to send custom events, please refer to our technical documentation.

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