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

Analytics module fails set up flow #11

Closed
amedina opened this issue Jun 20, 2019 · 10 comments · Fixed by #53
Closed

Analytics module fails set up flow #11

amedina opened this issue Jun 20, 2019 · 10 comments · Fixed by #53
Assignees
Labels
P0 High priority Type: Bug Something isn't working
Milestone

Comments

@amedina
Copy link

amedina commented Jun 20, 2019

Describe the bug
The flow for setting the Analytics module fails to complete with a blank screen.
To Reproduce
Steps to reproduce the behavior:

  1. Activate Analytics module

Expected behavior
Displaying analytics properties selection
Screen Shot 2019-06-20 at 4 27 36 PM

System Information (please complete the following information):

  • Browser: Chrome
  • Plugin Version: beta1

Do not alter or remove anything below. The following sections will be managed by moderators only.

Changelog entry

  • Fix analytics setup flow empty render for accounts with only shared properties or views.

Acceptance criteria

@ThierryA ThierryA added Type: Bug Something isn't working P0 High priority labels Jun 20, 2019
@eduardogoncalves
Copy link

I'm having the same issue #3

@ThierryA ThierryA added this to the Hot Fixes Release milestone Jun 20, 2019
@lucymtc
Copy link
Contributor

lucymtc commented Jun 21, 2019

@amedina the blocked script execution is expected behaviour, an iframe is used to check existing Analytics and AdSense tags from the front end and prevent scripts from running. It is planned to improve this in the future.

I am not able to reproduce the issue described. Can you provide information of the response to the request made to get-accounts in of the console > Network > filter with XHR only? Also, please make sure to clear sessionStorage before refreshing the page to make the request.
Thanks!

@forcedlogic
Copy link

Same here, tried in both firefox and Chrome. Neither will connect. Even deleted and tried readding it and it never connects to Google Analytics.

@PhotoWorkout
Copy link

Hello, same here: Analytics not showing after connecting to analytics account /trying to set up modules in the Site Kit > Analytics Dashboard.
Error message from chrome browser:

Blocked script execution in '' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.

Search console works ok, but there is a Data error in Search Console
Rate Limit Exceeded
in some cases.

@FuSan21
Copy link

FuSan21 commented Jun 23, 2019

@amedina @eduardogoncalves @forcedlogic @PhotoWorkout
The temporary fix for this seems to add the analytics tracking code in the website header. If it can find the analytics tracking code it shows it and tells that it will be replaced if you remove the old code. Just don't remove it and continue.

@PhotoWorkout
Copy link

Putting the analytics tracking code in the header worked fine to set up the site kit analytics module.
I have thereafter removed the code from the website header again since I am using google tag manager for injecting the tracking code. The Site Kit seems to work fine after removing the analytics code from the header. I assume it was just needed (once) for the initial activation, which worked just fine. Thanks

@FuSan21
Copy link

FuSan21 commented Jun 23, 2019

Putting the analytics tracking code in the header worked fine to set up the site kit analytics module.
I have thereafter removed the code from the website header again since I am using google tag manager for injecting the tracking code. The Site Kit seems to work fine after removing the analytics code from the header. I assume it was just needed (once) for the initial activation, which worked just fine. Thanks

Yeah it keeps the sitekit plugin activated alreight. But it doesn't fix the issue. If you remove the tracking code you won't be able to track any future visitors and only see old data in sitekit plugin.

@PhotoWorkout
Copy link

Thanks for letting me know about tracking future events (and that the tracking code needs to be in the header for that to happen). I have moved it back into the header and removed it from the tag manager.
It seems all to work fine, I just had to add my Content Groups via the tracking code (which was configured with the Google Tag manager before).

@lucymtc
Copy link
Contributor

lucymtc commented Jun 24, 2019

Hi, I have tested across different sites and still unable to reproduce, in order to help debug, can you provide:

List of other installed plugins
PHP version
WordPress version

Also can you verify the request to get-accounts is made in the Network tab of the console? if so, can you provide information of the response to this request? if there are any errors and the error message.
Thanks!

@ivankristianto
Copy link
Contributor

ivankristianto commented Jun 24, 2019

@lucymtc I can reproduce this issue and did trace it to these lines:
https://github.com/google/site-kit-wp/blob/develop/assets/js/modules/analytics/setup.js#L796-L798
that's causing the blank dropdown.

To reproduce:

  1. Authenticate Site Kit with Google Accounts that has only 1 GA account
  2. Activate GA service.

Consider to simplified these code blocks:
https://github.com/google/site-kit-wp/blob/develop/assets/js/modules/analytics/setup.js#L791-L814
and add more inline comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High priority Type: Bug Something isn't working
Projects
None yet
8 participants