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

Create GA4 ModulePopularPagesWidget #6219

Closed
aaemnnosttv opened this issue Nov 29, 2022 · 5 comments
Closed

Create GA4 ModulePopularPagesWidget #6219

aaemnnosttv opened this issue Nov 29, 2022 · 5 comments
Labels
Exp: SP P0 High priority Type: Enhancement Improvement of an existing feature

Comments

@aaemnnosttv
Copy link
Collaborator

aaemnnosttv commented Nov 29, 2022

Feature Description


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

Acceptance criteria

  • A new component ModulePopularPagesWidgetGA4 should be created based on the existing ModulePopularPagesWidget
  • The component should source its report data from the analytics-4 store
  • No changes should be made in the dashboard yet
  • Storybook stories should be added to cover the following cases (with and without a current entity URL set: example):
    • Loading
    • Gathering data ("Data unavailable")
    • Zero data (data available but metric is 0)
    • Error
    • Ready (data available and non-zero)

Implementation Brief

  • Once Add getReport selector for GA4 #6173 and Introduce factory for Analytics 4 response mock data #6174 have been merged.
  • Create assets/js/modules/analytics-4/components/module/ModulePopularPagesWidgetGA4.js which exports the ModulePopularPagesWidgetGA4 functional component.
    • Component should be similar to the one in assets/js/modules/analytics/components/module/ModulePopularPagesWidget with the following updates:
      • Extract the Header and Footer if needed as it's done for ModulePopularPagesWidget
      • Replace occurrences of the Analytics data store (MODULES_ANALYTICS) by the GA4 Analytics data store (MODULES_ANALYTICS_4) except for getServiceReportURL selector call.
      • Replace the metrics and dimensions by their GA4 counterparts as per the doc here, including the metric names.
    • Stories should be within assets/js/modules/analytics-4/components/module/ModulePopularPagesWidgetGA4.stories.js and make use of the Analytics 4 response mock data added from Introduce factory for Analytics 4 response mock data #6174
      • Refer to the AC for the different stories to be added.

Test Coverage

  • Add tests similar to assets/js/modules/analytics/components/module/ModulePopularPagesWidget/Footer.test.js

QA Brief

  • This is currently only testable in Storybook.
  • Check the stories under Analytics > Widgets > ModulePopularPagesWidgetGA4. These should be broadly in line with the existing UA version under Analytics Module > Components > Module Page > Popular Pages Widget, except with different data, and with the Engaged Sessions rather than Bounce Rate column.
  • PR Storybook (will be deleted when merged to develop).
  • develop Storybook.
  • main Storybook.

image

image

image

image

image

Changelog entry

  • Create the Analytics 4 version of the popular pages widget.
@aaemnnosttv aaemnnosttv self-assigned this Nov 29, 2022
@aaemnnosttv aaemnnosttv added P1 Medium priority Type: Enhancement Improvement of an existing feature labels Nov 29, 2022
@aaemnnosttv aaemnnosttv removed their assignment Dec 9, 2022
@asvinb asvinb assigned asvinb and unassigned asvinb Dec 12, 2022
@techanvil techanvil self-assigned this Dec 12, 2022
@techanvil
Copy link
Collaborator

IB ✅

@techanvil techanvil removed their assignment Dec 12, 2022
@eclarke1 eclarke1 added P0 High priority and removed P1 Medium priority labels Dec 22, 2022
@techanvil techanvil self-assigned this Feb 28, 2023
@techanvil techanvil removed their assignment Feb 28, 2023
@mohitwp mohitwp self-assigned this Mar 2, 2023
@mohitwp
Copy link
Collaborator

mohitwp commented Mar 6, 2023

QA Update ⚠️

@techanvil
I've noticed that under 'OverAllpagemetricesWidgetGA4" Engaged sessions value is in percentage % where as under "ModulePopularWidfgestStory" value of 'EngagedSessions' is not defined. I'm wondering is the current implementation is correct, or we should show all values in percentage ?

image

image

@techanvil
Copy link
Collaborator

Hmm, thanks for raising this @mohitwp. We have been implementing Engaged Sessions as a regular integer, rather than a percentage, so this suggests the DashboardOverallPageMetricsWidgetGA4 implementation is inconsistent with our approach so far.

However, referring back to the PRD I've noticed that there's an ambiguity about this and it may be the case we need to revisit and use a different metric instead, engagementRate, and display it as a percentage. I've asked @marrrmarrr to clarify this with a question on the PRD.

@techanvil
Copy link
Collaborator

@mohitwp, as discussed on Slack we need to ensure Engaged Sessions is presented as a percentage, and additionally we need to change the metric being queried from engagedSessions to engagementRate. I'm moving this issue back to Execution to address this. I'm also raising a following PR for #6218 to address DashboardOverallPageMetricsWidgetGA4.

@techanvil techanvil removed their assignment Mar 6, 2023
@aaemnnosttv aaemnnosttv removed their assignment Mar 7, 2023
@mohitwp mohitwp self-assigned this Mar 7, 2023
@mohitwp
Copy link
Collaborator

mohitwp commented Mar 7, 2023

QA Update ✅

  • Tested Storybook..

  • Compared ModulePopularPagesWidgetGA4 with PopularPagesWidget .

  • As per comment above - Engaged sessions are now presented in percentage.

  • Storybook stories added to cover the following cases

    • Loading
    • Gathering data ("Data unavailable")
    • Zero data (data available but metric is 0)
    • Error
    • Ready (data available and non-zero)

Note - As discussed with @techanvil - Engaged sessions title will change to engagement rate through this PR - #6693

image

image

image

image

image

@mohitwp mohitwp removed their assignment Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Exp: SP P0 High priority Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

7 participants