All notable changes to this project are documented here. This project follows Semantic Versioning.
[0.2.0] - 2026-08-10
Changed
⚠️ Requires
phoenix_kit ~> 2.0. The core pin moved to~> 2.0, so this release no longer resolves against core 1.7.Core 2.0.0 squashes the migration chain into a single
V135baseline and makes V135 the chain's floor:mix ecto.migratenow refuses on a database below it rather than migrating. Checkmix phoenix_kit.statusbefore upgrading. A host below V135 must installphoenix_kit 1.7.236— the migration bridge, the last release carrying the full pre-squash chain — migrate until the reported version is at least V135, and only then move to 2.0.This package does not call migration internals, so the change is the pin itself.
Fixed
- This is the first release of this package to actually reach Hex. Its
package
files:list named aprivdirectory that does not exist, andmix hex.buildrefuses to build a package whose declared files are missing ("Missing files: priv") — so every publish attempt had failed before reaching the registry. The entry is dropped; add it back ifpriv/ever gains content. - The dashboard no longer fails to compile against core 2.0. Core 2.0 added
PhoenixKitWeb.Components.Core.Chart.bar_chart/1, which every LiveView imports viause PhoenixKitWeb, :live_view. That collided with this package's own same-aritybar_chart/1, making the unqualified call in the dashboard ambiguous and failing the build. The local component is renamedtraffic_chart/1; core's is a generic SVG chart keyed onid/data, while this one is bucket-aware and takesseries/metric/bucket, so they are not interchangeable and the local one is kept. Rendered output is unchanged. Callers usingPhoenixKitWebAnalytics.Web.Components.bar_chart/1directly must rename the call.
0.1.0 - 2026-07-26
Initial release.
Collection
PhoenixKitWebAnalytics.Plug— server-side page view tracking. One line in the host's:browserpipeline; nothing is added to rendered pages. Writes happen in a supervised task after the response is sent, with amax_childrencap that drops rather than queues under load.PhoenixKitWebAnalytics.LiveHook— anon_mounthook that counts LiveViewpush_patch/push_navigatenavigation. Stays inert unless the endpoint socket exposes:peer_dataand:user_agent, rather than recording hits under a mismatched visitor hash.- Cookieless visitor identification: a daily-rotating salted SHA-256 of IP + User-Agent, truncated to 32 hex characters. No IP is stored.
- Server-side session stitching on an inactivity window (30 minutes by default) — no session cookie.
- Built-in User-Agent classification (browser, OS, device class, bot detection) and referrer classification into channels, with no external dependency or IP database.
- Campaign parameters (
utm_*) are extracted into their own columns; the rest of the query string is never stored. - Skips non-
GETrequests, non-2xx and non-HTML responses, excluded paths,DNT/Sec-GPCopt-outs, and bots. - Optional public collection endpoints, off by default: a ~300-byte inline
beacon snippet for browser-side custom events and a 1×1 pixel for
CDN-cached pages.
PhoenixKitWebAnalytics.Web.BeaconPayloadenforces the trust boundary — a payload controls content, never identity or origin. PhoenixKitWebAnalytics.track_event/2for server-side custom events.PhoenixKitWebAnalytics.Geobehaviour for optional country resolution, plus automatic use of CDN country headers (Cloudflare, Vercel, Fastly) when present.
Reports
PhoenixKitWebAnalytics.Reports— overview totals with period-over-period comparison, trend series (hour / day / month buckets), top pages, slowest pages by response time, referrers, channels, UTM campaigns and sources, browsers, operating systems, devices, countries, languages, custom events, a recent-hits feed, and live visitor count.- Six admin pages: Overview, Pages, Acquisition, Technology, Events, Settings. Charts are CSS-only — no charting library ships with this package.
- Period and site filters live in the URL, so a filtered report can be bookmarked and shared.
Storage
- Module-owned versioned migrations (
PhoenixKitWebAnalytics.Migrations), applied bymix phoenix_kit.update, withCOMMENT ON TABLEversion tracking and full--prefix(named-schema) support. phoenix_kit_web_analytics_events(append-only hits) andphoenix_kit_web_analytics_daily_stats(per-day, per-site rollups), both with UUIDv7 primary keys.PhoenixKitWebAnalytics.Retention— hourly rollup of completed days and batched pruning of raw events past the retention window (365 days by default). Pruning never runs ahead of the rollup that preserves the trend line;daily_timeseries/1falls back to rollups for pruned days.