-
Notifications
You must be signed in to change notification settings - Fork 328
Closed
Labels
P0High priorityHigh priorityTeam SIssues for Squad 1Issues for Squad 1Type: EnhancementImprovement of an existing featureImprovement of an existing feature
Description
Feature Description
This issue should add Core\Email_Reporting\Report_Options\Analytics_4_Report_Options, Search_Console_Report_Options and AdSense_Report_Options classes which will build report option arrays on php side, to be later used in report requests made from the backend
Connect the template to live user dataFormat metrics to fit the template and designsHandle edge cases with variance in metric value length
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- All report query objects should be created for the required reports.
Implementation Brief
- Add
Core\Email_Reporting\Report_Options\Analytics_4_Report_Options,Search_Console_Report_OptionsandAdSense_Report_Optionsclasses- See
includes/Modules/Analytics_4/Batch_Report_Builder.phpin the PoC for examples on some translated report options for few KMW report options used in JS counterpart. - Build methods in the respective module class which return report options array, adapted from their JS report options counterparts. The metrics that should be included, following the email template sections, are:
- Analytics module:
Total conversion events- total count ofsubmit_lead_form,contact, orgenerate_leadProducts Added to cart- total count ofaddToCartsmetric, andTop traffic sourcefor the event (sessionDefaultChannelGroupdimension)Purchases- total count ofpurchasemetric andTop traffic sourcefor the event (sessionDefaultChannelGroupdimension)Total visitors-totalUsermetrics count , and comparison to the previous vs current period difference in percentageNew Visitors- seeassets/js/modules/analytics-4/components/widgets/NewVisitorsWidget.jsReturning Visitors- seeassets/js/modules/analytics-4/components/widgets/ReturningVisitorsWidget.jsTraffic channels by visitor count- seeassets/js/modules/analytics-4/components/widgets/TopTrafficSourceWidget.jsuse 3 forlimitinstead of1Pages with the most pageviews- seeassets/js/modules/analytics-4/components/widgets/PopularContentWidget.jsTop authors by pageviews- seeassets/js/modules/analytics-4/components/widgets/PopularAuthorsWidget.jsTop categories by pageviews- seeassets/js/modules/analytics-4/components/widgets/TopCategoriesWidget.js
- AdSense module:
Total earnings from AdSense- total count oftotalAdRevenuemetric.
- Search Console module:
Total impressions on Search- seeassets/js/modules/search-console/components/dashboard/SearchFunnelWidgetGA4/index.jsand the usage ofsearchConsoleDatainassets/js/modules/search-console/components/dashboard/SearchFunnelWidgetGA4/Overview/DataBlocks.jsTotal clicks from Search- same as forTotal impressions on SearchKeywords with highest CTR in Search- Extract this from the data retrieved from SC report inassets/js/modules/search-console/components/dashboard/DashboardPopularKeywordsWidget.jsorassets/js/modules/search-console/components/widgets/PopularKeywordsWidget.js.. Sort data byLogged data example
0 : {
clicks: 10,
ctr: 0.21739130434782608,
impressions: 46,
keys: Array(1),
position: 22.91304347826087
}
1 : {
clicks: 6,
ctr: 0.10909090909090909,
impressions: 55,
keys: Array(1),
position: 57.30909090909091
}
2 : {
clicks: 4,
ctr: 0.0784313725490196,
impressions: 51,
keys: Array(1),
position: 30.07843137254902
}
3 : {
clicks: 4,
ctr: 0.0975609756097561,
impressions: 41,
keys: Array(1),
position: 4.829268292682927
}
4 : {
clicks: 3,
ctr: 0.08571428571428572,
impressions: 35,
keys: Array(1),
position: 24.542857142857144
}
5 : {
clicks: 3,
ctr: 0.3333333333333333,
impressions: 9,
keys: Array(1),
position: 4.444444444444445
}
6 : {
clicks: 2,
ctr: 0.25,
impressions: 8,
keys: Array(1),
position: 26.875
}
7 : {
clicks: 2,
ctr: 0.25,
impressions: 8,
keys: Array(1),
position: 33.125
}
8 : {
clicks: 2,
ctr: 0.11764705882352941,
impressions: 17,
keys: Array(1),
position: 6.176470588235294
}
9 : {
clicks: 2,
ctr: 0.2857142857142857,
impressions: 7,
keys: Array(1),
position: 3.7142857142857144
}ctrpropertyPages with the most clicks from Search- seeassets/js/modules/search-console/components/dashboard/DashboardPopularKeywordsWidget.js,dimensionsshould includepagesTop growing keywords in Search (CTR)- new data to be implemented inv1Pages with the biggest increase in Search clicks- new data to be implemented inv1- Note currently SC does not support comparison dates out of the box, the diffs in the badges will be hardcoded as placeholders in the meantime, this will be computed in
v1
- Analytics module:
- See
Test Coverage
- No tests needed
QA Brief
- No QA needed, there is no user facing change that can be tested, only list of report arrays
Changelog entry
- Add report options builder classes for Analytics, AdSense, and SC modules.
Metadata
Metadata
Assignees
Labels
P0High priorityHigh priorityTeam SIssues for Squad 1Issues for Squad 1Type: EnhancementImprovement of an existing featureImprovement of an existing feature