We now offer free concierge setup for all new accounts. Learn more

Client-Side Tracking

In addition to server-side tracking, Userlist also allows client-side tracking — via the same tracking script that powers in-app messages. See this article on how to include a JavaScript snippet in your application's layout for signed-in users.

The same tracking script allows you to update the user's properties and to track custom events in the client's browser.

Please ensure that these calls are made after the included tracking script, either by placing these calls below the script tags in your HTML or by using the page load event to delay execution.

Sending Users

The tracking script exposes a global userlist function that receives a method name and a list of arguments. To update user properties, please use the identify method, followed by a object of properties. Please see the integration guide for a list of available properties.

1
2
3
4
5
6
7
userlist('identify', {
  email: 'foo@example.com',
  properties: {
    first_name: 'Foo',
    last_name: 'Example'
  }
});

Sending Events

In order to track custom events, use the track method name and pass the event name as a second argument. Optionally, you can pass additional properties of the event as a third argument.

1
2
3
4
5
// Track a custom event
userlist('track', 'project_created');

// Track a custom event with event properties
userlist('track', 'project_created', { name: 'Example project' });

Get started today

Get Userlist for your own SaaS product. Free 14-day trial included.