You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start the application in the development mode (code sandbox)
Open homepage and see alert Main GTM-...
Click Not working, and see no alert.
Click Back to go to homepage.
Click Working, and see alert.
Current vs. Expected behavior
Currently GoogleTagManager ids are not unique per Component, since that the scripts loaded by GTM when navigating in browser between different pages are not being executed.
Expectation is that they will be executed once loaded.
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023
Available memory (MB): 4242
Available CPU cores: 2
Binaries:
Node: 20.9.0
npm: 9.8.1
Yarn: 1.22.19
pnpm: 8.10.2
Relevant Packages:
next: 15.3.0-canary.44 // Latest available version is detected (15.3.0-canary.44).
eslint-config-next: N/A
react: 19.0.0
react-dom: 19.0.0
typescript: 5.1.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
Other (Deployed), next dev (local), next start (local)
Additional context
I tested this locally with newest stable next 15.2.4.
I also have done some digging since this feature if vital for my company, to resolve it. The fix is also attached within the code sandbox project.
Basically if we provide simple fix with appending gtmId into the elements rendered by GoogleTagManager, this should solve the issue.
The text was updated successfully, but these errors were encountered:
tskorupka
added a commit
to tskorupka/next.js
that referenced
this issue
Apr 8, 2025
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/kind-wildflower-y8zk4n?workspaceId=ws_5dafRhSwd3kbzr7DasDeFF
To Reproduce
Main GTM-...
Not working
, and see no alert.Back
to go to homepage.Working
, and see alert.Current vs. Expected behavior
Currently GoogleTagManager ids are not unique per Component, since that the scripts loaded by GTM when navigating in browser between different pages are not being executed.
Expectation is that they will be executed once loaded.
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023 Available memory (MB): 4242 Available CPU cores: 2 Binaries: Node: 20.9.0 npm: 9.8.1 Yarn: 1.22.19 pnpm: 8.10.2 Relevant Packages: next: 15.3.0-canary.44 // Latest available version is detected (15.3.0-canary.44). eslint-config-next: N/A react: 19.0.0 react-dom: 19.0.0 typescript: 5.1.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
Other (Deployed), next dev (local), next start (local)
Additional context
I tested this locally with newest stable next 15.2.4.
I also have done some digging since this feature if vital for my company, to resolve it. The fix is also attached within the code sandbox project.
Basically if we provide simple fix with appending gtmId into the elements rendered by GoogleTagManager, this should solve the issue.
The text was updated successfully, but these errors were encountered: