Closed zutigrm closed 1 month ago
Since AC is very straightforward, I added both AC and IB and moved it to the IBR
userPickedMetrics
andanswerBasedMetrics
should be filtered out for any saved ACR items, only ifconversionReporting
feature flag is disabled.
@zutigrm let's make it clear which items should be filtered out exactly. Could you please list them in IB?
@eugene-manuilov Sure, I added the list, and expanded the IB
Thanks, IB ✔️
@zutigrm and I chatted about this via DM, and it made more sense to define a constant that holds non ACR metrics only, and filter against this list. This saves having to add metrics to the array as they become available in code, thus reducing the chance for oversight thereof.
I'll update the IB shortly to reflect this change, cc @eugene-manuilov
@zutigrm @eugene-manuilov the IB has been updated accordingly.
@zutigrm :
Noting that we are not able to add test cases to assets/js/googlesitekit/datastore/user/key-metrics.test.js
until such time that we have the mapping defined, as these tests rely on the real values returned by registry.select( CORE_USER ).getAnswerBasedMetrics()
.
We should make the addition of this test as part of the GH issue that maps ACR metrics to site purpose answers, once that task is defined.
conversionReporting
feature flag is disabled key metric tiles that have been already saved and added to the widget area, do not appear, and instead a ghost card shown there.
Feature Description
We should prevent metric tiles from still appearing in the widget area after the
conversionReporting
feature flag is disabled.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
conversionReporting
feature flag is disabled key metric tiles that have been already saved and added to the widget area, should not appear, and instead a ghost card should be shownImplementation Brief
assets/js/googlesitekit/datastore/user/key-metrics.js
getKeyMetrics
selectoruserPickedMetrics
andanswerBasedMetrics
should be filtered out for any saved ACR items, only ifconversionReporting
feature flag is disabled.assets/js/googlesitekit/datastore/user/constants.js
for example and map all non-ACR widget slugs in an array, so it can be used for checking against saved metrics for filtering purpose.KM_ANALYTICS_ADSENSE_TOP_EARNING_CONTENT
KM_ANALYTICS_ENGAGED_TRAFFIC_SOURCE
KM_ANALYTICS_LEAST_ENGAGING_PAGES
KM_ANALYTICS_NEW_VISITORS
KM_ANALYTICS_POPULAR_AUTHORS
KM_ANALYTICS_POPULAR_CONTENT
KM_ANALYTICS_POPULAR_PRODUCTS
KM_ANALYTICS_RETURNING_VISITORS
KM_ANALYTICS_TOP_CATEGORIES
KM_ANALYTICS_TOP_CITIES
KM_ANALYTICS_TOP_CONVERTING_TRAFFIC_SOURCE
KM_ANALYTICS_TOP_COUNTRIES
KM_ANALYTICS_TOP_RECENT_TRENDING_PAGES
KM_ANALYTICS_TOP_TRAFFIC_SOURCE
KM_ANALYTICS_PAGES_PER_VISIT
KM_ANALYTICS_VISIT_LENGTH
KM_ANALYTICS_TOP_RETURNING_VISITOR_PAGES
KM_ANALYTICS_VISITS_PER_VISITOR
KM_ANALYTICS_MOST_ENGAGING_PAGES
KM_ANALYTICS_TOP_CATEGORIES
KM_SEARCH_CONSOLE_POPULAR_KEYWORDS
Test Coverage
assets/js/googlesitekit/datastore/user/key-metrics.test.js
to include this new scenario, where saved ACR widget slug, would not be included in the final array when metrics are retrieved usinggetKeyMetrics
selector, and when feature flag is disabled, and they are included when it is enabledQA Brief
conversionReporting
feature flagconversionReporting
feature flagconversionReporting
feature flag and validate that the ACR metric(s) is shown againChangelog entry