Add Google Tag Manager to Website #5235
Closed
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.
Summary
Implements Google Tag Manager (GTM) on the Roo Code marketing website to enable analytics and tracking capabilities.
Changes
Added GTM script tag in the section of apps/web-roo-code/src/app/layout.tsx as high as possible per Google's specifications
Added GTM noscript fallback immediately after the opening tag for users with JavaScript disabled
Used container ID GTM-M2JZHV8N as specified in the implementation requirements
Implemented in root layout to ensure site-wide coverage across all pages
Technical Details
Follows Google's official GTM implementation guidelines
Uses React's dangerouslySetInnerHTML for script injection (Next.js best practice)
Proper inline styles for noscript iframe element
Verified working across multiple pages (home, enterprise, privacy)
Testing
✅ Verified GTM tags render correctly on:
Home page (/)
Enterprise page (/enterprise)
Privacy page (/privacy)
Both the main GTM script and noscript fallback are properly implemented and functional.
Important
Add Google Tag Manager to
layout.tsxfor site-wide analytics and tracking.<head>and noscript fallback in<body>inlayout.tsx.GTM-M2JZHV8Nfor tracking.dangerouslySetInnerHTMLfor script injection.This description was created by
for 7846e51. You can customize this summary. It will automatically update as commits are pushed.