Tracking

Event data

Available since v2.0.0

Event data lets you attach custom properties to your tracked events for deeper analysis. For example, you can track which product was purchased, what button variant was clicked, or any other contextual information relevant to your events.

Umami allows you to attach dynamic data to your events using two methods:

  • Data attributes - Add data-umami-event-* attributes directly to HTML elements. Values are always stored as strings.
  • Tracker functions - Use umami.track() with a data object. Supports strings, numbers, booleans, arrays, and objects.

Examples#

Track a button click with product details using data attributes:

Or using the tracker function:

Accessing event data#

Navigate to Websites and click on the View button.

You can access event data by clicking on the Event data button from the top nav.

Event data is displayed as a breakdown of each property name and its values, along with the total count for each value. Use this to understand how your custom data is distributed across events.