Centralized path helpers for the Web Analytics module.
Every link, redirect, and beacon URL goes through
PhoenixKit.Utils.Routes.path/1 so the host's PhoenixKit URL prefix and
locale are applied. Never hardcode these paths — a host that mounts
PhoenixKit at /backend instead of /admin would break every one of them.
Summary
Functions
The beacon endpoint that accepts custom events (POST).
Overview dashboard — totals, trend, and the top breakdowns.
A dashboard URL carrying report filters as query parameters.
Custom events report and the live hit feed.
Pages report — every path, ranked.
A pages-report URL carrying report filters.
The tracking-pixel endpoint (GET), optionally with a cache-busting value.
Settings page for the module.
Acquisition report — referrers, sources, and UTM campaigns.
Technology report — browsers, operating systems, devices, countries.
Functions
@spec beacon_endpoint() :: String.t()
The beacon endpoint that accepts custom events (POST).
@spec dashboard() :: String.t()
Overview dashboard — totals, trend, and the top breakdowns.
A dashboard URL carrying report filters as query parameters.
iex> is_binary(PhoenixKitWebAnalytics.Paths.dashboard(%{"period" => "7d"}))
true
@spec events() :: String.t()
Custom events report and the live hit feed.
@spec pages() :: String.t()
Pages report — every path, ranked.
A pages-report URL carrying report filters.
The tracking-pixel endpoint (GET), optionally with a cache-busting value.
@spec settings() :: String.t()
Settings page for the module.
@spec sources() :: String.t()
Acquisition report — referrers, sources, and UTM campaigns.
@spec technology() :: String.t()
Technology report — browsers, operating systems, devices, countries.