Skip to content

feat(analytics): first-party /_a footer in generated docs (ADR-0006 Phase 2c follow-up)#44

Merged
cewert merged 1 commit into
mainfrom
adr0006/phase2c-regen-docs
May 31, 2026
Merged

feat(analytics): first-party /_a footer in generated docs (ADR-0006 Phase 2c follow-up)#44
cewert merged 1 commit into
mainfrom
adr0006/phase2c-regen-docs

Conversation

@cewert
Copy link
Copy Markdown
Member

@cewert cewert commented May 31, 2026

Phase 2c follow-up. #43 updated jsdoc.json, but api-docs deploys by rsync-ing the committed docs/ artifact (no build on deploy), so the live api.jellyrock.app still served the cross-origin tracker. This regenerates the footer in the committed HTML.

  • Uniform swap across all 545 generated pages: src="https://analytics.jellyrock.app/script.js"src="/_a/script.js" + data-host-url="https://api.jellyrock.app/_a".
  • Diff is exactly 545 files × (1 line removed, 1 added) — footer only, no other content churn.
  • Matches what npm run build now emits (jsdoc.json is first-party on main), so the next code-update regeneration yields no footer diff.

Verification

  • grep: 0 analytics.jellyrock.app refs, 545 /_a/script.js refs in docs/.
  • Post-deploy gate: analytics-health.sh --only api-docsfirst-party/ok (this is the change that actually flips the live site).

…06 Phase 2c)

#43 updated jsdoc.json (the config), but api-docs deploys by rsyncing the
COMMITTED docs/ build artifact — it does not build on deploy — so the live
site still served the cross-origin tracker. This regenerates the footer in the
committed HTML to match the updated jsdoc.json.

Uniform, surgical swap across all 545 generated pages:
  - src="https://analytics.jellyrock.app/script.js"
  + src="/_a/script.js" … data-host-url="https://api.jellyrock.app/_a"

Identical to what `npm run build` now emits (jsdoc.json is already first-party
on main), so the next code-update regeneration produces no footer diff. Events
POST to /_a/api/send → Caddy strips to umami /api/send. analytics.jellyrock.app
stays live as rollback (Bridge).
@cewert cewert merged commit 59aa80a into main May 31, 2026
1 check passed
@cewert cewert deleted the adr0006/phase2c-regen-docs branch May 31, 2026 13:03
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.

1 participant