Skip to content

feat(analytics): add the GA4 tag - #5

Merged
vpetersson-bot merged 1 commit into
masterfrom
feat/ga-tag
Oct 21, 2026
Merged

vpetersson-bot merged 1 commit into
masterfrom
feat/ga-tag

Conversation

@vpetersson-bot

Copy link
Copy Markdown
Collaborator

main.ts already calls signage-kit's trackPlayer(..., { sendPageView: true }), but index.html never loaded gtag.js. Because of that, trackPlayer did nothing and the app sent no analytics.

This adds the GA4 tag to the top of <head>, configured with send_page_view: false like the other static apps (e.g. word-of-the-day). trackPlayer sends the page view itself once the player is profiled, so page views are counted exactly once and carry the player fields. The now-stale "No-op until a GA tag is added" comment is removed.

Verified locally: bun run lint, typecheck, bun test and bun run build pass, and dist/index.html contains the tag.

Dependabot was already configured (.github/dependabot.yml, identical to word-of-the-day), so nothing changes there.

🤖 Generated with Claude Code

main.ts already calls the signage-kit `trackPlayer` with `sendPageView: true`,
but index.html had no gtag.js, so it was a no-op and the app reported nothing.

The tag is configured with `send_page_view: false`, matching the other static
apps: `trackPlayer` sends the page view itself once the player is profiled, so
the pair neither double-counts nor drops page views.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vpetersson-bot
vpetersson-bot merged commit 14f6f73 into master Oct 21, 2026
1 check passed
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