View Source Plausible.Stats.Util (Plausible v0.0.1)
Utilities for modifying stat results
Summary
Functions
Returns the common currency for the goal filters in a query. If there are no
goal filters, or multiple currencies, nil
is returned and revenue metrics
are dropped.
__internal_visits
is fetched when querying bounce rate and visit duration, as it
is needed to calculate these from imported data. This function removes that metric
from all entries in the results list.
Functions
@spec get_revenue_tracking_currency(Plausible.Site.t(), Plausible.Stats.Query.t(), [ atom() ]) :: {atom() | nil, [atom()]}
Returns the common currency for the goal filters in a query. If there are no
goal filters, or multiple currencies, nil
is returned and revenue metrics
are dropped.
Aggregating revenue data works only for same currency goals. If the query is filtered by goals with different currencies, for example, one USD and other EUR, revenue metrics are dropped.
__internal_visits
is fetched when querying bounce rate and visit duration, as it
is needed to calculate these from imported data. This function removes that metric
from all entries in the results list.