Skip to content

Disable Google Analytics on preview builds#111

Merged
AdamGohs merged 2 commits intomainfrom
fix/disable-gtag-on-previews
Apr 11, 2026
Merged

Disable Google Analytics on preview builds#111
AdamGohs merged 2 commits intomainfrom
fix/disable-gtag-on-previews

Conversation

@AdamGohs
Copy link
Copy Markdown
Collaborator

Summary

  • Skip the `@docusaurus/plugin-google-gtag` plugin when `DOCUSAURUS_IS_PREVIEW=true` so PR preview deployments stop firing page view events into the production GA property
  • pr-preview.yml now sets `DOCUSAURUS_IS_PREVIEW=true` in the build env; production builds (deploy.yml, local `npm run build`) are unaffected

Preview builds were firing page view events into the production GA
property, inflating metrics with internal review traffic. Skip the
@docusaurus/plugin-google-gtag plugin when DOCUSAURUS_IS_PREVIEW=true
is set by pr-preview.yml.
@AdamGohs AdamGohs requested a review from a team as a code owner April 11, 2026 19:58
Non-docs PRs were being blocked by branch protection because nothing
was flipping the review-workflow status to success. stage-progression.yml
handles it for docs PRs, but ci-build.yml needs to handle the non-docs
path or those PRs can't merge.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 11, 2026

CI build passed for commit 287865e

This PR does not touch documentation content under docs/, so no multi-stage review is required.

@usace-rmc/docs-admin may merge.

@github-actions
Copy link
Copy Markdown

📄 Preview deployed for commit 287865e

https://usace-rmc.github.io/RMC-Software-Documentation-Previews/pr-111/

This preview updates automatically when new commits are pushed. Deleted when the PR closes.

@AdamGohs AdamGohs merged commit 39c0c36 into main Apr 11, 2026
4 checks passed
@AdamGohs AdamGohs deleted the fix/disable-gtag-on-previews branch April 11, 2026 20:08
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.

1 participant