# Revenue

An event can carry what it was worth, and the dashboard shows each goal’s revenue beside its conversions.

Revenue is sent with an [event](https://fiveb.ar/docs/events.md), so any event can carry it, and every goal it reaches shows what it brought in.

## Sending revenue

Send an event’s revenue and currency with it, from a script:

```
tally('Purchase', { revenue: 19.99, currency: 'GBP' });
```

Or on anything that can be clicked:

```
<button data-tally="Purchase" data-tally-revenue="19.99" data-tally-currency="GBP">Buy</button>
```

- Revenue is a number, or a number as text such as `"19.99"`, above nothing, and up to a billion. It’s rounded to the currency’s smallest unit, so pence for pounds and whole yen for yen.
- Currency is a three-letter code, such as `GBP`, `USD` or `EUR`, in any case.
- An event sent without both, or with an amount of nothing or less, is still counted, with no revenue. Neither is kept as the event’s [data](https://fiveb.ar/docs/events.md#data).
- Revenue is money taken. A refund is never counted, so don’t send one.

## Subscriptions

A subscription’s payments are sent as they’re taken: the first when someone signs up, if they pay then rather than after a trial, and each renewal after it from your server as a [server event](https://fiveb.ar/docs/server-events.md), such as `Renewal`. Add `revenueinterval` to the data with `day`, `week`, `month` or `year` to tell plans apart:

```
tally('Purchase', { revenue: 9, currency: 'GBP', revenueinterval: 'month' });
```

## On the dashboard

The dashboard shows revenue once a site has sent some, beside each goal’s conversions, and a goal’s own dashboard shows its revenue, its average order and its revenue from every source, page and place. Click Revenue to chart it by day. A site’s revenue is shown in one currency, its account’s billing currency to begin with, and revenue sent in another is converted at that day’s rate, from Exchange Rate API. Change the currency, or hide revenue from the dashboard while it’s still counted, under Goals in the site’s settings. The [API](https://fiveb.ar/docs/api.md) and apps connected over [MCP](https://fiveb.ar/docs/mcp.md) give revenue too.

---

fivebar is web analytics without cookies, at https://fiveb.ar. Every page of its docs is listed at https://fiveb.ar/docs/index.md.
