How to Track Revenue in Umami Analytics
Updated: September 2026
Tracking website traffic tells you how many people visit your site. Tracking revenue tells you what those visits are actually worth.
Umami Analytics includes built-in revenue tracking that lets you connect financial performance with website activity. With Revenue insights, you can measure the income generated by tracked events, understand which parts of your site contribute to revenue, evaluate ROI, and make better decisions about your marketing and conversion strategy.
Revenue tracking has been available in Umami since v2.14.0.
This guide explains how Umami revenue tracking works, how to configure it, and how to create a Revenue insight.
What Is Revenue Tracking in Umami?
Umami Revenue allows you to send financial information alongside an event that occurs on your website.
For example, when a customer completes a purchase, you can track an event such as:
umami.track('checkout-cart', {
revenue: 19.99,
currency: 'USD',
});
Umami can then aggregate the revenue and currency data over a selected time period and display it through a Revenue insight.
This gives you a way to connect what users do with how much money those actions generate.
Instead of looking only at pageviews, visitors, or conversions, you can investigate questions such as:
- How much revenue was generated during a particular period?
- Which tracked events generate the most revenue?
- Which pages or products are associated with revenue-generating behavior?
- How does revenue change over time?
- Which traffic and user behavior patterns are associated with higher revenue?
- Are changes to your website or marketing campaigns producing better financial results?
By combining revenue data with your existing analytics, you get a more complete picture of website performance.
How Umami Revenue Tracking Works
The Revenue insight works by aggregating two pieces of dynamic event data:
- Revenue — the financial value associated with the event.
- Currency — the currency in which that revenue is recorded.
Both values are passed when you track an event.
For example:
umami.track('checkout-cart', {
revenue: 19.99,
currency: 'USD',
});
In this example, the checkout-cart event records revenue of 19.99 in US dollars.
Umami uses the currency information when aggregating revenue data. If the supplied currency code is not recognized as a valid ISO 4217 currency code, the insight defaults to USD.
Before You Start
To collect revenue data, you need to track an event containing the revenue and currency properties.
There are two supported approaches:
- Tracker functions
- HTML data attributes
Choose the approach that best fits how your website is built.
For JavaScript-based applications, tracker functions are generally the most flexible option. For straightforward HTML elements, data attributes can be convenient because they allow you to add tracking directly to an element.
Option 1: Track Revenue With a Tracker Function
The tracker function approach allows you to send an event and its revenue information directly through Umami's JavaScript tracker.
Step 1: Choose the event you want to associate with revenue
First, determine which user action represents the revenue-generating event.
For example, you might want to track a completed checkout:
umami.track('checkout-cart', {
revenue: 19.99,
currency: 'USD',
});
Here:
checkout-cartis the event name.19.99is the revenue amount.USDidentifies the currency.
The event name should represent the action you are tracking in your application.
Step 2: Add the revenue value
Pass the financial amount using the revenue property:
{
revenue: 19.99
}
With tracker functions, the revenue value is supplied as a number.
For example:
umami.track('checkout-cart', {
revenue: 49.95,
currency: 'USD',
});
This records a revenue value of 49.95.
Step 3: Add the currency
Every revenue event should include the currency property:
currency: 'USD'
The currency should use an ISO 4217 currency code.
For example:
umami.track('checkout-cart', {
revenue: 19.99,
currency: 'USD',
});
The currency is required because Umami needs to know which currency the revenue value represents when aggregating the data.
Step 4: Track the event
Once the event includes both properties, send it using umami.track():
umami.track('checkout-cart', {
revenue: 19.99,
currency: 'USD',
});
Umami will receive the event together with the revenue and currency information.
How the tracker payload works
When you track an event, Umami includes its default properties in the payload.
The previous example is equivalent to:
umami.track(props => ({
...props,
name: 'checkout-cart',
data: {
revenue: 19.99,
currency: 'USD',
},
}));
This form can be useful when you need more control over the event payload.
Option 2: Track Revenue With Data Attributes
If you're working with standard HTML elements, you can also configure revenue tracking using Umami data attributes.
This can be useful when you want to attach tracking directly to an element without writing a separate JavaScript tracking function.
Step 1: Add the Umami event attribute
Start with the element you want to track and add:
data-umami-event="checkout-cart"
For example:
<button
id="checkout-button"
data-umami-event="checkout-cart"
>
Checkout
</button>
The value identifies the event that Umami should track.
Step 2: Add the revenue attribute
Add the revenue using:
data-umami-event-revenue="19.99"
The complete element becomes:
<button
id="checkout-button"
data-umami-event="checkout-cart"
data-umami-event-revenue="19.99"
>
Checkout
</button>
Important: When using data attributes, revenue must be passed as a string.
Step 3: Add the currency attribute
Finally, specify the currency:
data-umami-event-currency="USD"
The complete example is:
<button
id="checkout-button"
data-umami-event="checkout-cart"
data-umami-event-revenue="19.99"
data-umami-event-currency="USD"
>
Checkout
</button>
When the element is used, Umami can track the event along with its revenue and currency data.
Revenue Parameters
Revenue tracking relies on the following currency parameter:
| Parameter | Description |
|---|---|
| Currency | Required. The currency of the data being aggregated. |
The revenue value itself is supplied as dynamic event data, while the currency identifies the monetary unit associated with that data.
Using a recognized ISO 4217 currency code is important. If Umami does not recognize the supplied currency code, the Revenue insight defaults to USD.
Creating a Revenue Insight in Umami
Once your website is sending revenue events, you can create a Revenue insight to analyze the collected data.
The insight aggregates revenue and currency data across the time period you specify.
Step 1: Choose a currency
Start by creating or configuring a Revenue insight in your Umami dashboard.
The first step is to choose the currency you want the insight to use.
This determines the monetary unit in which the aggregated revenue data is presented.
If your tracked events contain multiple currencies, pay particular attention to the currency you select when analyzing the data. The currency associated with your revenue data is an important part of interpreting the resulting totals correctly.
Step 2: Run the insight
After selecting the currency, run the insight.
Umami will aggregate the available revenue data for the selected time period and present the resulting revenue information.
The exact result depends on the events your website has recorded, the revenue values attached to those events, the currencies used, and the time period being analyzed.
Example: Tracking a Purchase
Imagine that a customer completes a purchase worth $19.99.
Your application can send:
umami.track('checkout-cart', {
revenue: 19.99,
currency: 'USD',
});
Another customer completes a $49.99 purchase:
umami.track('checkout-cart', {
revenue: 49.99,
currency: 'USD',
});
A third customer makes a $29.99 purchase:
umami.track('checkout-cart', {
revenue: 29.99,
currency: 'USD',
});
These events provide Umami with the revenue and currency information it needs to aggregate the financial data.
The resulting Revenue insight can then be used to analyze the revenue generated during the selected period.
The important principle is that revenue is attached to an event. Umami isn't simply counting visitors and guessing what they're worth; your application explicitly sends the financial value associated with the tracked action.
Why Track Revenue in Umami?
Traditional web analytics can tell you whether your website is receiving traffic. Revenue tracking adds another layer: it helps you understand the financial outcome of that traffic.
Measure financial performance
Revenue data provides a direct way to evaluate financial performance over time.
You can compare different periods and determine whether revenue is increasing, decreasing, or remaining relatively stable.
Measure ROI
Revenue tracking can help connect website activity with business results.
When combined with traffic and behavioral data, revenue can provide useful context for evaluating whether campaigns, landing pages, or other website changes are contributing to financial outcomes.
Identify revenue-generating behavior
Not every visitor interaction has the same financial impact.
By attaching revenue to relevant events, you can investigate which actions are associated with income and use that information to prioritize improvements.
Understand customer behavior
Revenue data becomes more useful when considered alongside user behavior.
For example, traffic and engagement metrics can tell you how visitors interact with your website, while revenue data helps show the financial significance of those interactions.
Improve conversion rates
Revenue information can help identify opportunities to improve the customer journey.
Rather than optimizing solely for more traffic or more clicks, you can focus attention on actions and experiences that contribute to revenue.
Plan for future growth
Historical revenue data can help you understand performance trends and make more informed decisions about future growth.
Best Practices for Revenue Tracking
Track the meaningful revenue event
Choose an event that accurately represents the action you want to associate with revenue.
For an ecommerce workflow, this might be a completed checkout or another appropriate purchase-related event.
The goal is to make sure the event represents the financial outcome you're trying to measure.
Use accurate revenue values
The value passed to revenue should represent the amount you intend to analyze.
Incorrect values will naturally produce misleading revenue insights, so make sure your application passes the appropriate amount at the point where the event occurs.
Always provide the currency
Currency is a required part of revenue tracking.
For example:
{
revenue: 19.99,
currency: 'USD'
}
Using an appropriate ISO 4217 currency code helps ensure that Umami can interpret the currency correctly.
Be consistent
Use a consistent event structure throughout your website or application.
For example, if a particular purchase action is represented by checkout-cart, consistently use that event for the same type of revenue-generating action.
Consistency makes your analytics easier to understand and maintain.
Test your implementation
Before relying on Revenue insights for business decisions, verify that your events are being sent correctly.
Check that:
- The expected event is being tracked.
- The revenue value is correct.
- The currency is included.
- The currency code is recognized.
- The event appears in your analytics data.
- The Revenue insight produces the expected results.
A small tracking error can become a surprisingly large analytics headache later. Testing early is considerably cheaper than debugging a year's worth of questionable revenue data.
Troubleshooting Revenue Tracking
If your Revenue insight isn't showing the results you expect, review the event implementation first.
Check the event data
For tracker functions, verify that your event contains both:
revenue: 19.99,
currency: 'USD'
For data attributes, verify that the relevant attributes are present:
data-umami-event-revenue="19.99"
data-umami-event-currency="USD"
Remember that revenue must be passed as a string when using data attributes.
Check the currency code
Make sure the currency uses a recognized ISO 4217 code.
If Umami does not recognize the supplied currency code, the insight defaults to USD.
Check the selected time period
Revenue is aggregated over the specified time period. If you're looking at a period in which no matching revenue events occurred, the insight will not contain the revenue you expect.
Check that revenue is attached to the correct event
Make sure the event containing the revenue data is actually being triggered when the intended action occurs.
For example, if revenue is supposed to represent a completed purchase, verify that the tracking call happens when the purchase is successfully completed rather than at an earlier stage of the checkout process.
Frequently Asked Questions
What version of Umami supports Revenue?
Revenue tracking is available starting with Umami v2.14.0.
What data does the Revenue insight aggregate?
The Revenue insight aggregates Revenue and Currency data over a specified time period.
Is currency required?
Yes. Currency is required for the revenue data to be aggregated correctly.
Which currency format should I use?
Use an ISO 4217 currency code, such as USD.
If a currency code isn't recognized, Umami defaults the insight to USD.
Can I use data attributes to track revenue?
Yes. Umami supports revenue tracking through data attributes.
For example:
<button
data-umami-event="checkout-cart"
data-umami-event-revenue="19.99"
data-umami-event-currency="USD"
>
Checkout
</button>
When using this method, the revenue value must be provided as a string.
Can I use JavaScript instead?
Yes. Tracker functions provide a flexible way to send revenue data:
umami.track('checkout-cart', {
revenue: 19.99,
currency: 'USD',
});
With this approach, revenue is passed as a number.
Summary
Umami Revenue provides a way to connect website analytics with financial performance.
The basic workflow is:
- Choose the revenue-generating event you want to track.
- Send the revenue value with that event.
- Include the currency using a recognized ISO 4217 code.
- Verify that the event is being collected correctly.
- Create a Revenue insight.
- Choose the currency for the insight.
- Run the insight over the desired time period.
- Use the resulting data alongside traffic and behavioral metrics to understand performance and identify opportunities for improvement.
For JavaScript applications, you can use:
umami.track('checkout-cart', {
revenue: 19.99,
currency: 'USD',
});
For HTML elements, you can use:
<button
data-umami-event="checkout-cart"
data-umami-event-revenue="19.99"
data-umami-event-currency="USD"
>
Checkout
</button>
Once revenue tracking is configured, Umami can turn otherwise abstract analytics numbers into a much more useful business metric: how website activity relates to income.
Related reading
To track the events you'll attach revenue to, see our guide to How to Set Up Event Tracking in Umami Analytics.
To understand how behaviors connect to outcomes beyond aggregate numbers, explore Cohorts in Umami Analytics: How to Group Users and Understand Behavior Over Time and Umami Heatmaps: See How Visitors Really Use Your Website.
Get Started with Managed Umami
Ready to try Umami without the DevOps hassle? UmamiEngine provides fully managed Umami analytics with all the depth described above, including funnels, retention, journeys, attribution, and revenue insights. No servers, no databases, no maintenance, just privacy-first analytics in minutes. Get started today and take control of your analytics data.
Get fully managed Umami in minutes