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

Add which dashboard is in use to Site Health Information #7119

Closed
adamdunnage opened this issue Jun 1, 2023 · 2 comments
Closed

Add which dashboard is in use to Site Health Information #7119

adamdunnage opened this issue Jun 1, 2023 · 2 comments
Labels
Good First Issue Good first issue for new engineers Module: Analytics Google Analytics module related issues P1 Medium priority Type: Enhancement Improvement of an existing feature Type: Support Support request

Comments

@adamdunnage
Copy link
Collaborator

adamdunnage commented Jun 1, 2023

Feature Description

As discussed previously with @aaemnnosttv it would be useful for the support team to be able to see which version of the dashboard users have activated via the users Site Health Information after GA4 reporting rollout.

This is currently displayed with a label on the dashboard to users but would be even more helpful for troubleshooting and save some time to have this information in Site Health.

Add a dashboard section to the Site Health Info specifying if the user is using the UA or GA4 dashboard.

Acceptance criteria

  • The Analytics dashboard view setting should be exposed in the module's debug data
    • The display values should be translatable strings, that match those shown in the DashboardViewIndicator
    • The debug value should be the raw setting value
  • The field should only be present if ga4Reporting is enabled
  • The field should be the first for the module, matching the order on the settings views

Implementation Brief

  • In includes/Modules/Analytics.php:
    • Update the get_debug_fields() method:
      • Instead of returning the array, assign it to a new variable, say $fields. Return $fields at the end.
      • Add a new key to the first of the array named analytics_dashboard_view. Similar to other items, its value should also be an array with the following items:
        • label: Analytics dashboard view (translatable).
        • value: If $settings['dashboardView'] is google-analytics-4, it should be Google Analytics 4 view. Otherwise, it should be Universal Analytics view. The string should be translatable.
        • debug: It should use the raw value of $settings['dashboardView'].
    • Before returning the $fields variable, check if the ga4Reporting feature flag is enabled (using Feature_Flags::enabled()). If not, unset the analytics_dashboard_view key from the $fields array.

Test Coverage

  • No tests need to be added/updated.

QA Brief

  • Site up Site Kit with Analytics, but without the ga4Reporting feature flag.
  • Go to WordPress Dashboard -> Tools -> Site Health -> Info. Verify that there is no information labelled Analytics dashboard view.
  • Activate the ga4Reporting feature flag.
  • Go to Site Health info again and verify that Analytics dashboard view exists and its value is Universal Analytics view.
  • From Analytics module settings or dashboard notification prompt, change the dashboard view to GA4.
  • Go to Site Health info again and verify that Analytics dashboard view exists and its value is Google Analytics 4 view.
  • For each of the above tests, verify that clicking Copy site info to clipboard copies the raw dashboard view value for the Analytics dashboard view setting, e.g. universal-analytics or google-analytics-4.

Changelog entry

  • Add the Analytics dashboard type to Site Health information.
@adamdunnage adamdunnage added Type: Support Support request Type: Enhancement Improvement of an existing feature Module: Analytics Google Analytics module related issues labels Jun 1, 2023
@aaemnnosttv aaemnnosttv added the P1 Medium priority label Jun 3, 2023
@aaemnnosttv aaemnnosttv removed their assignment Jun 6, 2023
@aaemnnosttv aaemnnosttv added the Good First Issue Good first issue for new engineers label Jun 6, 2023
@nfmohit nfmohit assigned nfmohit and unassigned nfmohit Jun 14, 2023
@tofumatt tofumatt self-assigned this Jun 15, 2023
@tofumatt
Copy link
Collaborator

IB ✅

@tofumatt tofumatt removed their assignment Jun 15, 2023
@nfmohit nfmohit self-assigned this Jun 16, 2023
@nfmohit nfmohit removed their assignment Jun 19, 2023
@nfmohit nfmohit assigned eugene-manuilov and unassigned nfmohit Jun 19, 2023
eugene-manuilov added a commit that referenced this issue Jun 20, 2023
…shboard-view

Add Analytics dashboard view to Site Health
@eugene-manuilov eugene-manuilov removed their assignment Jun 20, 2023
@wpdarren wpdarren self-assigned this Jun 20, 2023
@wpdarren
Copy link
Collaborator

QA Update: ✅

Verified:

  • When the GA4Reporting feature flag is disabled, the dashboard view does not appear in the Site Health info.
  • When the GA4Reporting feature flag is anbled:
    • In Site Health info Analytics dashboard view exists and its value is Universal Analytics view.
    • Change the dashboard view to GA4 and its value is Google Analytics 4 view.
  • For each of the above tests, when clicking Copy site info to clipboard copies the raw dashboard view value for the Analytics dashboard view setting, e.g. universal-analytics or google-analytics-4.
Screenshots

image
image
image
image

@wpdarren wpdarren removed their assignment Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good first issue for new engineers Module: Analytics Google Analytics module related issues P1 Medium priority Type: Enhancement Improvement of an existing feature Type: Support Support request
Projects
None yet
Development

No branches or pull requests

6 participants