Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Google Analytics to the Next.js application (pages router), alongside a set of responsive UI tweaks and dependency/lockfile updates.
Changes:
- Inject Google Analytics (gtag) scripts in
pages/_app.tsx, gated byNEXT_PUBLIC_GA_ID. - Adjust responsive typography/padding in mission brief and landing header components.
- Add
@next/third-partiesand updatepackage-lock.json(includes broader dependency version churn).
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
pages/_app.tsx |
Adds GA script injection using next/script and NEXT_PUBLIC_GA_ID. |
package.json |
Adds @next/third-parties dependency. |
package-lock.json |
Updates lockfile (Next + many transitive packages). |
.env.local |
Adds placeholder for NEXT_PUBLIC_GA_ID. |
src/components/mission-brief/MissionBriefContent.tsx |
Makes headings/styles responsive via Tailwind + CSS clamp(). |
src/components/landing/SectionCard.tsx |
Tweaks padding for smaller breakpoints. |
src/components/landing/Header.tsx |
Improves responsive typography/spacing; minor copy adjustment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
24
to
28
| window.dataLayer = window.dataLayer || []; | ||
| function gtag(){dataLayer.push(arguments);} | ||
| gtag('js', new Date()); | ||
| gtag('config', '${gaId}'); | ||
| `} |
There was a problem hiding this comment.
With the current setup, GA will only send the initial page_view; client-side route changes in Next.js won’t be tracked automatically. Add route-change handling (e.g., listen to next/router routeChangeComplete and call gtag('config', gaId, { page_path })) so SPA navigations are recorded.
This file contains hidden or 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
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.
No description provided.