Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file.
- Fixed Stats API timeseries returning time buckets falling outside the queried range
- Fixed issue with all non-interactive events being counted as interactive
- Fixed countries map countries staying highlighted on Chrome
- Fixed comparison tooltip in the top pages report missing date labels

## v3.2.0 - 2026-01-16

Expand Down
2 changes: 1 addition & 1 deletion lib/plausible_web/controllers/api/stats_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ defmodule PlausibleWeb.Api.StatsController do
else
json(conn, %{
results: pages,
meta: Map.merge(meta, Stats.Breakdown.formatted_date_ranges(query)),
meta: Map.new(meta.values) |> Map.merge(Stats.Breakdown.formatted_date_ranges(query)),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion, non-blocking: I think we should add an assertion about pages.meta to an existing pages controller test, it doesn't seem to be covered at all right now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, done!

skip_imported_reason: meta[:imports_skip_reason]
})
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,8 @@ defmodule PlausibleWeb.Api.StatsController.PagesTest do
"percentage" => 100.0
}
]

assert json_response(conn, 200)["meta"] == %{"date_range_label" => "1 Jan 2021"}
end

test "returns top pages with :not_member filter on custom pageview props including (none) value",
Expand Down Expand Up @@ -2212,6 +2214,11 @@ defmodule PlausibleWeb.Api.StatsController.PagesTest do
}
}
]

assert json_response(conn, 200)["meta"] == %{
"date_range_label" => "2 Jan 2021",
"comparison_date_range_label" => "1 Jan 2021"
}
end

on_ee do
Expand Down
Loading