You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Site goals only appears under view-only user when granted with Analytics access.
There is a bug whereby I only granted a user access to SC and not GA and the intro banner for Site Goals would appear.
Explanation in the attached video:
Install and activate the Site Kit plugin on a WordPress site.
Complete the Site Kit setup as an admin and connect Google Analytics and Search Console.
Go to the WordPress user management and create or select a view-only user.
Grant the view-only user access to Search Console only — do NOT grant Google Analytics access.
Log in as the view-only user.
Navigate to the Site Kit dashboard.
Observe that the Site Goals intro banner is displayed, even though the user does not have Google Analytics access.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
For a view only user, the Site Goals widget, the introduction banner, and Site Goals selection panel should only be rendered when the user has dashboard sharing access to the Analytics module.
This is in addition to the already existing conditions to render the widget (i.e. availability of detected events, etc)
Implementation Brief
Update assets/js/components/DashboardMainApp.js to gate the site goals rendering block with the existing hasAnalyticsAccess check
Currently the site goals block (SiteGoalsSelectionPanel + SiteGoalsIntroModalBanner) is gated only by siteGoalsEnabled. Wrap it additionally with hasAnalyticsAccess - the same guard already used for the audience segmentation panel via hasAccessToShareableModule( MODULE_SLUG_ANALYTICS_4 )
This guards both the intro modal banner AND the selection panel in one place
Test Coverage
No updates needed
QA Brief
Install and activate Site Kit plugin.
Complete the Site Kit setup as an admin and connect Google Analytics and Search Console.
Set up Dashboard sharing and grant view-only access to Search Console only — do NOT grant Google Analytics access (for any user group, but the user created below should be a part of that role).
Create a user with the above role, then sign in as view-only user to Site Kit.
Log in as the view-only user.
Navigate to the Site Kit dashboard.
The Site Goals intro banner should NOT be displayed.
Changelog entry
Fix Site Goals intro banner issue when the banner shows up to users with no GA access.
Bug Description
Site goals only appears under view-only user when granted with Analytics access.
There is a bug whereby I only granted a user access to SC and not GA and the intro banner for Site Goals would appear.
Explanation in the attached video:
12577.-.View.only.has.modal.when.should.not.not.ok.mov
Steps to reproduce
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
assets/js/components/DashboardMainApp.jsto gate the site goals rendering block with the existinghasAnalyticsAccesscheckSiteGoalsSelectionPanel+SiteGoalsIntroModalBanner) is gated only bysiteGoalsEnabled. Wrap it additionally withhasAnalyticsAccess- the same guard already used for the audience segmentation panel viahasAccessToShareableModule( MODULE_SLUG_ANALYTICS_4 )Test Coverage
QA Brief
Changelog entry