Skip to content

Add GA4 tag and countdown/countup event - #6

Merged
vpetersson merged 1 commit into
masterfrom
add-ga4-tag
Jul 13, 2026
Merged

Add GA4 tag and countdown/countup event#6
vpetersson merged 1 commit into
masterfrom
add-ga4-tag

Conversation

@vpetersson

Copy link
Copy Markdown
Contributor

Adds the GA4 gtag.js snippet (G-3V92EN0SBN) to index.html, and sends a timer_direction event on each load with a direction param of countdown or countup (guarded no-op when Analytics is unavailable).

Verified: bun run typecheck, lint, and build pass; the tag ID and event land in dist.

🤖 Generated with Claude Code

Adds the gtag.js snippet (G-3V92EN0SBN) to the page head, and fires a
'timer_direction' GA4 event once per load classifying the timer as
'countdown' (future target) or 'countup' (past target). The track()
helper is guarded so it's a no-op when Analytics is blocked/absent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vpetersson
vpetersson merged commit 787a8e1 into master Jul 13, 2026
1 check passed
@vpetersson
vpetersson deleted the add-ga4-tag branch July 13, 2026 18:54
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