Fix missing 'pageviews' column from 'pages.csv' (#1988)

* Fix missing 'pageviews' column from 'pages.csv'

* Add CHANGELOG entry for Issue #1878 fix
This commit is contained in:
Sasha Fonseca 2022-07-12 22:46:47 +02:00 committed by GitHub
parent 3b82ba0e25
commit db3a852f26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 9 deletions

View File

@ -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 hours

View File

@ -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])
end
else
json(conn, pages)

View File

@ -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.0

1 name visitors pageviews bounce_rate time_on_page
2 /some-other-page 1 1 60.0

View File

@ -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.0

1 name visitors pageviews bounce_rate time_on_page
2 / 4 3 75
3 /some-other-page 1 1 60.0

View File

@ -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

1 name visitors pageviews bounce_rate time_on_page
2 / 5 4 80
3 /some-other-page 1 1 60.0