question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to configure PublicRuntimeConfiguration per readme

See original GitHub issue

Reproduction: 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 or yarn 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:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
pi0commented, Nov 10, 2020

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

1reaction
tommccleancommented, Oct 5, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found