Getting Started
Event tracking setup

Event tracking setup

Event tracking is a powerful feature that helps you get better insights into how your users interact with your website and product. Events are the actions that you want users to perform such as sign-up for a free trial, download a file, click on a link, or checkout on your e-commerce store etc.

For websites and e-commerce stores, events will help you track conversions, conversion rates, referrer sources, entry pages, and top pages that help users perform desired goals.

And for SaaS products, the first step in improving a product is to analyze users' behavior. Event tracking collects the information you require to comprehend how your product is used, perform analysis, and decide what improvements to make. Ideally, an event can be captured each time a user performs an action to help you better understand how your product is used.

Usermaven offers both auto-capture and custom events as two methods for event tracking. Both are covered in detail in this guide, which takes you through setting up events auto-capture, delving deeper into custom events, and then tailoring those events to capture the desired insights you want.

Auto-capture event tracking

Usermaven can capture all front-end events automatically if you have this option enabled in your tracking script. This feature makes it easy to start getting data such as clicks, input changes and form submits performed by users on your website, e-commerce store, and SaaS app.

Auto-capture saves you from the hassle of getting assistance from developers everytime you add or change something to your website and product.

What Auto-capture can or cannot track?

Usermaven's auto-capture technology grabs most of the frontend elements like clicks on button, link, image, div, span

  • Page view (will be captured even if auto-capture is turned off)
  • Click on elements such as button, link, image, div, span, icon, headings, etc.)
  • Change in an input, textarea, or select element
  • Form submission

Note that the above events will also be captured from pop-ups. But events that occur in an iframe are not tracked by Usermaven's auto-capture.

For security reasons, Usermaven is conservative regarding the input tags. In order to prevent passwords or other sensitive data from being collected, Usermaven's auto-capture will grab only the name, id, and class attributes from input tags.

Pinned events

This feature is one of the most important in making event tracking easy and powerful.

Pinned events represent the top actions and events to monitor, such as signups, purchases, button clicks, downloads, etc.

  • You can mark an individual item as a pinned event, for example, a button on a specific page.
  • You can group similar items as a pinned event, for example, a similar button that's present on different pages.

To learn more about pinned events with examples, check this detailed guide

Custom event tracking

While auto-capture is a great solution for most of Usermaven's users, we know that some of our users may have different needs, for example;

  • For some advanced scenarios such as sending events on a function call in your backend or third-party embedded content (chat windows, Youtube videos, order forms, etc.), custom event tracking will be required.
  • Auto-capture grabs large volumes of data, it can be overwhelming for some of you to manage that data. In this case, you may want to disable auto-capture and use custom event tracking. Although, we recommend keeping auto-capture active to track every event retroactively. You can use those event later at any stage.

A few examples of what you can use custom events for:

  • Events that occur in an iFrame - an embedded element that isn’t tracked by auto-capture, such as a payment form, chat component, or a YouTube video.
  • Events coming from a different site, such as a checkout process that ends on an external site.
  • Form submissions with no thank you page. While Usermaven tracks all clicks on the submitting button, you can use custom events to track successful form completion.

Custom events allow you to capture details from anywhere in the codebase whether it is a button press on the frontend or a class method call on the backend. This ensures correct and comprehensive data capture.

To send new custom events to Usermaven, you can utilize Usermaven's Javascript API. You or your developer can read more about it in this guide on sending custom events.

Last updated on February 2, 2023