View Source Plausible.Props (Plausible v0.0.1)
Context module for handling custom event props.
Summary
Functions
Allows the 300 most frequent props keys for a specific site over the past 6 months.
Queries the events table to fetch the 300 most frequent prop keys for a specific site over the past 6 months, excluding keys that are already allowed.
Types
@type prop() :: String.t()
Functions
@spec allow(Plausible.Site.t(), [prop()] | prop()) :: {:ok, Plausible.Site.t()} | {:error, Ecto.Changeset.t()}
@spec allow_existing_props(Plausible.Site.t()) :: {:ok, Plausible.Site.t()}
Allows the 300 most frequent props keys for a specific site over the past 6 months.
@spec disallow(Plausible.Site.t(), prop()) :: {:ok, Plausible.Site.t()} | {:error, Ecto.Changeset.t()}
@spec suggest_keys_to_allow(Plausible.Site.t(), non_neg_integer()) :: [String.t()]
Queries the events table to fetch the 300 most frequent prop keys for a specific site over the past 6 months, excluding keys that are already allowed.