Unable to configure PublicRuntimeConfiguration per readme
See original GitHub issueReproduction: https://github.com/tommcclean/nuxtgtmruntime/blob/master/nuxt.config.js#L56
- The reproduction is a new vanilla Nuxt site using >2.14, only modifications are installing this module and updating the config.
Expectation
- When running the website with either
yarn dev
oryarn build
+yarn start
- GTM would request the XHR:
https://www.googletagmanager.com/gtm.js?id=GTM-123456
using the publicRuntimeConfig override
Actual
- GTM uses the default and requests
https://www.googletagmanager.com/gtm.js?id=GTM-XXXXXXX
NB
- When I log out the GTM object from runtimeConfig, I can see it is evaluated in runtime; it just doesn’t update the module settings.
- It also doesn’t look like it has been developed yet to support variables; which is in our use case
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
next - npm
The below readme is the documentation for the canary (prerelease) branch. ... Customizing webpack config; Customizing babel config ...
Read more >Next.JS & JEST - publicRuntimeConfig undefined
I've tried below solutions but it's not working. I have set config in jest.setup.js also.Please see below code import { setConfig } from ......
Read more >Storybook Addon Next
A no config Storybook addon that makes Next.js features just work in Storybook. ... config is used; Module not found: Error: Can't resolve...
Read more >the request of a dependency is an expression nextjs - You.com
npx serverless error: Error: Command failed with exit code 1: node_modules/.bin/next build warn - Invalid next.config.js options detected: - The root value ...
Read more >next js latest version
When I type: npx create-next-app --ts, npx installed Next with React 18, but I can't use React 18, …. Download the latest version...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi. Sorry i kinda lost track of this module a while. Feature released: https://github.com/nuxt-community/gtm-module/releases/tag/v2.4.0
Yeah I am not sure if this repo is maintained; I tried to reach out to get a publish but couldn’t get a reply.
For me I ended up writing my own plugin which initialises GTM, as that gets done at runtime and can support the other variables being dynamic too