vue-gtag: Something happened and gtag.js couldn't be loaded
Description
“gtag.js couldn’t be loaded”
Expected behavior
Is should load the gtag.js library.
Actual behavior
“gtag.js couldn’t be loaded”
Environment
Using vue-gtag version 1.1.2.
- Operating system: Mac OS 10.15.2 (19C57)
- Browser and version: Google Chrome 79.0.3945.130
Reproducible Demo
Created empty vue project with vue create
, added vue-gtag by using yarn add vue-gtag
main.ts
Vue.use(VueGtag, {
config: { id: 'GTM-XXXXXX' },
});
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (8 by maintainers)
@MatteoGabriele - GTM ID does work. As a data analyst, if you have the “Preview” panel open at the bottom of the screen, it will throw the error in the console. Tell others to make sure that they close the Preview panel.
I was actually able to get it to load. My issue, having encountered the same error, was that I had not “published” the tag manager workspace related to the GTM ID that I was using. Once I published it, it started loading fine.