Skip to content

fix(ci): forward NEXT_PUBLIC_GTM_ID to client docker build (AM-640)#349

Merged
mbarrenechea merged 1 commit into
developfrom
feat/am-640-cicd-gtm
May 21, 2026
Merged

fix(ci): forward NEXT_PUBLIC_GTM_ID to client docker build (AM-640)#349
mbarrenechea merged 1 commit into
developfrom
feat/am-640-cicd-gtm

Conversation

@mitoperni

@mitoperni mitoperni commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Final missing wire for AM-640 (GA install via GTM). The previous PRs added the env var to:

  • env validation (#344client/src/env.mjs)
  • Terraform schema (#344infrastructure/)
  • Docker compose + Dockerfile (#348docker-compose.yml, client/Dockerfile)

But the GitHub Actions workflow (cicd.yml) explicitly enumerates each build-args line, so a new var stays invisible to the build until added here. Without this line, NEXT_PUBLIC_GTM_ID bakes in as empty string and <GoogleTagManager> never renders — which is what we observe on dev.amazoniaforever360.org right now.

GTM ID is a public identifier (visible in browser network requests), so this uses vars. not secrets. — matches NEXT_PUBLIC_URL, NEXT_PUBLIC_API_URL, NEXT_PUBLIC_WEBSHOT_URL.

Test plan

  • Confirm TF_CLIENT_NEXT_PUBLIC_GTM_ID is set as a variable (not secret) in the GitHub Environments for development, staging, production.
  • Merge → wait for dev deploy.
  • On https://dev.amazoniaforever360.org/es: accept cookies → DevTools → window.dataLayer populated, GET gtm.js?id=GTM-M4DCMK4 fires.
  • View source on a page → googletagmanager.com appears in the bundle.

@mitoperni mitoperni self-assigned this May 21, 2026
@vercel

vercel Bot commented May 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
amazonia-360 Ignored Ignored May 21, 2026 10:08am

Request Review

@sonarqubecloud

Copy link
Copy Markdown

@mbarrenechea mbarrenechea merged commit f74af0c into develop May 21, 2026
13 checks passed
@mbarrenechea mbarrenechea deleted the feat/am-640-cicd-gtm branch May 21, 2026 10:09
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