mirror of
https://github.com/plausible/analytics.git
synced 2024-12-25 02:24:55 +03:00
Filter for pageviews when no other filter is specified in base.ex
This commit is contained in:
parent
669866a16b
commit
2f98da8f3a
@ -56,9 +56,17 @@ defmodule Plausible.Stats.Base do
|
||||
|
||||
q =
|
||||
case query.filters["event:name"] do
|
||||
{:is, name} -> from(e in q, where: e.name == ^name)
|
||||
{:member, list} -> from(e in q, where: e.name in ^list)
|
||||
nil -> q
|
||||
{:is, name} ->
|
||||
from(e in q, where: e.name == ^name)
|
||||
|
||||
{:member, list} ->
|
||||
from(e in q, where: e.name in ^list)
|
||||
|
||||
# Logically, this isn't necessary and might even cause some confusion (request with no filters will still filter for event:name==pageviews).
|
||||
nil ->
|
||||
from(e in q, where: e.name == "pageview")
|
||||
|
||||
# When removing this, however, sampling in clickhouse goes a bit weird (dashboard with 3m pageviews will start getting sampled which is weird)
|
||||
end
|
||||
|
||||
q =
|
||||
|
Loading…
Reference in New Issue
Block a user