Skip to content

Conversation

@p-malecki
Copy link
Contributor

Description

Adds GTM integration.

Copilot AI review requested due to automatic review settings February 9, 2026 21:59
Copy link
Contributor

Copilot AI left a 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-manager dependency to the docs package.
  • Register the GTM plugin in docusaurus.config.js with a specific containerId.

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.

Comment on lines 130 to 135
[
'@docusaurus/plugin-google-tag-manager',
{
containerId: 'GTM-PHF2NKVT',
},
],
Copy link

Copilot AI Feb 9, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines 130 to 134
[
'@docusaurus/plugin-google-tag-manager',
{
containerId: 'GTM-PHF2NKVT',
},
Copy link

Copilot AI Feb 9, 2026

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.

Copilot uses AI. Check for mistakes.
Copy link
Member

@j-piasecki j-piasecki left a 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.

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