Skip to content

Commit

Permalink
Remove redundant Util call
Browse files Browse the repository at this point in the history
  • Loading branch information
macobo committed Jun 27, 2024
1 parent 16f6d9e commit bf85d05
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/plausible/stats/aggregate.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,10 @@ defmodule Plausible.Stats.Aggregate do

Query.trace(query, metrics)

query_with_metrics = %Plausible.Stats.Query{
query
| metrics: Util.maybe_add_visitors_metric(metrics)
}

q = Plausible.Stats.SQL.QueryBuilder.build(query_with_metrics, site)
q = Plausible.Stats.SQL.QueryBuilder.build(query, site)

time_on_page_task =
if :time_on_page in query_with_metrics.metrics do
if :time_on_page in query.metrics do
fn -> aggregate_time_on_page(site, query) end
else
fn -> %{} end
Expand Down

0 comments on commit bf85d05

Please sign in to comment.