-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add web vitals monitoring and integrate with GA4 #33277
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
va-vfs-bot
temporarily deployed
to
master/feature/web-vitals-reporting/main
November 29, 2024 21:35
Inactive
va-vfs-bot
temporarily deployed
to
master/feature/web-vitals-reporting/main
November 29, 2024 23:27
Inactive
va-vfs-bot
temporarily deployed
to
master/feature/web-vitals-reporting/main
December 2, 2024 22:04
Inactive
va-vfs-bot
temporarily deployed
to
master/feature/web-vitals-reporting/main
December 3, 2024 16:43
Inactive
va-vfs-bot
reviewed
Dec 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint is disabled
vets-website
uses ESLint to help enforce code quality. In most situations we would like ESLint to remain enabled.
What you can do
See if the code can be refactored to avoid disabling ESLint, or wait for a VSP review.
mdewey
approved these changes
Dec 3, 2024
rsmithadhoc
approved these changes
Dec 4, 2024
4 tasks
Thrillberg
pushed a commit
that referenced
this pull request
Dec 9, 2024
* Add web vitals monitoring and integrate with GA4 * de-duplicate internal-slot package * de-duplicate internal-slot package * Update event name to meet gtm reqs * Exclude production envs to allow testing in staging * Add unit tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Are you removing, renaming or moving a folder in this PR?
Examples of a TeamSite: https://va.gov/health and https://benefits.va.gov/benefits/. This scenario is also referred to as the "injected" header and footer. You can reach out in the
#sitewide-public-websites
Slack channel for questions.Did you change site-wide styles, platform utilities or other infrastructure?
Summary
This PR adds performance reporting in service of 2025 OKR 1.2:
It uses the web-vitals library to report the core web vitals + TTFB to GA4. This will allow us to view these metrics per app, as our end users experience them. The library is extremely light-weight and should not impact performance itself, as it uses the same mechanism we already use to record analytics events.
The key metric will be LCP, used as a proxy for perceived page load time. TTFB should additionally be useful to help inform how load performance varies with geography.
Testing done
Event collection was verified using the Adswerve extension on a review instance:
Because analytics are not reported from review instances, the next step will be to verify reporting and data shape in the staging environment.
What areas of the site does it impact?
All apps.
Acceptance criteria
Quality Assurance & Testing
Error Handling
Authentication