Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Fix missing 'pageviews' column from 'pages.csv' (#1988)
Sasha Fonsecadb3a852f2657
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 55d2e2ed8a..25762b769e 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -33,6 +33,7 @@ All notable changes to this project will be documented in this file.- Guests can now use the favicon to toggle additional info about the site bing viewed (such as in public embeds).- Fix SecurityError in tracking script when user has blocked all local storage- Prevent dashboard graph from being selected when long pressing on the graph in a mobile browser+- The exported `pages.csv` file now includes pageviews again [plausible/analytics#1878](https://github.com/plausible/analytics/issues/1878)### Changed- Cache the tracking script for 24 hoursdiff --git a/lib/plausible_web/controllers/api/stats_controller.ex b/lib/plausible_web/controllers/api/stats_controller.exindex 429854dd62..e588ebb303 100644--- a/lib/plausible_web/controllers/api/stats_controller.ex+++ b/lib/plausible_web/controllers/api/stats_controller.ex@@ -475,7 +475,7 @@ defmodule PlausibleWeb.Api.StatsController do|> transform_keys(%{visitors: :conversions})|> to_csv([:name, :conversions, :conversion_rate])else- pages |> to_csv([:name, :visitors, :bounce_rate, :time_on_page])+ pages |> to_csv([:name, :visitors, :pageviews, :bounce_rate, :time_on_page])endelsejson(conn, pages)diff --git a/test/plausible_web/controllers/CSVs/30d-filter-path/pages.csv b/test/plausible_web/controllers/CSVs/30d-filter-path/pages.csvindex 711f9fb0b6..1cef2d8c42 100644--- a/test/plausible_web/controllers/CSVs/30d-filter-path/pages.csv+++ b/test/plausible_web/controllers/CSVs/30d-filter-path/pages.csv@@ -1,2 +1,2 @@-name,visitors,bounce_rate,time_on_page-/some-other-page,1,,60.0+name,visitors,pageviews,bounce_rate,time_on_page+/some-other-page,1,1,,60.0diff --git a/test/plausible_web/controllers/CSVs/30d/pages.csv b/test/plausible_web/controllers/CSVs/30d/pages.csvindex dc8d9adb4f..7e39ceacde 100644--- a/test/plausible_web/controllers/CSVs/30d/pages.csv+++ b/test/plausible_web/controllers/CSVs/30d/pages.csv@@ -1,3 +1,3 @@-name,visitors,bounce_rate,time_on_page-/,4,75,-/some-other-page,1,,60.0+name,visitors,pageviews,bounce_rate,time_on_page+/,4,3,75,+/some-other-page,1,1,,60.0diff --git a/test/plausible_web/controllers/CSVs/6m/pages.csv b/test/plausible_web/controllers/CSVs/6m/pages.csvindex 33187b985b..b81d72ad23 100644--- a/test/plausible_web/controllers/CSVs/6m/pages.csv+++ b/test/plausible_web/controllers/CSVs/6m/pages.csv@@ -1,3 +1,3 @@-name,visitors,bounce_rate,time_on_page-/,5,80,-/some-other-page,1,,60.0+name,visitors,pageviews,bounce_rate,time_on_page+/,5,4,80,+/some-other-page,1,1,,60.0