-
Notifications
You must be signed in to change notification settings - Fork 293
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 the "New visitors" key metric widget tile #6244
Comments
ACs here are good 👍🏻 |
IB ✅ I like the child component idea. We might want to call it something less generic, like |
Thanks @tofumatt , I've tweaked the IB by replacing |
Key Metric widget components (skeleton) are created in #6313. So we don't have to create the |
@asvinb @tofumatt, according to the AC, the criteria to render the widget tile is missing in the IB:
It should check if the selected metric depends on GA4 using the |
@marrrmarrr I did write the ACs here but I'm a bit confused as to how we should calculate the change percentage! 😄 Should this be:
I believe we probably should be going for 1 here. The IB is suggesting we do 3 but that does not seem to be the purpose of this widget. |
Hi @jimmymadon, I was more thinking of option (2), as I don't know if most users would understand the comparison of percentages very easily. We're mostly aiming to give them an idea of whether the portion of new visitors is increasing or decreasing, whereas option (1) would be more about whether the rate of growth of new visitors. |
QA Update
|
@mohitwp @jimmymadon as discussed on Slack I've created a followup issue to address Question 2: #7172, which can therefore be identified as a known issue here. |
QA Update
|
QA Update ✅
Note1. Mobile version of widget is not showing correctly. As per QAB mobile design is not part of this ticket annd we will create separate ticket for the issue. cc @wpdarren |
Feature Description
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
activeUsers
newVsReturning
new
of(new + returning)
total visitors.Implementation Brief
assets/js/modules/analytics-4/components/widgets/AnalyticsNewVisitorsWidget
which exports theAnalyticsNewVisitorsWidget
functional component.getReport
selector with the metric and dimension as per the AC.core/user
data store via thegetDateRangeDates
withcompare
set totrue
.totals
for the current and previous date range. See below for theChange
component.assets/js/modules/analytics-4/components/common/Change.js
which exports theChange
functional component.previousValue
:number
currentValue
:number
previousValue
andcurrentValue
props, it should calculate the percentage change using thecalculateChange
function (found inassets/js/util/index.js
) and render the change using thenumFmt
function (found inassets/js/util/i18n.js
).getReport
to display the values as per the AC.assets/js/modules/analytics-4/components/common/MetricWidget.js
component which acceptstitle
andchildren
as props which can be re used by other components. TheMetricWidget
component will be responsible to generate the widget markup and the title along with the rounded corners styles, and thenchildren
will be rendered below thetitle
.assets/js/modules/analytics-4/components/widgets/AnalyticsNewVisitorsWidget.stories.js
which contains the stories for the component.assets/sass/components/key-metrics
folder.Test Coverage
Change
andAnalyticsNewVisitorsWidget
components.QA Brief
userInput
feature flag enabled, answer the questionnaire. For now, all widgets are displayed on the dashboard (which will change with future commits). As part of this issue, test the design and metric values of theNew Visitors
widget rendered in the Key Metrics section.Metric Tile Numeric
and the specificNew Visitors
stories within the Key Metrics widget section in Storybook.Changelog entry
New visitors
key metric widget.The text was updated successfully, but these errors were encountered: