Closed TitanFighter closed 3 years ago
Hi.
My site receives some settings from API. Some settings may include Google ID, some not, so in the 2nd case no reason to load script, so because of this I do the next:
Vue.use(VueGtag, { disableScriptLoad: true })
Then I check if settings include Google ID:
import { setOptions, bootstrap } from 'vue-gtag' ... mounted () { if (this.settings.gaMeasurementId) { setOptions({ config: { id: this.settings.gaMeasurementId } }) bootstrap() } },
and this does not work. Is there a way to load script and bootstrap it in this case?
Thank you.
you need to pass bootstrap: false as well in your plugin options
bootstrap: false
Hi.
My site receives some settings from API. Some settings may include Google ID, some not, so in the 2nd case no reason to load script, so because of this I do the next:
Then I check if settings include Google ID:
and this does not work. Is there a way to load script and bootstrap it in this case?
Thank you.