-
-
Notifications
You must be signed in to change notification settings - Fork 1k
[docs] Add gtm #3969
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
base: main
Are you sure you want to change the base?
[docs] Add gtm #3969
Conversation
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.
Pull request overview
Adds Google Tag Manager (GTM) support to the docs-gesture-handler Docusaurus site so it can load the GTM container during site rendering/build.
Changes:
- Add
@docusaurus/plugin-google-tag-managerdependency to the docs package. - Register the GTM plugin in
docusaurus.config.jswith a specificcontainerId.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/docs-gesture-handler/package.json | Adds the Docusaurus GTM plugin dependency. |
| packages/docs-gesture-handler/docusaurus.config.js | Enables/configures the GTM plugin with a container ID. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [ | ||
| '@docusaurus/plugin-google-tag-manager', | ||
| { | ||
| containerId: 'GTM-PHF2NKVT', | ||
| }, | ||
| ], |
Copilot
AI
Feb 9, 2026
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.
GTM is enabled unconditionally, so local docusaurus start and any non-prod builds will also load the GTM container and potentially send real analytics traffic. Consider only enabling this plugin when NODE_ENV === 'production' (similar to other conditional plugins here) and/or gating it behind an env var so forks/preview deployments don’t report to the production container.
| [ | ||
| '@docusaurus/plugin-google-tag-manager', | ||
| { | ||
| containerId: 'GTM-PHF2NKVT', | ||
| }, |
Copilot
AI
Feb 9, 2026
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.
With this GTM plugin added, the site will also still load the existing googleAnalytics UA tracking configured in the classic preset earlier in this file. Having both GA (UA-*) and GTM enabled can cause duplicate pageview tracking / conflicting analytics. If GTM is intended to replace GA, remove/disable the googleAnalytics block (or gate one of the integrations) so only one runs in production.
j-piasecki
left a comment
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.
LGTM, if the things copilot pointed out aren't a problem then we can go ahead and merge it.
Description
Adds GTM integration.