Revenue per visitor is revenue in a period divided by visitors in that same period. Unique visitors, sessions, and pageviews are different denominators, so the name has to say which one was used. The metric combines how often visits turn into revenue and how large each order is, but the formula is the ratio itself. It is not the conversion rate. Conversion rate divides conversions by visitors and does not include the revenue amount.
Formula
Revenue per visitor = revenue in the period / visitors in the period. Match the dates. Decide whether revenue is gross succeeded charges or net of refunds, and whether visitors are unique people, sessions, or pageviews. Revenue per session and revenue per pageview should be labeled as such.
| Denominator | Name to publish |
|---|---|
| Unique visitors | Revenue per visitor |
| Sessions | Revenue per session |
| Pageviews | Revenue per pageview |
| Conversions / visitors | Conversion rate, which is not revenue per visitor |
Worked example
Every figure in this example is hypothetical. It is not the public demo and not a customer account. In 30 days, succeeded charges total $4,500. The site recorded 3,000 unique visitors and 4,000 sessions.
- Revenue per unique visitor = 4,500 / 3,000 = $1.50.
- Revenue per session = 4,500 / 4,000 = $1.125.
- If 90 of those visitors paid, the visitor conversion rate is 90 / 3,000 = 3%. That 3% does not tell you the $1.50. You still need the revenue total.
How to compute it from Stripe
- Sum the numerator from Stripe. Succeeded charges or paid invoices in the window both work if you say which. Follow auto-pagination. Subtract amount_refunded when you want net revenue.
- Stripe does not count website visitors. Take the denominator from the analytics tracker for the same start and end, using the same timezone as the charge buckets.
- Divide. A live visitors-online count is not a period denominator.
- Use a measured visitor series. A series built by multiplying revenue by a constant is not a visitor count.
What Data Lighthouse shows
The signed-in overview cards are Revenue (7, 14, or 30 days), Avg daily revenue, Monthly recurring revenue, Annual recurring revenue, Revenue per visitor, Visitor conversion rate, and Visitors online. The Revenue per visitor card divides that revenue total by distinct visitors in the same window. Visitors are distinct visitor_id values on rows in dl_user_sessions whose first_seen falls in the window, for site id default unless the request passes another siteId. Pageviews are the pageview totals stored on those sessions and are shown beside the ratio. The Revenue vs. visitors chart plots those daily visitor counts next to daily succeeded charges. When Postgres is not connected, the card says so and the visitor line stays empty. The Revenue card sums charge.amount for every charge with status succeeded in the selected window, following Stripe auto-pagination, then converts minor units for the dashboard currency. The sum is gross cash collected in that window. It does not subtract amount_refunded. Charges in another currency are left out, because the dashboard assumes one currency. Average daily revenue is that total divided by the number of days. The percent change compares the window with the previous window of the same length.
Visitor conversion rate appears after Postgres customer tables are configured. It is the higher of distinct checkout_completed users and distinct customers with status paid, divided by distinct signed_in users in the window. Paid customers are rows in the template customers table, not subscribers in the connected Stripe account. Without those tables the card says Configure Drizzle. The rate is not divided by anonymous visitors. Visitors online is a live tracker count. It is not the denominator for revenue per visitor. The public demo does not call Stripe or Postgres. Revenue, visitors, monthly recurring revenue, and annual recurring revenue are a seeded sample. ARR in the sample is the sample MRR times 12. Each day's visitors are seeded on their own, separate from that day's revenue, and the chart subtitle labels the series as sample data. Checkout for the $59 template license uses Polar after GitHub sign-in. Stripe is the optional revenue source inside the dashboard you host, through STRIPE_SECRET_KEY. If that key is missing, the revenue API returns an error and the overview says it could not load Stripe revenue.
Questions
What is revenue per visitor?
Revenue per visitor is revenue in a period divided by visitors in that same period. Unique visitors, sessions, and pageviews are different denominators, so the label has to say which one was used. It is not the conversion rate, which divides conversions by visitors and does not include revenue.
How do you calculate revenue per visitor from Stripe?
Stripe can supply the numerator from succeeded charges or paid invoices, after you paginate and decide whether to subtract refunds. Stripe does not know your visitors. The denominator comes from the analytics tracker for the same dates. Hypothetical succeeded charges of $4,500 and 3,000 unique visitors produce $1.50 per visitor.
Does the template chart show revenue per visitor?
The revenue per visitor card divides succeeded charges for the selected window by distinct visitors stored in Postgres for the same dates. The chart plots those visitors. The public demo uses a seeded sample for both series. When Postgres is not connected, the card says so.
Related reading
- Next.js Stripe analytics dashboard template
- Public live demo
- Template checkout
- Average revenue per user (ARPU)
- Monthly recurring revenue (MRR)
- Churn rate