Skip to content

fix: define window.va queue stub on marketing pages so custom events … - #11

Merged
atom-tech9 merged 1 commit into
mainfrom
dev
Jul 7, 2026
Merged

atom-tech9 merged 1 commit into
mainfrom
dev

Conversation

@atom-tech9

Copy link
Copy Markdown
Owner

…queue reliably

Marketing pages fire custom events by calling window.va directly (they ship no framework JS). The deferred /_vercel/insights/script.js defines window.va only once it loads, so an early click could drop the event. Add the standard va queue stub (same one @vercel/analytics injects) up front in the enhancement script: events always queue and the real script drains window.vaq once analytics is provisioned.

Summary

Type of Change

  • feat — new feature
  • fix — bug fix
  • docs — documentation only
  • refactor — code change that neither fixes a bug nor adds a feature
  • chore — tooling / maintenance
  • test — adding or updating tests
  • perf — performance improvement
  • ci — CI / build changes

Screenshots

Checklist

  • npm run typecheck passes
  • npm run lint passes
  • npm run build passes
  • Follows the project code style (no any, immutable updates, logical CSS)
  • i18n keys added for any new user-facing strings (en and ar)
  • RTL layout verified for UI changes
  • No console.log (uses @/lib/logger)
  • Documentation updated if needed

…queue reliably

Marketing pages fire custom events by calling window.va directly (they
ship no framework JS). The deferred /_vercel/insights/script.js defines
window.va only once it loads, so an early click could drop the event.
Add the standard va queue stub (same one @vercel/analytics injects) up
front in the enhancement script: events always queue and the real
script drains window.vaq once analytics is provisioned.
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
scripto Building Building Preview, Comment Jul 7, 2026 11:21am

Request Review

@atom-tech9
atom-tech9 merged commit c4c6426 into main Jul 7, 2026
2 of 3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 61632613 Deployed Jul 7, 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.

2 participants