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 appearing in zero data state for new analytics property. #8023

Closed
1 task done
mohitwp opened this issue Jan 3, 2024 · 8 comments
Closed
1 task done

Analytics appearing in zero data state for new analytics property. #8023

mohitwp opened this issue Jan 3, 2024 · 8 comments
Labels
Module: Analytics Google Analytics module related issues P1 Medium priority Type: Bug Something isn't working

Comments

@mohitwp
Copy link
Collaborator

mohitwp commented Jan 3, 2024

Bug Description

I set up site kit with analytics a/c property which have data. After that I created new property for the same account. As per QAB when I create new property then Analytics should appear in gathering data state. But, in my test I created 3 new properties but for all of them Analytics appearing in zero data state on main dashboard.

Steps to reproduce

  1. Connect Analytics with property having data.
  2. Go to Analytics settings.
  3. Create new property.
  4. Go to Main Dashboard.
  5. See that analytics is appearing in zero data state.
  6. Expected: Analytics should appear in gathering data state.

Screenshots

Recording.706.mp4

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

Acceptance criteria

  • When a new Analytics property is created and connected (with no data) after a previous property with data was connected, it should appear in a gathering data state, not a zero data state.

Implementation Brief

Test Coverage

  • Update assets/js/modules/analytics-4/datastore/report.test.js, add a new test case under isGatheringData to cover that it should return false if propertyCreateTime is 0 - not set yet

QA Brief

  • Follow the "Steps to reproduce" above.

Changelog entry

  • Fix bug that caused new Analytics properties to appear as "zero data" instead of "gathering data".
@mohitwp mohitwp added Type: Bug Something isn't working Module: Analytics Google Analytics module related issues labels Jan 3, 2024
@bethanylang bethanylang added the P0 High priority label Jan 3, 2024
@tofumatt tofumatt self-assigned this Jan 3, 2024
@bethanylang bethanylang added P1 Medium priority and removed P0 High priority labels Jan 3, 2024
@bethanylang
Copy link
Collaborator

@nfmohit Just checking in to see if you're able to do some testing on this as discussed in stand-up? Thanks! cc @ivonac4

@nfmohit nfmohit self-assigned this Jan 10, 2024
@nfmohit
Copy link
Collaborator

nfmohit commented Jan 10, 2024

Just co-assigned myself and I will look into this later today, thank you @bethanylang !

@tofumatt tofumatt removed their assignment Jan 10, 2024
@bethanylang bethanylang assigned zutigrm and unassigned nfmohit Jan 17, 2024
@zutigrm zutigrm removed their assignment Jan 18, 2024
@techanvil techanvil self-assigned this Jan 19, 2024
@techanvil
Copy link
Collaborator

techanvil commented Jan 19, 2024

Hi @zutigrm, thanks for drafting the IB. One thing - we generally return undefined from a selector to indicate the state is still loading. In the case where propertyCreateTime is 0 the implication is that is has loaded with its default value.

That being the case it would be preferable to return a defined value e.g. false. However, I do also recognise that we might need to treat this as a special case if we do explicitly need it.

If you've already explored the option of using false, and returning undefined in this scenario is the only viable fix without a more extensive refactor, so be it. I just want to confirm whether that's the case.

@techanvil techanvil assigned zutigrm and unassigned techanvil Jan 19, 2024
@zutigrm
Copy link
Collaborator

zutigrm commented Jan 19, 2024

Hi @techanvil

Basically both are working, idea behind returning undefined was to simulate loading, as when 0 default value is returned, it should wait for the value to be retrieved, instead of returning definitive state.

What do you think?

@techanvil
Copy link
Collaborator

Hmmm...

I think that I'd go with returning false if that's an option, because the additional loading of the property is outside of the scope of selectDataAvailability() - all this knows is that the current state is loaded or not, so if the external logic changes we might end up in a perpetual "loading" state even if the data is actually loaded. If there's a clear advantage to taking the "simulated loading" approach then we should go with it, but all things being equal I'd stick with returning a defined value to adhere to our conventions and avoid the potential for an incorrect loading state. If that makes sense?

@techanvil techanvil assigned zutigrm and unassigned zutigrm and techanvil Jan 19, 2024
@zutigrm
Copy link
Collaborator

zutigrm commented Jan 19, 2024

@techanvil Thank you. It does makes sense. IB updated

@zutigrm zutigrm assigned techanvil and unassigned zutigrm Jan 19, 2024
@techanvil
Copy link
Collaborator

Great, thanks @zutigrm. IB LGTM. ✅

@techanvil techanvil removed their assignment Jan 19, 2024
@benbowler benbowler self-assigned this Jan 19, 2024
@benbowler benbowler removed their assignment Jan 26, 2024
@zutigrm zutigrm assigned zutigrm and unassigned zutigrm Jan 26, 2024
@tofumatt tofumatt assigned tofumatt and unassigned tofumatt Jan 29, 2024
@wpdarren wpdarren self-assigned this Jan 30, 2024
@wpdarren
Copy link
Collaborator

QA Update: ✅

Verified:

  • When a new Analytics property is created and connected (with no data) after a previous property with data was connected, the dashboard appears in a gathering data state, not a zero data state.
  • I completed additional testing around the scenario with 2nd admin user to ensure gathering state appeared.
  • Also checked that the entity and view only dashboards appeared as gathering state.

image

@wpdarren wpdarren removed their assignment Jan 30, 2024
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

9 participants