View Source Plausible.Stats.Goal.Revenue (Plausible v0.0.1)
Revenue specific functions for the stats scope
Summary
Functions
Preloads revenue currencies for a query.
Functions
Preloads revenue currencies for a query.
Assumptions and business logic:
- Goals are already filtered according to query filters and dimensions
- If there's a single currency involved, return map containing the default
- If there's a breakdown by event:goal we return all the relevant currencies as a map
- If filtering by multiple different currencies without event:goal breakdown empty map is returned
- If user has no access or preloading is not needed, empty map is returned
The resulting data structure is attached to a Query
and used below in format_revenue_metric/3
.