Skip to content

Show Plausible engagement metrics, entry and exit pages - #69

Merged
thebuilder merged 12 commits into
mainfrom
claude/project-thread-nidlcm
Oct 30, 2026
Merged

thebuilder merged 12 commits into
mainfrom
claude/project-thread-nidlcm

Conversation

@thebuilder

@thebuilder thebuilder commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Requested by Daniel Schmidt · project thread

What changed

The summary strip only had Visitors and Page views, which left an empty band to the right. On a Plausible connection it now also shows engagement metrics. Each one is a chartable tab with a badge comparing it to the previous period.

Scope Metrics
Site-wide Views per visit, Bounce rate, Visit duration
A page (document workspace or page filter) Bounce rate, Time on page, Scroll depth
  • Comparison badges: they now show whether a change is good or bad, so a falling bounce rate is green. Rates are compared in percentage points (-3 pts). Durations and views per visit use a relative percentage.
  • Chart: the axis and tooltip use each metric's unit (% or 2m 14s), with duration ticks on whole minutes. A period with no data leaves a gap in the line instead of dropping to zero. The fill is drawn as one shape, so there's no seam where the in-progress segment starts.
  • No extra provider calls: engagement is requested in the same Plausible query as the totals, trend and breakdowns. If an instance rejects a metric with a 400 (for example an older self-hosted version without time_on_page or scroll_depth), the query is retried with the session metrics only, then with traffic only. Engagement never blocks the report. Once a smaller query succeeds, the instance's limit is remembered for an hour, so later reports skip the failing attempts. An unrelated 400 is never remembered.
  • Goal filters: engagement is left out while a goal filter is active. views_per_visit is never requested with a page filter, because Plausible doesn't allow that combination. If the selected engagement tab disappears after a filter change, the selection resets to Visitors instead of springing back later.
  • Entry and exit pages: the Pages card gains Entry pages and Exit pages tabs on providers that report visit:entry_page and visit:exit_page (Plausible). The selected tab loads on demand and is kept in the URL. Without them the card stays a plain Pages card.
  • Expanded dialogs: View all shows bounce rate, time on page and scroll depth for pages, and bounce rate and visit duration for other dimensions. Bars span only the traffic columns. The breakdown dialog uses the wider dialog width, and narrow dialogs keep only the traffic columns.
  • Card headings: the View all footer is gone. Each card's headline or tabs get a row of their own with an expand icon at the end, and the column headings ("Page", "Visitors") sit below it.
  • Row click filters: clicking a breakdown row (or its label) toggles it as a filter, as in Plausible, replacing the hover filter button. Opening a page or referrer moves to an icon link that appears on hover, and the active filter's label is highlighted. Clicks on the share tooltip and text selections don't filter, and the backoffice's focusable scroll container doesn't block the click.
  • Events and flags: clicking an event or a flag opens its details on every provider, and clicking a property or flag value there filters by it. Where the provider can filter by an event (Plausible), the event details have a Filter by this event button.
  • Polish: Events and Flags headings now match the other cards, and those cards no longer scroll sideways in a three-column row.
  • Vercel: Vercel's query API doesn't report these metrics, so its dashboard stays as it is. The tabs and columns come from the data the connection returns.
  • Breakdowns: switching to an engagement tab doesn't reload breakdowns. They keep ranking by visitors (or by page views when that tab is selected).
  • Mock data: the Demo mock scenario includes engagement and entry and exit pages, and follows the same page-filter and goal-filter rules as Plausible, so the sample site shows every new card.

API

  • AnalyticsTotals, AnalyticsPoint and AnalyticsBreakdownRow gain an optional Engagement (AnalyticsEngagement) at the end of their parameter lists. This changes their constructors at the binary level, which is acceptable at 0.1.0.
  • AnalyticsDimension gains EntryPage and ExitPage.
  • New singleton PlausibleMetricSupport, taken as an optional constructor parameter by PlausibleAnalyticsClient.
  • types.gen.ts is updated to match.

Testing

  • dotnet test: 243 passing, including Plausible tests for requested metrics, page scope, the goal filter, the 400 fallback chain and its memory, breakdown engagement and entry and exit pages.
  • pnpm test: 276 passing, including row-click filtering inside a focusable container, event rows, the Filter by this event button, value rows and the card expand icons. tsc and fallow audit are clean.
  • Checked by hand in the sample site with the Demo mock at 1440px wide: summary tabs, card headings, Pages tabs, both dialogs, row-click filtering, and the Events and Flags cards.

Docs

The reports guide gains a metrics table, an explanation of the badges, the entry and exit tabs, the dialog columns, row-click filtering and how events and flags drill down. Screenshots are refreshed. The Plausible provider page and the overview mention engagement and the self-hosted fallback.

Plausible connections now report bounce rate, visit duration and views per
visit site-wide, and bounce rate, time on page and scroll depth for a page.
They join Visitors and Page views as chartable tabs with a vs-previous-period
badge; a falling bounce rate shows as an improvement and rates compare in
percentage points.

Engagement is requested in the same query as the traffic totals and trend,
so it adds no provider calls. An instance that rejects the newer metrics
falls back to the session metrics, then to traffic only. Engagement is left
out under a goal filter. Vercel reports none, so its dashboard is unchanged.
@vercel

vercel Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
web-analytics Ready Ready Preview Oct 30, 2026 10:28am UTC

Chart.js fills each styled line segment separately, which left a hairline
gap in the area fill where the dashed final segment begins. The fill now
comes from its own unstyled dataset, and the tooltip and hover guide read
only the line dataset.
- Pages card gains Entry pages and Exit pages tabs on providers that report
  visit:entry_page and visit:exit_page (Plausible), loaded on demand.
- Expanded breakdown dialogs show bounce rate, time on page and scroll depth
  for pages, and bounce rate and visit duration for other dimensions. Bars
  span only the traffic columns, and narrow dialogs drop the extra columns.
- Breakdown dialogs use the wider dialog width.
- Events and Flags cards no longer scroll sideways in a three-column row,
  and their headings match the other cards.
- Mock connections include entry and exit pages so the demo shows every card.
@thebuilder thebuilder changed the title Show Plausible engagement metrics in the dashboard summary Show Plausible engagement metrics, entry and exit pages Oct 29, 2026
Clicking a breakdown row, or its label, now toggles that value as a filter,
as in Plausible. Opening a page or referrer moves to an icon link that
appears on hover, and the active filter's label is highlighted.
- Remember per Plausible instance when engagement metrics were rejected,
  so later reports skip the failing attempts. The downgrade is only kept
  once the smaller query succeeds, so an unrelated 400 never sticks.
- Plausible CountAsync carries engagement again and GetTotalsAsync
  delegates to it, as before.
- Share the goal-filter and page-scope rules between the Plausible client
  and the demo mock, so the mock follows page filters and goal filters.
- Reset an engagement metric to visitors once a report can't show it, so
  the selection and URL don't spring back after a filter is removed.
- Row clicks ignore the focusable share tooltip and text selections, the
  message row no longer shows a pointer, and engagement columns get their
  intended width.
- Reuse metricComparison for relative engagement badges.
Each tabbed card now carries its tab list label, how its reports load
(eager, selected tab only, or on demand), and whether it collapses to a
plain card with one supported option. Selected tabs are passed as one
CardSelections object keyed by card id, and tab change events derive
from the id, so the grid, report plan and controller no longer special
case Pages, Audience and UTM by name. Audience now also collapses to a
plain card when a provider reports only devices.
…ages

Recaptured from the Demo mock: the overview, the filtered dashboard with
page-scoped metrics, the breakdown panels, and the operating-system dialog
with its engagement columns.
…upports it

The breakdown row click guard only looks at the path inside the row, so the
backoffice's focusable scroll container no longer swallows the click. Event
property values and flag values filter on row click, and the event list filters
by event on Plausible with a details icon beside each event. Vercel keeps
opening the details on click.
Event rows behave the same on Plausible and Vercel: a click opens the details,
and filtering happens inside them. The details dialog gains a Filter by this
event button where the provider supports event filtering.
Cards drop their View all footer. The headline or tabs get a row of their own
with an expand icon at the end, and the column headings sit below it. Docs text
and screenshots are updated.
The metric tabs sit on the card surface with short dividers instead of a grey
band, and the strip is a little shorter. The selected metric keeps its
underline.
@thebuilder
thebuilder merged commit 071af4f into main Oct 30, 2026
9 checks passed
@thebuilder
thebuilder deleted the claude/project-thread-nidlcm branch October 30, 2026 13:08

This branch was successfully deployed

1 active deployment
Preview — 67ab3d9b Deployed Oct 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants