Analytics module fails set up flow
Describe the bug The flow for setting the Analytics module fails to complete with a blank screen. To Reproduce Steps to reproduce the behavior:
- Activate Analytics module
Expected behavior
Displaying analytics properties selection

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
I'm having the same issue #3
@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!
Same here, tried in both firefox and Chrome. Neither will connect. Even deleted and tried readding it and it never connects to Google Analytics.
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 '
Search console works ok, but there is a Data error in Search Console Rate Limit Exceeded in some cases.
@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.
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
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.
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).
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!
@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:
- Authenticate Site Kit with Google Accounts that has only 1 GA account
- 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.