-
Notifications
You must be signed in to change notification settings - Fork 279
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
"Issue accessing data" notice appear when Analytics is added #12
Comments
@jamesozzie |
Sorry I wasn't made myself clear. And that blocked script execution is expected behavior since it's an iframe to check existing analytics/adsense tag from the front end. Although we have a plan to improve that in the future. I'm more interested with the error you see in your developer console. seems like your GCP project has unknown issue. I would suggest these following steps:
let me know if that works for you or not. |
There are no errors from the main Site Kit dashboard for that notice to appear, see below. Also it works fine with no errors or "issue accessing data" using an alternative Google account, exact same steps once I reset Sit Kit. (Creating GCP Project and verifying / connecting Analytics module from that same account). Once I reset Sit Kit again the same problem arises when I use the initial account I used when logging this issue Using same browser, same procedure and incognito. |
@jamesozzie Yes we are moving in the right direction. And I would like to see from the preview tab, example: and if you can expand the one that has error "InsufficientPermission" |
The response from that request is below: {"search-console::sc-site-analytics::last-28-days::d41d8cd98f00b204e9800998ecf8427e":[{"clicks":0,"ctr":0,"impressions":3,"keys":["2019-05-27"],"position":8.333333333333332},{"clicks":0,"ctr":0,"impressions":3,"keys":["2019-06-04"],"position":59.333333333333336},{"clicks":0,"ctr":0,"impressions":1,"keys":["2019-06-17"],"position":79},{"clicks":0,"ctr":0,"impressions":1,"keys":["2019-06-16"],"position":15},{"clicks":0,"ctr":0,"impressions":1,"keys":["2019-05-26"],"position":92},{"clicks":0,"ctr":0,"impressions":1,"keys":["2019-06-14"],"position":83},{"clicks":0,"ctr":0,"impressions":1,"keys":["2019-05-31"],"position":1},{"clicks":0,"ctr":0,"impressions":1,"keys":["2019-06-12"],"position":8},{"clicks":0,"ctr":0,"impressions":1,"keys":["2019-06-03"],"position":94},{"clicks":0,"ctr":0,"impressions":1,"keys":["2019-06-06"],"position":3}],"search-console::search-keywords-sort-by-impressions::last-28-days::d41d8cd98f00b204e9800998ecf8427e":[{"clicks":0,"ctr":0,"impressions":2,"keys":["amp accordion"],"position":75},{"clicks":0,"ctr":0,"impressions":2,"keys":["dfdsfds"],"position":81}],"analytics::traffic-sources::last-28-days::d41d8cd98f00b204e9800998ecf8427e":[{"nextPageToken":null,"columnHeader":{"dimensions":["ga:medium"],"metricHeader":{"metricHeaderEntries":[{"name":"Sessions","type":"INTEGER"},{"name":"Users","type":"INTEGER"},{"name":"New Users","type":"INTEGER"}]}},"data":{"dataLastRefreshed":null,"isDataGolden":null,"rowCount":3,"samplesReadCounts":null,"samplingSpaceSizes":null,"rows":[{"dimensions":["(none)"],"metrics":[{"values":["49","44","44"]}]},{"dimensions":["organic"],"metrics":[{"values":["20","17","17"]}]},{"dimensions":["referral"],"metrics":[{"values":["11","10","9"]}]}],"totals":[{"values":["80","71","70"]}],"minimums":[{"values":["11","10","9"]}],"maximums":[{"values":["49","44","44"]}]}}],"analytics::overview::last-28-days::d41d8cd98f00b204e9800998ecf8427e":[{"nextPageToken":null,"columnHeader":{"dimensions":null,"metricHeader":{"metricHeaderEntries":[{"name":"Users","type":"INTEGER"},{"name":"Sessions","type":"INTEGER"},{"name":"Bounce Rate","type":"PERCENT"},{"name":"Average Session Duration","type":"TIME"},{"name":"Goal Completions","type":"INTEGER"},{"name":"Pageviews","type":"INTEGER"}]}},"data":{"dataLastRefreshed":null,"isDataGolden":null,"rowCount":1,"samplesReadCounts":null,"samplingSpaceSizes":null,"rows":[{"dimensions":null,"metrics":[{"values":["71","80","78.75","39.25","0","114"]},{"values":["116","122","81.14754098360656","28.852459016393443","0","177"]}]}],"totals":[{"values":["71","80","78.75","39.25","0","114"]},{"values":["116","122","81.14754098360656","28.852459016393443","0","177"]}],"minimums":[{"values":["71","80","78.75","39.25","0","114"]},{"values":["116","122","81.14754098360656","28.852459016393443","0","177"]}],"maximums":[{"values":["71","80","78.75","39.25","0","114"]},{"values":["116","122","81.14754098360656","28.852459016393443","0","177"]}]}}],"analytics::site-analytics::last-28-days::d41d8cd98f00b204e9800998ecf8427e":[{"nextPageToken":null,"columnHeader":{"dimensions":["ga:date"],"metricHeader":{"metricHeaderEntries":[{"name":"Sessions","type":"INTEGER"},{"name":"Users","type":"INTEGER"},{"name":"Bounce Rate","type":"PERCENT"},{"name":"Average Session Duration","type":"TIME"},{"name":"Goal Completions","type":"INTEGER"}]}},"data":{"dataLastRefreshed":null,"isDataGolden":null,"rowCount":55,"samplesReadCounts":null,"samplingSpaceSizes":null,"rows":[{"dimensions":["20190426"],"metrics":[{"values":["2","2","50.0","91.0","0"]}]},{"dimensions":["20190427"],"metrics":[{"values":["2","2","100.0","0.0","0"]}]},{"dimensions":["20190428"],"metrics":[{"values":["3","3","66.66666666666666","12.666666666666666","0"]}]},{"dimensions":["20190429"],"metrics":[{"values":["1","1","100.0","0.0","0"]}]},{"dimensions":["20190430"],"metrics":[{"values":["1","1","100.0","0.0","0"]}]},{"dimensions":["20190501"],"metrics":[{"values":["1","1","100.0","0.0","0"]}]},{"dimensions":["20190502"],"metrics":[{"values":["2","2","50.0","25.0","0"]}]},{"dimensions":["20190503"],"metrics":[{"values":["3","3","100.0","0.0","0"]}]},{"dimensions":["20190504"],"metrics":[{"values":["4","4","50.0","188.25","0"]}]},{"dimensions":["20190505"],"metrics":[{"values":["2","2","100.0","0.0","0"]}]},{"dimensions":["20190506"],"metrics":[{"values":["2","2","100.0","0.0","0"]}]},{"dimensions":["20190507"],"metrics":[{"values":["54","54","96.29629629629629","3.5925925925925926","0"]}]},{"dimensions":["20190508"],"metrics":[{"values":["3","2","33.33333333333333","24.333333333333332","0"]}]},{"dimensions":["20190509"],"metrics":[{"values":["3","3","33.33333333333333","152.66666666666666","0"]}]},{"dimensions":["20190510"],"metrics":[{"values":["5","5","40.0","92.4","0"]}]},{"dimensions":["20190511"],"metrics":[{"values":["3","3","66.66666666666666","12.333333333333334","0"]}]},{"dimensions":["20190512"],"metrics":[{"values":["1","1","100.0","0.0","0"]}]},{"dimensions":["20190513"],"metrics":[{"values":["2","2","0.0","119.5","0"]}]},{"dimensions":["20190514"],"metrics":[{"values":["2","2","50.0","80.5","0"]}]},{"dimensions":["20190515"],"metrics":[{"values":["6","6","100.0","0.0","0"]}]},{"dimensions":["20190516"],"metrics":[{"values":["1","1","100.0","0.0","0"]}]},{"dimensions":["20190517"],"metrics":[{"values":["4","3","100.0","0.0","0"]}]},{"dimensions":["20190518"],"metrics":[{"values":["3","3","0.0","279.3333333333333","0"]}]},{"dimensions":["20190519"],"metrics":[{"values":["2","2","50.0","0.0","0"]}]},{"dimensions":["20190520"],"metrics":[{"values":["1","1","100.0","0.0","0"]}]},{"dimensions":["20190521"],"metrics":[{"values":["2","2","100.0","0.0","0"]}]},{"dimensions":["20190522"],"metrics":[{"values":["1","1","100.0","0.0","0"]}]},{"dimensions":["20190523"],"metrics":[{"values":["4","4","75.0","8.75","0"]}]},{"dimensions":["20190524"],"metrics":[{"values":["2","2","100.0","0.0","0"]}]},{"dimensions":["20190525"],"metrics":[{"values":["4","4","100.0","0.0","0"]}]},{"dimensions":["20190526"],"metrics":[{"values":["2","2","50.0","24.0","0"]}]},{"dimensions":["20190527"],"metrics":[{"values":["3","3","66.66666666666666","0.6666666666666666","0"]}]},{"dimensions":["20190528"],"metrics":[{"values":["1","1","100.0","0.0","0"]}]},{"dimensions":["20190529"],"metrics":[{"values":["4","4","50.0","50.5","0"]}]},{"dimensions":["20190531"],"metrics":[{"values":["2","2","100.0","0.0","0"]}]},{"dimensions":["20190601"],"metrics":[{"values":["3","3","100.0","0.0","0"]}]},{"dimensions":["20190602"],"metrics":[{"values":["4","4","75.0","10.5","0"]}]},{"dimensions":["20190603"],"metrics":[{"values":["2","2","100.0","0.0","0"]}]},{"dimensions":["20190604"],"metrics":[{"values":["2","2","100.0","0.0","0"]}]},{"dimensions":["20190605"],"metrics":[{"values":["1","1","100.0","0.0","0"]}]},{"dimensions":["20190606"],"metrics":[{"values":["2","2","50.0","2.5","0"]}]},{"dimensions":["20190607"],"metrics":[{"values":["7","5","85.71428571428571","24.428571428571427","0"]}]},{"dimensions":["20190608"],"metrics":[{"values":["4","4","75.0","182.5","0"]}]},{"dimensions":["20190609"],"metrics":[{"values":["6","6","100.0","0.0","0"]}]},{"dimensions":["20190610"],"metrics":[{"values":["3","2","66.66666666666666","6.0","0"]}]},{"dimensions":["20190611"],"metrics":[{"values":["6","6","83.33333333333334","5.666666666666667","0"]}]},{"dimensions":["20190612"],"metrics":[{"values":["4","4","75.0","408.25","0"]}]},{"dimensions":["20190613"],"metrics":[{"values":["4","4","75.0","0.25","0"]}]},{"dimensions":["20190614"],"metrics":[{"values":["3","3","100.0","0.0","0"]}]},{"dimensions":["20190615"],"metrics":[{"values":["3","3","100.0","0.0","0"]}]},{"dimensions":["20190616"],"metrics":[{"values":["2","2","50.0","17.0","0"]}]},{"dimensions":["20190617"],"metrics":[{"values":["2","2","50.0","11.0","0"]}]},{"dimensions":["20190618"],"metrics":[{"values":["1","1","0.0","36.0","0"]}]},{"dimensions":["20190619"],"metrics":[{"values":["1","1","100.0","0.0","0"]}]},{"dimensions":["20190620"],"metrics":[{"values":["2","2","0.0","81.0","0"]}]}],"totals":[{"values":["200","195","80.0","33.3","0"]}],"minimums":[{"values":["0","0","0.0","0.0","0"]}],"maximums":[{"values":["54","54","100.0","408.25","0"]}]}}],"analytics::goals::last-28-days::d41d8cd98f00b204e9800998ecf8427e":{"errors":{"403":["User does not have permission to perform this operation."]},"error_data":{"403":{"status":500,"reason":"insufficientPermissions"}}},"analytics::top-pages::last-28-days::d41d8cd98f00b204e9800998ecf8427e":[{"nextPageToken":"10","columnHeader":{"dimensions":["ga:pagePath","ga:pageTitle"],"metricHeader":{"metricHeaderEntries":[{"name":"Pageviews","type":"INTEGER"},{"name":"Unique Pageviews","type":"INTEGER"},{"name":"Bounce rate","type":"PERCENT"}]}},"data":{"dataLastRefreshed":null,"isDataGolden":null,"rowCount":15,"samplesReadCounts":null,"samplingSpaceSizes":null,"rows":[{"dimensions":["/","Mobile DJ Gorey, Wexford Wedding DJ, Gorey Wedding DJ | Floorfillers"],"metrics":[{"values":["83","71","80.28169014084507"]}]},{"dimensions":["/contact","Floorfillers - Contact | Floorfillers"],"metrics":[{"values":["5","3","0.0"]}]},{"dimensions":["/weddings","Floorfillers - Weddings | Floorfillers"],"metrics":[{"values":["5","4","0.0"]}]},{"dimensions":["/about","Floorfillers - About | Floorfillers"],"metrics":[{"values":["4","2","0.0"]}]},{"dimensions":["/contact/make-a-payment","Floorfillers - Make a Payment | Floorfillers"],"metrics":[{"values":["3","2","0.0"]}]},{"dimensions":["/about/experience","Floorfillers - Experience | Floorfillers"],"metrics":[{"values":["2","2","100.0"]}]},{"dimensions":["/about/testimonials?fbclid=IwAR3ADZ9ojuakA7QrPTr1fLPpK71RfS7PNkSdVyoraJmDXg4PXf6fFseTB90","Floorfillers - Testimonials | Floorfillers"],"metrics":[{"values":["2","1","0.0"]}]},{"dimensions":["/index.php/weddings","Floorfillers - Weddings | Floorfillers"],"metrics":[{"values":["2","1","0.0"]}]},{"dimensions":["/weddings/wedding-packages","Floorfillers - Wedding Packages | Floorfillers"],"metrics":[{"values":["2","2","100.0"]}]},{"dimensions":["/?fbclid=IwAR0DrEE9Un2JW3E17_3bURDVrnU4XmW0n8r6f68MJaB6-GRQsoa71XrKXRg","Floorfillers - Home | Floorfillers"],"metrics":[{"values":["1","1","100.0"]}]}],"totals":[{"values":["114","94","78.75"]}],"minimums":[{"values":["1","1","0.0"]}],"maximums":[{"values":["83","71","100.0"]}]}}]} |
@jamesozzie I'll work on this. |
@felixarntz / @adamsilverstein Technical implementation: |
@jamesozzie |
It's not a shared Google analytics account, but I do have 2FA setup, with a notice going to my phone to approve ("Yes, that was me"). Would that have any effect during initial setup - if I didn't notice on my phone. |
@jamesozzie |
@ivankristianto It worked for me fine that time. I will check on other sites too and report if I see the same issue arising. |
@ivankristianto Just to let you know I am unable to reproduce the issue using your fix. |
Thanks @jamesozzie Please ensure you are in new tab so you won't hit browser cache. |
Same there.. :) |
@ivankristianto Regarding implementation brief:
Why does it need extra handling?
The code there still adds the reauth notification - that shouldn't be there as the acceptance criteria say. The server already handles any mismatch in OAuth scopes, which is the sole purpose of the |
Because in most cases when an API returns the In the case of Analytics however, even when the user has the correct scopes, they may not have access to view Goals (not 100% certain how to reproduce this state - probably by sharing read access to a property or view. Goals are created by users and can be shared). In this case, the API returns the same Moving the error check from
Ah, I assume you are referring to here: site-kit-wp/assets/js/components/notifications/index.js Lines 33 to 39 in 9a262cd
So the handling of . |
@felixarntz & @adamsilverstein
Same with Adam, since the response data back from the Analytics API when getting a goal return
Yes I agree on this. And we still need to handle |
@adamsilverstein - Can I assign this one back over to you to update the implementation brief, based on Ivan and Felix's latest comments? |
@lilybonney yep - I'll get that updated |
Implementation brief looks good now! |
Assigning this back to @jamesozzie as this is not something we are able to reproduce on our end. Even with read-only permissions for Analytics using a shared account, the goals still comes back from the API without any error for insufficient permissions. |
Closing as issue no longer persists |
This fix is coming in 1.0.3? I currently have this problem with 1.0.2. I then installed the version from here, the "Issue accessing data" notice disappeared, but all reports are saying "data is not yet available, please check back later" except for one which says "Data error in Analytics - Your account does not have permission to perform this operation.". No JS console errors. The initial XHR request after page load still responds with If you could post 1.0.3 zip with that fix I can test with that. |
Any update? |
@ktmn In relation to your error can you try the following:
If the above fails to resolve your issue can you please share the following:
As you are encountering a 403 error you might also want to check your Analytics account, and ensure there are no access issues with the site being connected to Site Kit. |
I'm also still experiencing this issue with version 1.0.5 I tried your suggestions above but it hasn't helped. There is only one console error: 'Deprecation warning: use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.' My Site Health info is listed below without live urls and I have no security plugins installed. I also tried disabling my Litespeed Cache plugin as suggested above. ` wp-coreversion: 5.2.2 wp-paths-sizeswordpress_path: /home/folder/domain.co.uk wp-dropins (1)advanced-cache.php: true wp-active-themename: Domain wp-themes (1)GeneratePress: version: 2.3.2, author: Tom Usborne wp-plugins-active (21)Advanced Custom Fields: version: 5.8.3, author: Elliot Condon wp-plugins-inactive (1)Search & Filter Pro: version: 2.4.5, author: Code Amp wp-mediaimage_editor: WP_Image_Editor_Imagick wp-serverserver_architecture: Linux 3.10.0-714.10.2.lve1.4.65.el7.x86_64 x86_64 wp-databaseextension: mysqli wp-constantsWP_HOME: undefined wp-filesystemwordpress: writable ` Also it appears to be pulling in data from a different site as the figures don't match my actual analytics and article titles are not from my site. Any help appreciated. |
Any help would be appreciated. |
@andydesigns Apologies for the delay. I don't see anything immediately in relation to your setup or plugins that could be causing this problem, although I am not familiar with all the plugins. While having the Tag Manager script setup on the site shouldn't impact the Site Kit setup you could have some containers with code inserted which could potentially impact reporting. Can you try the following:
If the above fails do you have another site on the same web host which you check Site Kit setup with? |
Analytics data is not yet available, please check back later. |
Describe the bug
After successfully connecting an Analytics account (using the same Google account OAuth which to verify the setup) an "Issue accessing data" notice appears.
While Analytics reporting in the dashboard is fine there the notice remains and trying to re authenticate your account via the button in the notice doesn't solve the issue, the notice reappears.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Notice should not appear
System information:
Additional context
Another report of same issue from this issue: #1
Site Kit data module check:
https://github.com/google/site-kit-wp/blob/develop/assets/js/components/data.js#L275-L280
insufficientPermission
is because of oauth scopes, which happen in most of the cases.In this case the
insufficientPermission
is because user doesn't have access to the Analytics Goals.Preliminary work here:
https://github.com/google/site-kit-wp/compare/fix/insufficient-permission?expand=1
Do not alter or remove anything below. The following sections will be managed by moderators only.
Changelog entry
Acceptance criteria
Implementation Brief
Remove the
insufficientPermission
error check from the data module. insufficient scope check already in place elsewhere.Handle
insufficientPermission
error specifically inAnalyticsDashboardWidgetTopLevel
componentsite-kit-wp/assets/js/modules/analytics/dashboard/dashboard-widget-top-level.js
Line 362 in 9a262cd
insufficientPermission
show a CTA that the user cannot access Goals.The text was updated successfully, but these errors were encountered: