-
Notifications
You must be signed in to change notification settings - Fork 274
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
Refactor the Audience Tiles to use new pivot report infrastructure #8726
Labels
Module: Analytics
Google Analytics module related issues
Next Up
Issues to prioritize for definition
P1
Medium priority
Squad 2 (Team M)
Issues for Squad 2
Type: Enhancement
Improvement of an existing feature
Comments
techanvil
added
P1
Medium priority
Type: Enhancement
Improvement of an existing feature
Module: Analytics
Google Analytics module related issues
Squad 2 (Team M)
Issues for Squad 2
labels
May 17, 2024
Hey @benbowler, thanks for drafting this IB. A few points:
|
22 tasks
13 tasks
Thanks for the update @benbowler. It looks like these two points have been missed, though, please can you take a look?
|
Thanks Ben! This IB LGTM. ✅ |
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
Next Up
Issues to prioritize for definition
P1
Medium priority
Squad 2 (Team M)
Issues for Squad 2
Type: Enhancement
Improvement of an existing feature
Feature Description
As discussed on Slack, while we are initially implementing the Audience Tiles to use separate, per-audience reports to retrieve the cities and "top content" metrics (one report per audience per metric), we can reduce the number of reports needed by using pivot reports. This will allow us to retrieve metric data for all of the audiences in a single report (i.e., one report per metric).
We should add support for running pivot reports, and refactor the Audience Tiles to use them.
This is not critical to the release and can be done post-launch, hence the P2 priority.
Please also note this comment relating to the
AudienceTile
andAudienceTiles
refactoring: #8484 (comment)This ticket has been split from #8484, and only concerns updating the Audience Tiles to use the new pivot report infrastructure, which will be completed in that ticket.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
AudienceTiles
component (introduced via Add the Audience Tiles widget (Storybook) #8136) should be refactored to use pivot reports for the "top cities" and "top content" metrics, thus reducing the corresponding request count by a factor of the number of selected audiences.AudienceTiles
andAudienceTile
components should be further refactored so the reports that are retrieved inAudienceTiles
are passed directly toAudienceTile
, and the corresponding data parsing/extraction logic is moved fromAudienceTiles
toAudienceTile
. Hopefully this logic can be simplified in the process.AudienceTile
stories to replace the hardwired mock data with generated mock report data.Implementation Brief
Audience Segmentation Report Updates
Update the
assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceTilesWidget.js
component:topCitiesReportOptions
to the following report structure:topCitiesReport
to use the newgetPivotReport
selector instead ofgetReportForAllAudiences
, passingtopCitiesReportOptions
as the only prop.topContentReportOptions
to the following report structure:topContentReport
to use the newgetPivotReport
selector instead ofgetReportForAllAudiences
, passingtopContentReportOptions
as the only prop.topContentPageTitlesReportOptions
to the following report structure:topContentPageTitlesReport
to use the newgetPivotReport
selector instead ofgetReportForAllAudiences
, passingtopContentPageTitlesReportOptions
as the only prop.Remove the
getReportForAllAudiences
selector and all related code/tests.Update
assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceTiles.js
:.rows
, based on thedimensionValues[0].value === audienceResourceName
, (audienceResourceName
is from the parent map). This will return two rows per metric, one for each date range.topContentPageTitlesReport
, filter the rows as in the previous bullet point, passing through all 15 top page titles and paths as theAudienceTilePagesMetric.js
component will continue to do the selection of titles based ontopContent
andtopContentTitles
props.percentageOfTotalPageviews
, by dividing thescreenPageViews
metric from the current date range, with theRESERVED_TOTAL
of thescreenPageViews
metric over the same date range.AudienceTile
component props.AudienceTile Updates
AudienceTile
to use the new prop structure defined above.AudienceTile
stories to use this new pivot report data-mock functionality defined in Add support for GA4 pivot reports #8484Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: