Closed mattias-persson closed 4 years ago
I think that I know why. there was this complain of an extra hit on load all the time so I removed it from the bootstrap, but then I saw that the library method $gatg.pageview
is using gtag page_view
event which doesn't send the ID on hit.
I will look into it asap
thanks for the feedback
I have to admit: gtag.js documentation is still quite mysterious sometimes. they could have done a better job. especially for SPA
:tada: This issue has been resolved in version 1.6.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
@MatteoGabriele
Hasn't this issue recurred with recent versions including vue-gtag 1.9.1?
I found out that https://www.google-analytics.com/j/collect?v=1&_...
does not get loaded with the version 1.9.1 while specifying the version to 1.6.4 in the package.json allows the collect
script to be loaded.
The collect script seems to be necessary for the Google Analytics Realtime report to work.
@shumiyao I'm not sure about that script there, but there's nothing indicating the need to load a second script while bootstrapping gtag.js
@MatteoGabriele
Thank you very much for a response.
We do not need to load the "collect" script at all. It is loaded automatically when we load https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-XX
The access to collect script is not requested when I use the latest of 1.9.1 but it works when I specify the vue-gtag version of 1.6.4. Can it be related to vue-gtag?
still not quite sure, but 6 new version have been published after 1.6.4, can you identify after which one this stops working for you, then will be easier to identify a possible cause of this malfunctioning
Sure. I will try by this evening.
thanks a lot for you help @shumiyao really appreciated
@MatteoGabriele
I compared outputs between 1.64 and all other 5 versions. All the version after 1.7.0 do not seem to work with the Google Analytics.
The only differences I could find were whether 2&l=dataLayer
is included in the url (www.googletagmanager.com/gtag/js?) or not:
@shumiyao but the &l={DATALAYER_NAME}
is supported by the official documentation https://developers.google.com/gtagjs/devguide/datalayer#rename
@MatteoGabriele
That was the only difference I could find between different versions. Any chance that we could suppress the DATALAYER_NAME
?
I will have a look later. Thanks for your debugging
@MatteoGabriele I did not do anything at all. Thank you for your attention and your time. Have a nice day!
Description
Upgrading from 1.6.2 to 1.6.3 completely stopped the reporting of data.
Expected behavior
Data should be reported as before.
Actual behavior
The analytics dashboard reports 0 active people and 0 events in real time.
Environment
Run this command in the project folder and fill in their results:
npm ls vue-gtag
:Then, specify: