Skip to content

fix: beacon-transport login_start so the event survives OAuth navigation - #65

Merged
Aliferous3 merged 1 commit into
mainfrom
fix/ga4-login-start-beacon
Sep 29, 2026
Merged

Aliferous3 merged 1 commit into
mainfrom
fix/ga4-login-start-beacon

Conversation

@Aliferous3

Copy link
Copy Markdown
Owner

Summary

  • login_start was queued on the dataLayer but window.location.assign to /api/auth/login raced the batched gtag flush — the event could be dropped.
  • transport_type: 'beacon' is a gtag control field (consumed by the tag, never sent as an event param); the event now flushes via sendBeacon at emit time.
  • Schema + type + call site + tests updated; beacon is now required by validation so it can't silently regress.

Test plan

  • npm test 476/0, typecheck clean
  • Post-deploy QA: login_start collect observable on click

Generated with Devin

The GitHub login button immediately navigates to /api/auth/login; a
batched gtag send races the unload and can drop login_start.
transport_type:'beacon' is a gtag control field (consumed by the tag,
never sent as an event param) that flushes via sendBeacon at emit time.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dev-ledger Ready Ready Preview Sep 29, 2026 10:43pm UTC

@Aliferous3
Aliferous3 merged commit 1ea10eb into main Sep 29, 2026
5 checks passed
@Aliferous3
Aliferous3 deleted the fix/ga4-login-start-beacon branch September 29, 2026 22:44

This branch was successfully deployed

1 active deployment
Preview — 2a2224b2 Deployed Sep 29, 2026 by vercel[bot]
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