Event tracking and custom events

Learn what type of data the Smartlook SDK records and how you can manage what data is recorded

Custom events is determined to track important moments in recordings. Custom events can contain additional information useful for analysis.

What you can track

Custom events will be displayed directly in recordings. Create your own events and Smartlook will track them for you. Events allow you to track user interactions other than clicks, page views (URL), and text inputs. With custom events, you can get creative and track pretty much everything you want.

Events - Chart for custom event quantification.Events - Chart for custom event quantification.

Events - Chart for custom event quantification.

Events - Breakdown for a custom event.Events - Breakdown for a custom event.

Events - Breakdown for a custom event.

Funnels - Custom events used in funnels. The chart displays how many visitors reached Step 2 after Step 1.Funnels - Custom events used in funnels. The chart displays how many visitors reached Step 2 after Step 1.

Funnels - Custom events used in funnels. The chart displays how many visitors reached Step 2 after Step 1.

The code you need to insert in your site has the following format in JavaScript. For more info check API Reference.

smartlook('track', eventName, properties)

📘

Please note that there is a slight delay between calling the API and sending any custom event to our servers.
It is not recommended to call the API right before page unload or page navigation event.

Examples

Interact with pop-up windows

You can configure an event that will fire when your user sees certain pop-up windows such as promotion alerts or upsell windows. Watch recordings to understand how your users are interacting with those pop-ups and get helpful insights to better engage your users.

// full example with your defined variables
const eventName = 'UserOpenUpsellWindow';
const properties = {
  "type": "SmallDiscLimit"
};
smartlook('track', eventName, properties);

Parameter properties is a variable. In case you need to display only a specific information about your user there is no need to use any other parameters in your custom event.

Have a look at this example where the user reached the app preset limit.

smartlook('track', 'UserLimitReached')