Repository navigation
Task 009: Consolidate analytics provider scripts - #7
Merged
Merged
Conversation
6 tasks
Collaborator
Author
/ponytail-review
|
Merge five near-identical per-provider analytics modules into a single analytics-scripts.ts map. Keep analytics.ts as a thin dispatcher that looks up providers and validates config. Add unit tests for all five provider script outputs. Task 009 — Finding #15.
Igloczek
force-pushed
the
task/009-consolidate-analytics-scripts
branch
from
June 30, 2026 11:44
27b4695 to
791ccf9
Compare
Igloczek
added a commit
that referenced
this pull request
Aug 8, 2026
…ripts Task 009: Consolidate analytics provider scripts
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.
Implements tasks/009-consolidate-analytics-scripts.md from the ponytail audit backlog.
Goal
Replace five near-identical analytics modules and a dispatcher with one table-driven file.
Scope
google-analytics.ts,umami-analytics.ts,plausible-analytics.ts,matomo-analytics.ts,rybbit-analytics.tsinto a single module (e.g.analytics-scripts.ts).analytics.tsas a thin dispatcher or inline the switch into the caller.Acceptance criteria
src/server/analytics/contains at most two files (dispatcher + scripts map), down from six.bun run lintpasses.bun run buildsucceeds.Depends on
Nothing.
Verification
Audit reference
Finding #15 — analytics provider split.