Incorrect dimension filter applied in various components that uses `adSourceName` dimension
Bug Description
In the following components, the dimensionFilters is applied in the report args incorrectly, resulting them to be no-op.
-
AnalyticsAndAdSenseAccountsDetectedAsLinkedOverlayNotification -
DashboardTopEarningPagesWidgetGA4 -
TopEarningContentWidget
The dimension filters should be placed inside the dimensionFilters property in the report args object. Also for a little bit of simplification, the logic can be rewritten to be the following shorthand syntax, since the filter is a exact match string filter covered by Google\Site_Kit\Modules\Analytics_4\Report\Request::parse_dimension_filter:
dimensionFilters: {
adSourceName: `Google AdSense account (${ adSenseAccountID })`,
},
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- Dimension filter for the Analytics reports in
AnalyticsAndAdSenseAccountsDetectedAsLinkedOverlayNotification,DashboardTopEarningPagesWidgetGA4andTopEarningContentWidgetshould be applied correctly.
Implementation Brief
- [ ] Update the report args in
assets/js/components/OverlayNotification/AnalyticsAndAdSenseAccountsDetectedAsLinkedOverlayNotification.js,assets/js/modules/adsense/components/dashboard/DashboardTopEarningPagesWidgetGA4.jsandassets/js/modules/adsense/components/widgets/TopEarningContentWidget.jsfile:- [ ] Remove the
filterproperty from the report options. - [ ] Add the
dimensionFiltersobject to the report option, and add theadSourceNameproperty withGoogle AdSense account (${ adSenseAccountID })value inside thedimensionFiltersobject.
- [ ] Remove the
Test Coverage
- Update all the relevant test and stories for the aforementioned components.
QA Brief
Changelog entry
IB ✅
QA Update ✅
- Tested on dev environment.
- Verified
DashboardTopEarningPagesWidgetGA4andTopEarningContentWidgeton main dashboard. - Verified
DashboardTopEarningPagesWidgetGA4andTopEarningContentWidgeton entity dashboard. - Verified both widgets are getting render without any error.
- Verified both widgets content is same on latest and dev environment.
- Verified all links under both widgets.
Develop :
Top Earning pages widget
Top Earning Content widget
Latest :
Top Earning pages widget
Top Earning Content widget
View Only Dash board
@10upsimon, @tofumatt, as discussed on Slack, the changes in the associated PR have caused VRT failures. Therefore, I’m moving this ticket back in execution to update the VRT images accordingly.
As this was previously in Approval and the only change in the followup was to update the VRT images, and with CI confirmed passing for the update, I'm moving this back to Approval.