GoodAnalytics.Core.Funnels (GoodAnalytics v0.1.1)

Copy Markdown View Source

Context for funnel definition CRUD and analysis.

Summary

Functions

Analyzes a funnel for the given time window.

Archives a funnel (soft delete).

Creates a funnel definition for a workspace.

Gets a funnel by ID.

Gets a funnel by ID, raising if not found.

Gets a funnel by ID scoped to a workspace. Raises if not found.

Lists non-archived funnels for a workspace, ordered by inserted_at desc.

Updates a non-archived funnel.

Functions

analyze(funnel, opts)

Analyzes a funnel for the given time window.

Returns {:ok, result} with per-step counts, conversion rates, and median time, or {:error, reason} when the query fails.

Options

  • :window_start - start of analysis window (required)
  • :window_end - end of analysis window (required)
  • :cohort_source_filter - optional source filter applied to step 1

archive_funnel(funnel)

Archives a funnel (soft delete).

archive_funnel(workspace_id, id)

create_funnel(workspace_id, attrs)

Creates a funnel definition for a workspace.

get_funnel(id)

Gets a funnel by ID.

get_funnel!(id)

Gets a funnel by ID, raising if not found.

get_funnel!(workspace_id, id)

Gets a funnel by ID scoped to a workspace. Raises if not found.

list_funnels(workspace_id, opts \\ [])

Lists non-archived funnels for a workspace, ordered by inserted_at desc.

update_funnel(funnel, attrs)

Updates a non-archived funnel.