analytics/lib/plausible/stats
Sanne de Vries dfeda94e06
Add report percentages to dashboard and details view (#5923)
* Update report percentages on dashboard and details view

* Add percentages to Countries, Regions, and Cities reports

* Add percentages to Channels, Sources, and UTM reports

* Add percentages to top pages, entry pages, and exit pages reports

* Update tests to include percentages

* Change dashboard copy from title case to sentence case

* Update details modal style

* Make animations snappier

* Introduce max height to modal and make inner content scrollable

* Improve modal mobile design

- Enable horizontal scroll for details modal on mobile
- Add responsive spacing and positioning to modal

* Added mobile tap behavior to external link in list report

* Show tooltips only when in comparison mode or when the number is abbreviated

* remove previously added showTooltip prop

- This isn't needed anymore since we now handle the tooltip logic in the MetricValue component

* Show long format upon hovering detailed view metrics

* Added mobile tapping behaviour to detailed view

* Added percentages to all detailed views

* Add mobile swipe-to-close behavior for modal

* Adjust sensitivity of modal drag to close

* Use hammerjs for swipe-to-close modal behaviour

* Prevent dragging if gesture starts inside table

* Show 2 decimal places for percentages < 0.1% across dashboard

* Adjust dark mode styles

* Add hover effect to external link icon

* Update tests to expect two-decimal percentages

* Undo hammer install and revert to old modal styling

* Remove CR and % columns from goals and custom props reports on dashboard, and show on hover in detailed view

* Remove unused constants

* Undo conversion rate on hover behaviour

- Unlike percentages, CR should show permanently.

* Show percentages permanently in custom props detailed view

* Adjust width of conversion metrics column

* Updated metric-value test

* Update top-bar test

* Added changelog entry

* Fix test expectations for percentages with imported data

- Update tests to expect correct percentages (≤100%) when imported data is included. These tests will fail until the percentage calculation bug is fixed, documenting the expected behavior.

* Add imported_visitors to tests to ensure correct total_visitors calculation

* Correct imported_visitors count in test
2025-12-16 12:43:16 +00:00
..
filters Refactoring preparation for DashboardQueryParser (#5929) 2025-12-03 15:09:17 +00:00
imported Script v2: Sync event.props.path for special path-based events from event.pathname (#5559) 2025-07-14 08:39:25 +00:00
json-schema Automatically generate Typescript types for v2 API query schema (#4574) 2024-09-18 11:01:20 +00:00
legacy DashboardQueryParser & DashboardQuerySerializer (#5938) 2025-12-09 13:07:36 +00:00
query Fix: time series trimming (#5705) 2025-09-08 11:15:35 +00:00
sql Add report percentages to dashboard and details view (#5923) 2025-12-16 12:43:16 +00:00
aggregate.ex time-on-page: query (#5159) 2025-03-11 11:19:58 +00:00
api_query_parser.ex DashboardQueryParser & DashboardQuerySerializer (#5938) 2025-12-09 13:07:36 +00:00
base.ex time-on-page: query (#5159) 2025-03-11 11:19:58 +00:00
breakdown.ex APIv2: Use `Query.build` over `Query.from` in more cases (#5699) 2025-09-04 12:25:09 +00:00
clickhouse.ex CRM: 24h charts + minor extensions (#5832) 2025-10-27 14:29:11 +00:00
compare.ex Sort by exit rate (#5289) 2025-04-09 09:47:12 +00:00
comparisons.ex Implement custom date/time range comparisons (#5805) 2025-10-16 06:14:49 +00:00
current_visitors.ex Consolidated view email reports (#5876) 2025-11-11 13:26:52 +00:00
custom_props.ex time-on-page: query (#5159) 2025-03-11 11:19:58 +00:00
dashboard_query_parser.ex DashboardQueryParser & DashboardQuerySerializer (#5938) 2025-12-09 13:07:36 +00:00
dashboard_query_serializer.ex DashboardQueryParser & DashboardQuerySerializer (#5938) 2025-12-09 13:07:36 +00:00
datetime_range.ex Implement custom date/time range comparisons (#5805) 2025-10-16 06:14:49 +00:00
filter_suggestions.ex Include "Direct / None" in source filter suggestions (#5636) 2025-08-13 08:52:39 +00:00
goal_suggestions.ex Enforce max limit for goals per site (#5917) 2025-11-27 10:19:13 +00:00
goals.ex Reapply+bugfix: goals with custom props (#5936) (#5944) 2025-12-11 13:09:34 +00:00
interval.ex Refactoring preparation for DashboardQueryParser (#5929) 2025-12-03 15:09:17 +00:00
json_schema.ex Revenue metrics in APIv2 (#4893) 2025-01-07 08:25:45 +00:00
metrics.ex Sort by exit rate (#5289) 2025-04-09 09:47:12 +00:00
parsed_query_params.ex DashboardQueryParser & DashboardQuerySerializer (#5938) 2025-12-09 13:07:36 +00:00
query.ex DashboardQueryParser & DashboardQuerySerializer (#5938) 2025-12-09 13:07:36 +00:00
query_builder.ex DashboardQueryParser & DashboardQuerySerializer (#5938) 2025-12-09 13:07:36 +00:00
query_optimizer.ex Refactoring preparation for DashboardQueryParser (#5929) 2025-12-03 15:09:17 +00:00
query_result.ex time-on-page: csv import/export support, preparation for release (#5274) 2025-04-08 06:25:11 +00:00
query_runner.ex time-on-page: dashboard + timeseries support (#5174) 2025-03-12 09:51:53 +00:00
table_decider.ex Show revenue data in all breakdowns (#5767) 2025-11-18 11:24:54 +00:00
time.ex Reduce reliance on `Timex` and use native time API where feasible (#5712) 2025-09-10 10:21:36 +00:00
time_on_page.ex time-on-page: Remove flag, CHANGELOG.md, time_on_page in APIv2, update old tests (#5277) 2025-04-08 07:28:03 +00:00
timeseries.ex Refactoring preparation for DashboardQueryParser (#5929) 2025-12-03 15:09:17 +00:00
util.ex APIv2: Fix `percentage` metric 500s (#5099) 2025-02-26 07:07:17 +00:00