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.

Link to this section Summary

Link to this section Functions

Link to this function

create(site, name, steps)

View Source
@spec create(Plausible.Site.t(), String.t(), [map()]) ::
  {:ok, Plausible.Funnel.t()}
  | {:error, Ecto.Changeset.t() | :invalid_funnel_size}
Link to this function

create_changeset(site, name, steps)

View Source
@spec create_changeset(Plausible.Site.t(), String.t(), [map()]) :: Ecto.Changeset.t()
@spec delete(Plausible.Site.t(), pos_integer()) :: :ok
@spec enabled_for?(any()) :: boolean()
Link to this function

ephemeral_definition(site, name, steps)

View Source
@spec ephemeral_definition(Plausible.Site.t(), String.t(), [map()]) ::
  Plausible.Funnel.t()
@spec list(Plausible.Site.t()) :: [
  %{name: String.t(), id: pos_integer(), steps_count: pos_integer()}
]