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

Fatal error on clicking engagement rate and unique visitor from search data when site is in zero data state. #6788

Closed
mohitwp opened this issue Mar 29, 2023 · 9 comments
Labels
P0 High priority Type: Bug Something isn't working

Comments

@mohitwp
Copy link
Collaborator

mohitwp commented Mar 29, 2023

Bug Description

When site is in zero data state and under GA4 dashboard view then on clicking "unique visitors from search" and Conversions data creates Fatal error on Main dashboard.
On entity dashboard, clicking on "unique visitors from search" and "engagement rate" creates a fatal error.

`Cannot read properties of null (reading '__eventTarget')

    in GoogleChart
    in div
    in Cell
    in div
    in Row
    in div
    in Grid
    in AnalyticsStats
    in div
    in div
    in Widget
    in WithWidgetSlug(Widget)
    in SearchFunnelWidgetGA4
    in GA4DashboardWidgetSwitcher
    in Component
    in WidgetRenderer
    in div
    in Cell
    in WidgetCellWrapper
    in div
    in Row
    in div
    in div
    in Grid
    in WidgetAreaRenderer
    in div
    in WidgetContextRenderer
    in DashboardMainApp
    in DashboardEntryPoint
    in RestoreSnapshots
    in ErrorHandler
    in ThemeProvider
    in StrictMode
    in Root`

Steps to reproduce

  1. Set up Site kit.
  2. Enable GA4reporting feature flag.
  3. Set the dashboard view to GA4 by executing the following in the browser console:
    googlesitekit.api.set('modules', 'analytics', 'settings', {'dashboardView': 'google-analytics-4'})
  4. Refresh main dashboard.
  5. Click on "unique visitors from search" under "Search traffic over the last 28 days" widget.
  6. See error.
  7. Check same on entity dashboard.

Screenshots

image

image

image

Additional Context

  • PHP Version:
  • OS: [e.g. iOS]
  • Browser: [e.g. chrome, safari]
  • Plugin Version: [e.g. 22]
  • Device: [e.g. iPhone6]

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

Acceptance criteria

  • No errors should arise from interacting with the selected Search Funnel metrics on the Site Kit dashboard, regardless of the zero or gathering state for either Search Console or Analytics

Implementation Brief

  • N/A.

Test Coverage

  • N/A.

QA Brief

  • Please retest, this should no longer occur.

Changelog entry

  • N/A.
@mxbclang mxbclang added Module: Analytics Google Analytics module related issues P0 High priority Type: Bug Something isn't working and removed Module: Analytics Google Analytics module related issues labels Mar 29, 2023
@techanvil
Copy link
Collaborator

It might be worth retesting this once the PR for #6623 has been merged...

@aaemnnosttv
Copy link
Collaborator

This looks like the same issue that we had in the UA version in #6587, it looks like the fix there didn't get ported to the GA4 version though as mentioned in the IB (https://github.com/google/site-kit-wp/pull/6606/files).

@aaemnnosttv aaemnnosttv self-assigned this Mar 31, 2023
@aaemnnosttv
Copy link
Collaborator

Taking a closer look here, this seems to be more about the zero state rather than gathering, which seems to work correctly. Could be #6623 is related here as well, but we can at least provide the AC.

@aaemnnosttv aaemnnosttv removed their assignment Mar 31, 2023
@mxbclang
Copy link

mxbclang commented Apr 3, 2023

FYI @eclarke1 I've scheduled this for Sprint 99 as we've flagged it as a known issue for Bug Bash: https://app.asana.com/0/1204237371873197/1204290577888659/f

@techanvil techanvil self-assigned this Apr 3, 2023
@techanvil
Copy link
Collaborator

I've checked this one, and can reproduce the error on current develop. Switching to the PR for #6623 does fix it. I'll hold off until that PR is merged, have another check and then send this over to QA for a confirmation.

@techanvil
Copy link
Collaborator

As the PR for #6623 has now been merged, I've checked this on develop and the error no longer occurs. Sending over to QA for a confirmation check.

@techanvil techanvil removed their assignment Apr 6, 2023
@aaemnnosttv
Copy link
Collaborator

Thanks @techanvil – once confirmed that this is no longer an issue, we can close this as a duplicate since nothing was actually done against this issue.

@mohitwp mohitwp self-assigned this Apr 7, 2023
@mohitwp
Copy link
Collaborator Author

mohitwp commented Apr 13, 2023

QA Update ⚠️

@techanvil @aaemnnosttv

I set up Analytics on InstaWP site. Verified analytics status after 2 days but still Analytics showing under gathering mode if dashboard view set to GA4. Can we determine in how many days Analytics move from gathering to zero data state by default in case of GA4 property ?
It will help us to determine if it is correct as per time set for GA4 property or it is a potential issue of analytics not moving from gathering to zero data state.

cc @wpdarren

image

image

@mohitwp
Copy link
Collaborator Author

mohitwp commented Apr 14, 2023

QA Update ✅

  • Tested on dev environment.
  • Verified on 3 day older site.
  • Now fatal error is not showing on clicking engagement rate and unique visitor from search data when site is in zero data state.
  • Verified on both main and entity dashboard.
Recording.316.mp4

@mohitwp mohitwp removed their assignment Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High priority Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants