Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.6.3 seems to stop reporting data #144

Closed
mattias-persson opened this issue Jun 16, 2020 · 14 comments · Fixed by #145
Closed

1.6.3 seems to stop reporting data #144

mattias-persson opened this issue Jun 16, 2020 · 14 comments · Fixed by #145

Comments

@mattias-persson
Copy link

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:

  1. Operating system: MacOS 10.15.5
  2. Browser and version: Chrome 83.0.4103.97
@MatteoGabriele
Copy link
Owner

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

@MatteoGabriele
Copy link
Owner

I have to admit: gtag.js documentation is still quite mysterious sometimes. they could have done a better job. especially for SPA

MatteoGabriele added a commit that referenced this issue Jun 16, 2020
add config at start and config at pageview instead of page_view event

closes #144
closes #143
MatteoGabriele added a commit that referenced this issue Jun 16, 2020
add config at start and config at pageview instead of page_view event

closes #144
closes #143
@MatteoGabriele
Copy link
Owner

🎉 This issue has been resolved in version 1.6.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@shumiyao
Copy link

@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.

@MatteoGabriele
Copy link
Owner

@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

@shumiyao
Copy link

shumiyao commented Oct 13, 2020

@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?

@MatteoGabriele
Copy link
Owner

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

@shumiyao
Copy link

Sure. I will try by this evening.

@MatteoGabriele
Copy link
Owner

thanks a lot for you help @shumiyao
really appreciated

@shumiyao
Copy link

@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:

Screen Shot 2020-10-13 at 12 55 48 PM

@MatteoGabriele
Copy link
Owner

@shumiyao but the &l={DATALAYER_NAME} is supported by the official documentation https://developers.google.com/gtagjs/devguide/datalayer#rename

@shumiyao
Copy link

@MatteoGabriele

That was the only difference I could find between different versions. Any chance that we could suppress the DATALAYER_NAME?

@MatteoGabriele
Copy link
Owner

I will have a look later. Thanks for your debugging

@shumiyao
Copy link

@MatteoGabriele
I did not do anything at all. Thank you for your attention and your time. Have a nice day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants