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

Functions

Link to this function

allow(site, prop_or_props)

View Source
@spec allow(Plausible.Site.t(), [prop()] | prop()) ::
  {:ok, Plausible.Site.t()} | {:error, Ecto.Changeset.t()}
Link to this function

allow_changeset(site, prop_or_props)

View Source
Link to this function

allow_existing_props(site)

View Source
@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()}
Link to this function

suggest_keys_to_allow(site, limit \\ 300)

View Source
@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.