Last updated: March 14, 2026
Use Custom Events
The Custom Events built-in view filters the event stream to events whose name does not start with browser. — in other words, all the events you have instrumented manually in your application code. Custom events let you track business-relevant actions alongside technical telemetry, so you can answer questions like "which features are actually being used?" and "did users complete this flow after the last deployment?"
A custom event records whatever you choose to name and attach to it. In the Dash0 OTel Demo application, for example, two custom events are instrumented out of the box:
| Event name | What it tracks |
|---|---|
product_added_to_cart | A user added a product to their shopping cart |
currency_switched | A user changed the display currency |
You can instrument any meaningful action: button clicks, form submissions, feature flag exposures, funnel steps, onboarding milestones, and so on.
Add Custom Events to an Application
Use the Dash0 Web SDK's event API to emit a custom event from your JavaScript code:
12345678import { trackEvent } from '@dash0/web-sdk';trackEvent('product_added_to_cart', {product_id: item.id,product_name: item.name,price: item.price,currency: selectedCurrency,});
The event name and any attributes you pass are immediately available in the Web Events explorer, and in the Custom Events built-in view.
Use Case: Analyse Feature Adoption
Group custom events by event.name to see the relative volume of different user actions.
In the Dash0 product itself, grouping click events by title reveals which keyboard shortcuts or UI buttons are used most frequently — and which newly shipped features have not been adopted yet.
Use Case: Combine Custom Events with Technical Telemetry
Because custom events live in the same event stream as browser.request and browser.web_vital events, you can filter to a time window around a specific custom event and immediately see the HTTP requests, page loads, and web vital scores that accompanied it.
This makes it straightforward to answer questions like "what was the page performance like for users who completed a purchase?"
Use Case: Use Custom Events in Alerts
Custom events can be used as the signal in Dash0 alerts.
For example, you can alert when the rate of product_added_to_cart events drops below a threshold — an early warning that a checkout flow may be broken — without waiting for explicit error reports.
