> ## Documentation Index
> Fetch the complete documentation index at: https://tinyanalytics.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Revenue Analytics

> Measure client-event and Stripe revenue, refunds, average order value, paying sessions, orders, and acquisition sources in one report.

Revenue analytics ties money to your traffic. Send revenue with a [custom event](/docs/custom-event-tracking), connect [Stripe](/docs/stripe-revenue-analytics), or use both. tinyanalytics reports total and net revenue, refunds, average order value, paying sessions, orders, and acquisition breakdowns so you can see which traffic produces revenue.

## Choose a revenue source

<Tabs>
  <Tab title="Client events">
    Add `revenue` and `currency` to any custom event you already send. These are **reserved property names** — tinyanalytics recognizes them and treats the event as a sale:

    ```js theme={null}
    window.tinyanalytics.event('purchase', {
      revenue: 49.99,
      currency: 'USD'
    })
    ```

    <ParamField body="revenue" type="number | string">
      The amount in **major units** — dollars, euros, pounds — not cents. `49.99` means \$49.99, not 49 cents. It accepts a number or a numeric string, and must be positive.
    </ParamField>

    <ParamField body="currency" type="string">
      A **3-letter code** like `USD`, `EUR`, or `GBP` (case-insensitive).
    </ParamField>

    Only **custom events** carry client revenue. A pageview never does.

    <Note>
      Send one event per completed sale. Client revenue must be positive, so this source cannot represent refunds or negative adjustments.
    </Note>

    You can send the same event [from your server](/docs/api-reference/track-events-api) with an [API key](/docs/api-reference/api-authentication). This is useful when the true paid moment occurs on your backend.
  </Tab>

  <Tab title="Stripe">
    Connect Stripe with a restricted key to receive server-verified charges, refunds, and lost disputes through a webhook. No tracking-code change is required.

    Stripe revenue can be attributed through analytics IDs in Stripe metadata or, when you opt in, an email match to an already identified user. Collection starts when you connect; historical Stripe payments are not backfilled.

    [Connect Stripe revenue →](/docs/stripe-revenue-analytics)
  </Tab>
</Tabs>

## What does the Revenue report show?

Use the tabs at the top of the report to switch between **All**, **Client events**, and **Stripe**. The report includes these headline metrics:

| Metric               | What it means                                                     |
| -------------------- | ----------------------------------------------------------------- |
| **Total revenue**    | Gross positive revenue in the period, in your reporting currency. |
| **Net revenue**      | Gross revenue minus Stripe refunds and lost disputes.             |
| **Refunds**          | The amount subtracted by Stripe refunds and lost disputes.        |
| **Avg. order value** | Total revenue divided by the number of orders.                    |
| **Paying sessions**  | Distinct sessions that produced at least one revenue event.       |
| **Orders**           | The number of completed revenue-bearing purchases.                |

Below the metrics, a **revenue-over-time chart** shows the trend across your date range. A **Revenue by** table breaks revenue down across dimensions — channel, country, region, referrer, AI assistant, device, browser, operating system, and UTM tags.

<Tip>
  Revenue in the breakdown is credited to the **session's entry acquisition** — the source that first brought the visitor in. That means revenue-by-channel reconciles with sessions-by-channel: the channel that *won the visit* gets the credit for the sale, even if the purchase happened pages later.
</Tip>

<Warning>
  tinyanalytics does not deduplicate the same purchase across client events and Stripe. If both sources report it, the **All** tab counts it twice. Choose one source of truth or use the source-specific tabs.
</Warning>

## How does tinyanalytics convert currencies?

You can receive revenue in many currencies but read your reports in one. Set a **reporting currency** in your site's [general settings](/docs/analytics-site-settings) — the default is USD. Every amount is **stored in the currency it was sent in**, then converted to your reporting currency when a report is read.

Conversion uses built-in exchange rates for **22 major currencies** (USD, EUR, GBP, JPY, and the like), refreshed with each release. They're approximate, not a live foreign-exchange feed. A valid currency code that isn't in that set is stored and counted at a 1:1 rate rather than dropped, so no revenue ever goes missing. For exact multi-currency accounting, treat the reporting-currency total as a close estimate.

## Where else does revenue appear?

Client revenue events power more than the Revenue report:

* **[Goals](/docs/conversion-goal-tracking)** — a revenue goal sums the money behind a conversion, not just its count.
* **[Funnels](/docs/funnel-analytics)** — each step shows the revenue of the sessions that reached it.
* **[Experiments](/docs/ab-testing-analytics)** — compare revenue and revenue-per-visitor across variants, counting only purchases after a visitor was exposed.
* **[Alerts](/docs/analytics-alerts)** — get notified when revenue crosses a threshold you set.

These features currently read **client events only**; Stripe revenue is not included. Stripe data is available in the Revenue report and through [`scoped_stripe_revenue`](/docs/sql-analytics-query-builder#how-do-i-query-stripe-revenue).

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Should I send revenue in cents or dollars?">
    Send it in **major units** — dollars, euros, or pounds — not cents. In tinyanalytics, a `revenue` value of `49.99` means \$49.99, not 49 cents. The field accepts a number or a numeric string, and the amount must be positive.
  </Accordion>

  <Accordion title="Can I track refunds or negative revenue in tinyanalytics?">
    Yes, through the [Stripe integration](/docs/stripe-revenue-analytics). Stripe refunds and lost disputes subtract from net revenue. Client revenue events must remain positive and cannot represent refunds.
  </Accordion>

  <Accordion title="What happens if I send a currency tinyanalytics has no exchange rate for?">
    The revenue is stored and counted at a 1:1 rate rather than dropped, so no revenue goes missing. tinyanalytics has built-in rates for 22 major currencies (USD, EUR, GBP, JPY, and the like), refreshed with each release. For exact multi-currency accounting, treat the reporting-currency total as a close estimate.
  </Accordion>

  <Accordion title="Which marketing channel gets credit for a sale?">
    The **session's entry acquisition** — the source that first brought the visitor in. The channel that won the visit gets the credit, even if the purchase happened several pages later. This is why revenue-by-channel reconciles with sessions-by-channel.
  </Accordion>

  <Accordion title="Why is revenue counted twice on the All tab?">
    tinyanalytics does not deduplicate the same purchase across client events and Stripe. If both sources report it, **All** counts both records. Use the **Stripe** or **Client events** tab as your source of truth, or stop sending the duplicate client event.
  </Accordion>
</AccordionGroup>

## Related

<Columns cols={2}>
  <Card title="Track custom events" icon="hand-pointer" href="/docs/custom-event-tracking">
    The events that carry revenue.
  </Card>

  <Card title="Goals" icon="bullseye" href="/docs/conversion-goal-tracking">
    Turn a purchase into a revenue goal.
  </Card>

  <Card title="Funnels" icon="filter" href="/docs/funnel-analytics">
    See revenue at each step of a path.
  </Card>

  <Card title="Tracking API" icon="paper-plane" href="/docs/api-reference/track-events-api">
    Send revenue events from your server.
  </Card>

  <Card title="Connect Stripe" icon="credit-card" href="/docs/stripe-revenue-analytics">
    Receive verified payments and refunds.
  </Card>
</Columns>


## Related topics

- [Stripe Revenue Analytics Integration](/docs/stripe-revenue-analytics.md)
- [Analytics Metrics Glossary](/docs/resources/analytics-metrics-glossary.md)
- [Analytics Site Settings](/docs/analytics-site-settings.md)
