Revenue analytics is currently works best for:
- Small to medium-sized companies
- Companies with subscription models (mostly SaaS)
If you process more than 20,000 transactions per month, or your revenue comes primarily from one-off payments rather than recurring subscriptions, revenue analytics may feel less useful, slower, or provide less insight than expected.
Revenue analytics works by automatically transforming the data coming from your different revenue sources (Stripe or events) into a standardized set of managed views.
These views are automatically created once you add a revenue source.
These views are not exclusive to the revenue analytics dashboard: you can use them in other parts of PostHog where you'd be able to use views, more importantly the SQL editor.
There are 5 sets of views.
- For event sources they're named in the format
revenue_analytics.events.<event_name>.revenue_analytics_<view_type>
- For data warehouse sources they're created in the
<data_warehouse_source_name>.revenue_analytics_<view_type>
.
There's also a global revenue_analytics.all.<view_type>
view that contains aggregated data from all sources.
View types
Product
The product
view is a simple table containing the list of all products you have in your sources. For events this comes from the property you configure as the product ID, for data warehouse sources it's automatically inferred from the source.
Example view names assuming one data warehouse source and one event:
stripe.prod.revenue_analytics_product
revenue_analytics.events.product_purchased.revenue_analytics_product
revenue_analytics.all.revenue_analytics_product
Charge
The charge
view is a low-level table displaying all of the charges you've made. It does not aggregate data by any means and simply exposes the data we're collecting from your sources in standardized fashion. This table also handles converting the data from the original currency to your reporting currency.
You should prefer the revenue_item
view over the charge
view since it implements deferred revenue.
Example view names:
stripe.prod.revenue_analytics_charge
revenue_analytics.events.product_purchased.revenue_analytics_charge
revenue_analytics.all.revenue_analytics_charge
You can look at the table schema in the SQL editor.
Customer
The customer
view is a table containing the list of all customers you have in your sources. For events this is automatically inferred from the distinct_id
/$group_key
person/group connected to the event. For data warehouse sources it's automatically inferred from the source's own source of truth for customers.
Example view names:
stripe.prod.revenue_analytics_customer
revenue_analytics.events.product_purchased.revenue_analytics_customer
revenue_analytics.all.revenue_analytics_customer
You can look at the table schema in the SQL editor.
For data warehouse sources, you might wanna connect these customers to your persons
or groups
table in the revenue analytics settings to be able to track MRR/revenue for specific customers.
Subscription
The subscription
view is a table containing the list of all subscriptions you have in your sources. For events this will only be tracked once you've configured a subscription property. For data warehouse sources it's automatically inferred if you connect a subscription to your invoices.
Example view names:
stripe.prod.revenue_analytics_subscription
revenue_analytics.events.product_purchased.revenue_analytics_subscription
revenue_analytics.all.revenue_analytics_subscription
You can look at the table schema in the SQL editor.
Revenue Item
The revenue_item
view is a table containing the list of all revenue items you have in your sources. It applies deferred revenue and currency conversion to the data automatically.
This data is inferred automatically both from your events and data warehouse sources. For data warehouse sources we consider all of your invoices plus all of your invoiceless charges. You can omit invoiceless charges in the settings.
Example view names:
stripe.prod.revenue_analytics_revenue_item
revenue_analytics.events.product_purchased.revenue_analytics_revenue_item
revenue_analytics.all.revenue_analytics_revenue_item
You can look at the table schema in the SQL editor.