feat: add native OpenAnalytics admin overview - #2
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenAnalytics now has a native EmDash admin page showing connection and tracking status, validation controls, visitors/pageviews/events, server-provided previous-period totals, and a visitors/pageviews chart. Administrators can choose 24h, 7d, 30d (default), or 90d, with freshness and actionable error notices.
The page uses Block Kit without a browser plugin bundle, application framework, chart dependency, polling, or production dependency additions. Analytics reads occur only on page interactions through a protected
plugins:managePOST route. Private keys remain server-side; public tracking remains bound to the validated API URL/key fingerprint.Changes
/v1/read/analytics/overviewand/v1/read/analytics/timeseriesreads with explicit UTC bounds, IANA timezone, and resolution. Overview requests comparisons in the same HTTP read; visitor buckets are never reaggregated.Contract details
Current OpenAnalytics rejects forced daily overview resolution for non-UTC offsets, so overview always requests
hour; the chart requestshourfor 24h anddayfor longer presets. Effective bounds can differ after rollup snapping. Freshness watermark is the latest rolled-up bucket, not a complete-through guarantee. Suspended analytics returns 403SITE_SUSPENDED; 402 remains a legacy billing mapping.Validation
pnpm run checkpasses on both: typecheck, lint, formatting, tests, build, package verification, and npm package dry-run.PR #3 recommendation: add Top Pages and Sources using native tables, retaining the same range, timezone, and server-side read boundaries.