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 settings requested on every dashboard page load when not active #5091

Closed
aaemnnosttv opened this issue Apr 14, 2022 · 3 comments
Closed
Labels
Module: Analytics Google Analytics module related issues P1 Medium priority Type: Bug Something isn't working

Comments

@aaemnnosttv
Copy link
Collaborator

aaemnnosttv commented Apr 14, 2022

Bug Description

Currently when visiting the main dashboard when Analytics is not active, an additional request is being made to the server for the module's settings. This is due to settings only being preloaded for active modules, and is coming from the search funnel widget's Footer which includes selects for Analytics deep links. This in turn uses selects internally for the various IDs needed to construct the service URL which triggers the settings to be fetched. Normally this happens the same way when Analytics is active, it's only that the settings are preloaded so it wouldn't result in an actual request to the server when selected on load.

Steps to reproduce

  1. Visit the SK dashboard with Analytics inactive
  2. See a network request to google-site-kit/v1/modules/analytics/data/settings

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

Acceptance criteria

  • Analytics settings should not be requested from the server when viewing the dashboard when the module is inactive

Implementation Brief

  • Split the Footer component of the Search Funnel widget into separate inner components for Analytics and Search Console. Only render one or the other (as today) based on the service identified by the selected metric. This fixes the problem by only running the selectors needed for the specific URL we're generating, rather than always generating all URLs.
  • Finish? and merge Split service source URL links into separate components. #5093

Test Coverage

  • No new/updated coverage needed

QA Brief

  • Loading the SK dashboard should never trigger a network request for Analytics settings (or any module's settings for that matter)

Changelog entry

  • Avoid an unnecessary network request for Analytics settings on the Site Kit dashboard when Analytics is not active.
@aaemnnosttv aaemnnosttv added Type: Bug Something isn't working P1 Medium priority Module: Analytics Google Analytics module related issues labels Apr 14, 2022
@aaemnnosttv aaemnnosttv self-assigned this Apr 14, 2022
@aaemnnosttv aaemnnosttv removed their assignment Apr 14, 2022
@eugene-manuilov eugene-manuilov self-assigned this Apr 15, 2022
@eugene-manuilov
Copy link
Collaborator

IB ✔️

@eugene-manuilov eugene-manuilov removed their assignment Apr 15, 2022
@aaemnnosttv aaemnnosttv self-assigned this Apr 15, 2022
@aaemnnosttv aaemnnosttv removed their assignment Apr 26, 2022
@aaemnnosttv
Copy link
Collaborator Author

I believe this issue is responsible for some instability in E2E as well:
image

@wpdarren
Copy link
Collaborator

QA Update: ✅

Verified:

  • Confirmed the issue as reported to see the network request google-site-kit/v1/modules/analytics/data/settings
  • Loading the SK dashboard does not trigger a network request for any module's settings.
  • Disconnected Analytics, AdSense and PageSpeed and made sure no request was made.
  • Tested this on the main and entity dashboard.
Screenshots

image
image

@wpdarren wpdarren removed their assignment Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Analytics Google Analytics module related issues P1 Medium priority Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants