Skip to content

fix(analytics): point jsdoc footer tracker at first-party /_a#46

Merged
cewert merged 1 commit into
mainfrom
fix/analytics-first-party-jsdoc
Jun 7, 2026
Merged

fix(analytics): point jsdoc footer tracker at first-party /_a#46
cewert merged 1 commit into
mainfrom
fix/analytics-first-party-jsdoc

Conversation

@cewert

@cewert cewert commented Jun 7, 2026

Copy link
Copy Markdown
Member

What

The jsdoc footer in jsdoc.json still embedded the Umami tracker cross-origin (analytics.jellyrock.app/script.js), even though the live api site already serves it first-party.

Why it matters

Under the static-site CSP (script-src 'self' — plus 'unsafe-inline' on the doc-site carve-out, ADR-0006) a cross-origin script source is blocked. Nothing is broken right now (live + deployed output are already first-party), but a future docs regeneration from this jsdoc.json (the repository_dispatch update.yml path) would reintroduce the cross-origin embed and re-create the May-2026 analytics-blackout footgun — on api only.

Fix

Sync the source to the first-party path used everywhere else: /_a/script.js + data-host-url="https://api.jellyrock.app/_a" so events post to the same-origin /_a/api/send proxy.

Source-only change — deploy.yml ignores jsdoc.json, so this doesn't deploy; it takes effect on the next docs regeneration. JSON validated.

Note (out of scope)

The committed docs/ output is independently stale vs. live (no analytics footer at all in the committed HTML), and the live page also loads a cross-origin html5shiv from googlecode that the CSP blocks (harmless legacy IE shim). Flagging, not fixing here.

The jsdoc footer still embedded the Umami tracker cross-origin
(analytics.jellyrock.app/script.js), even though the live site already serves
it first-party. Under the static-site CSP (script-src 'self' [+ 'unsafe-inline'
on the doc carve-out], ADR-0006) a cross-origin script source is blocked, so a
future docs regeneration from this jsdoc.json would reintroduce the May-2026
analytics-blackout footgun on api.

Sync the source to the first-party path used everywhere else: /_a/script.js
plus data-host-url so events post to the same-origin /_a/api/send proxy.
@cewert cewert merged commit 10633ae into main Jun 7, 2026
1 check passed
@cewert cewert deleted the fix/analytics-first-party-jsdoc branch June 7, 2026 04:14
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