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.

Feature: Allow script-query variables from runtimeConfig

See original GitHub issue

Currently it is not possible to define query variables at runtime - e.g. in case the same build is used in different environments (gtm_preview).

To solve this, publicRuntimeConfig.gtm.variables should override gtm.variables, if set.

P.S.: I’ve got it working since the “id” param is not url-escaped 🤫, but that seems kind of hacky 😉

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:12
  • Comments:10

github_iconTop GitHub Comments

3reactions
Martin7mindcommented, Feb 17, 2021

@sergiobellon this is a workaround:

publicRuntimeConfig: {
    gtm: {
      // hack until https://github.com/nuxt-community/gtm-module/issues/94 is fixed
      id: `GTM-xxxx&gtm_auth=${process.env.GTM_AUTH}&gtm_preview=${process.env.GTM_PREVIEW}&gtm_cookies_win=x`
    }
  }
2reactions
Martin7mindcommented, Feb 18, 2021

correct @kissu

Read more comments on GitHub >

github_iconTop Results From Across the Web

16.4. Run-time Configuration - PostgreSQL
This feature is disabled by default. To enable it, set the vacuum_cost_delay variable to a nonzero value. vacuum_cost_delay (integer). The length of time,...
Read more >
gcloud beta runtime-config configs variables get-value
gcloud beta runtime-config configs variables get-value NAME --config-name = CONFIG_NAME [ GCLOUD_WIDE_FLAG … ] DESCRIPTION: (BETA) This command prints only ...
Read more >
How to set configuration variables in Next.js | by Eric Burel
Let's start with the simplest pattern. 1) Import the value from a file. Yeah, you don't have to do everything using Next.js features....
Read more >
Configure your environment | Cloud Functions for Firebase
When deploying a function with parameterized configuration variables, the Firebase CLI ... while still allowing easy access from your functions when needed.
Read more >
next.config.js: Runtime Configuration
Please use environment variables instead in order to avoid initialization overhead. ... Place any server-only runtime config under serverRuntimeConfig .
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