Skip to main content

Track a transaction

The browser tracker exposes window.openrevenue.transaction(). Pass a stable name, and optionally an amount in major units with an ISO currency code.
checkout-success.ts

When to call it

Call transactions only after the payment, upgrade, or conversion has succeeded. The safest place is usually a success page or a client-side callback after your server confirms the purchase.
Do not call transaction tracking before payment confirmation. Otherwise abandoned checkouts can look like revenue.

Examples

success.tsx
checkout.ts
name-only.ts

Amounts vs payment providers

Tracker transactions store the event name, optional amount/currency, and visit context. They do not replace payment-provider webhooks — connect Stripe, Polar, or another provider with Revenue integrations for order-level attribution, refunds, and MRR-style reporting. Avoid double-counting the same sale in both places.
Tracker amounts show up on the project Events page and Goals → Events tab (and GET /events). Use Revenue integrations when you already have a payment provider for order-level attribution, refunds, and MRR-style reporting.