mirror of
https://github.com/plausible/analytics.git
synced 2024-12-24 10:02:10 +03:00
Add search_query to internal props (#4390)
This commit is contained in:
parent
28cf3ff2b2
commit
590785794f
@ -16,7 +16,7 @@ defmodule Plausible.Props do
|
||||
@max_prop_value_length 2000
|
||||
def max_prop_value_length, do: @max_prop_value_length
|
||||
|
||||
@internal_keys ~w(url path)
|
||||
@internal_keys ~w(url path search_query)
|
||||
@doc """
|
||||
Lists prop keys used internally.
|
||||
|
||||
|
@ -269,10 +269,15 @@ defmodule Plausible.PropsTest do
|
||||
name: "404",
|
||||
"meta.key": ["path", "with_error"],
|
||||
"meta.value": ["/i-dont-exist", "true"]
|
||||
),
|
||||
build(:event,
|
||||
name: "WP Search Queries",
|
||||
"meta.key": ["search_query", "result_count"],
|
||||
"meta.value": ["something", "12"]
|
||||
)
|
||||
])
|
||||
|
||||
assert ["first_time_customer", "logged_in", "with_error"] ==
|
||||
assert ["first_time_customer", "logged_in", "result_count", "with_error"] ==
|
||||
site |> Plausible.Props.suggest_keys_to_allow() |> Enum.sort()
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user