View Source Plausible.Funnels (Plausible v0.0.1)
This module implements contextual Funnel interface, allowing listing, creating and deleting funnel definitions.
For brief explanation of what a Funnel is, please see Plausible.Funnel
schema.
See Plausible.Stats.Funnel
for the evaluation logic.
Summary
Functions
@spec create(Plausible.Site.t(), String.t(), [map()]) :: {:ok, Plausible.Funnel.t()} | {:error, Ecto.Changeset.t() | :invalid_funnel_size | :upgrade_required}
@spec create_changeset(Plausible.Site.t(), String.t(), [map()]) :: Ecto.Changeset.t()
@spec delete(Plausible.Site.t() | pos_integer(), pos_integer()) :: :ok
@spec edit_changeset(Plausible.Funnel.t(), String.t(), [map()]) :: Ecto.Changeset.t()
@spec ephemeral_definition(Plausible.Site.t(), String.t(), [map()]) :: Plausible.Funnel.t()
@spec get(Plausible.Site.t() | pos_integer(), pos_integer() | String.t()) :: Plausible.Funnel.t() | nil
@spec list(Plausible.Site.t()) :: [ %{name: String.t(), id: pos_integer(), steps_count: pos_integer()} ]
@spec update(Plausible.Funnel.t(), String.t(), [map()]) :: {:ok, Plausible.Funnel.t()} | {:error, Ecto.Changeset.t() | :invalid_funnel_size | :upgrade_required}
@spec with_goals_query(Plausible.Site.t()) :: Ecto.Query.t()