You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v4.8.0 — PostgreSQL support & configurable DB connection
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
PostgreSQL compatibility: boolean columns (is_new_visitor, is_new_page_visit) were compared with = 1/= 0 in raw SQL — MySQL/MariaDB/SQLite accept this, Postgres does not. Fixed with portable CASE WHEN column THEN 1 ELSE 0 END syntax.
PostgreSQL: division by zero on bounce_rate in getTopPages() when no row has is_new_page_visit = true. Protected with NULLIF.
Heatmap: missing pgsql branch was falling through to MySQL-only HOUR()/DAYOFWEEK() functions. Fixed with EXTRACT() for Postgres.
Added
Configurable database connection via statamic-analytics.database_connection (env: ANALYTICS_DB_CONNECTION). Defaults to null (no behavior change for existing installs). Useful when analytics data must live on a specific connection regardless of the app default.