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.

Inject config ID dynamically

See original GitHub issue

I am trying to inject config ID dynamically after querying it from database.

First I have initialised the vue-gtag in main.js

Vue.use(VueGtag);

And in app.vue inside created lifecycle hook.

created() {
  // db query for google analytic ID

  this.$gtag.config({
    id: 'UA-12345678-0' // dynamic ID
  });
}

This didn’t work out.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
MatteoGabrielecommented, Oct 20, 2020

Well you to be able to download the gtag snippet you need an ID to attach to the URL. To achieve this with an ID coming from the database you would do the bootstrap as we said before. Other than that, whatever u can do with gtag, u can do here. Its the same library

1reaction
MatteoGabrielecommented, Oct 19, 2020

no i don’t think there are any drawbacks. it’s a matter of preferences and availability of your data: like if you have or not the domain ID statically

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inject components with dynamic id for multiple usage -Angular4
1 Answer 1 ; from '@angular/core' ; from 'openlayers' ; 'olmap', templateUrl ; styleUrls: ['./map.component.css'] ; MapComponent implements OnInit ...
Read more >
Tutorial: Use dynamic configuration in an ASP.NET Core app
This tutorial shows how you can enable dynamic configuration updates in an ASP. ... Inject the latest configuration into your app.
Read more >
How to get the Internet Identity ID dynamically? - Developers
Hello Everyone,. Is there a way to get the Internet Identity ID dynamically in the webpack.config.js? Below is my current code. new webpack....
Read more >
Visualforce dynamic Ids assignment
The "id" attribute for any element with a "managed" XML namespace (e.g. apex:outputText, c:myComponent, etc), can never use non-literal ...
Read more >
Dynamic Kafka Configurations | Confluent Documentation
Password configuration values that are dynamically updated are encrypted before storing in ZooKeeper. · The secret used for password encoding may be rotated...
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