-
Notifications
You must be signed in to change notification settings - Fork 286
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 “Top recent trending pages” key metric widget tile #7603
Comments
Hey @nfmohit, this is another well written AC, it does have a couple of implementation details that arguably should be in the IB (I'm thinking the stuff about Actually, I was about to give it the ✅ but have noticed that the dimension for this widget is |
Update to the above: I've just spotted the change to use This could be a good candidate for the first entry in the Changes during engineering section in the DD :) |
Thank you for the detailed explanation, @techanvil. I agree, I shouldn't have been so verbose in these ACs and should've included the more technical choices to be made in the IB based on the design doc. I just didn't want the implementation to take a different turn than what we envisioned in the design doc to make sure we met the end goal when all the issues came together. I'll keep this in mind for future cases, and will include any preferred technical choices in the IB section. Thank you again!
This is correct. I've also updated this across the design doc and included the change in the "Changes during engineering" section. Thank you for pointing out! |
Thanks @nfmohit - that is completely understandable! As discussed it's valuable to keep the AC higher level but it's very worthwhile capturing relevant IB details up-front too if it's going to help the definition process (obviously, in the IB section as discussed). Thanks for taking this on board, and for the constructive conversation :)
Top stuff, nice one! Happy to give this the old AC LGTM. ✅ |
IB ✅ |
@nfmohit Just flagging that this issue does not have an estimate. 🙂 |
Whoops, I remember adding it 🤔 Thanks @jimmymadon ! |
Status update: Further execution pending for #7601 |
Hey @zutigrm @wpdarren, I've just noticed that the various error state stories for this widget are not displaying properly - they are all displaying the loading state instead. It looks like this will need a followup PR to fix them. @zutigrm it's a minor one but if you're creating a followup could you please take a look at this comment at the same time? |
I've opened a follow-up PR that corrects the states for error states, but it also addresses something that I would have flagged in the initial PR around the report options in that it was using |
QA Update: ❌@zutigrm when I click on the link in the tile, nothing happens. I tested this on my live site that has data. Interestingly when I right click and select open in new tab, it does open and the Analytics screen loads successfully. nkmw-7.mp4 |
Back to you for another pass, @wpdarren. |
QA Update: ❌@zutigrm @techanvil sadly, this still seems not to be working. Tried on Chrome and Safari. I refreshed the deverlop branch a few times and looking at Github actions, the zip was generated properly. I cleared cookies, also cleared local and session storage. Closed, and repoened browser, but no luck. Can you recreate this on your side? nkmw-9.mp4 |
@wpdarren Thanks for checking this. I can't seem to replicate this, it is working in my testing, locally in develop, and on instawp for develop branch. Although, I switched to latest, and then back to develop, to ensure there is no some cache maybe. Here is the video from instawp: Screen.Recording.2023-10-30.at.08.42.48.mov@wpdarren Can you reproduce this still on your end? Maybe you can try also switching to latest and then back to develop to confirm |
QA Update: ✅Verified:
|
Feature Description
(screenshot for reference - see Figma for latest version)
A new key metric widget tile should be added for "Top recent trending pages".
See:
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
KEY_METRICS_WIDGETS
constant (located inassets/js/components/KeyMetrics/key-metrics-widgets.js
at the time of writing), a newrequiredCustomDimensions
array property should be added to its definition. This array property will contain names of custom dimensions that the tile depends on. In this case, it should only begooglesitekit_post_date
.kmAnalyticsTopRecentTrendingPages
(so that it is consistent with the design doc).Top recent trending pages
.Pages with the most pageviews published in the last 3 days
.analytics-4
module, so it should only be rendered in the key metrics widget area if GA4 is connected, otherwise,ConnectGA4CTATileWidget
should be rendered (similar to existing GA4-dependent metric tiles). It should also not be shown to view-only users who do not have shared access to GA4.screenPageViews
pagePath
customEvent:googlesitekit_post_date
custom dimension should be within the date range of the report request, i.e. the last 3 days.screenPageViews
descendingscreenPageViews
showing up as the second column.newsKeyMetrics
feature flag is enabled.Implementation Brief
assets/js/googlesitekit/datastore/user/constants.js
:KM_ANALYTICS_TOP_RECENT_TRENDING_PAGES = 'kmAnalyticsTopRecentTrendingPages'
.keyMetricsGA4Widgets
array.assets/js/components/KeyMetrics/key-metrics-widgets.js
:KEY_METRICS_WIDGETS
object if thenewsKeyMetrics
feature flag is enabled similar to existing widgets.title
&description
should be according to the ACs.requiredCustomDimensions
property that should be an array containing thegooglesitekit_post_date
string.assets/js/modules/analytics-4/components/widgets/
, create a newTopRecentTrendingPages.js
component. In this component, useTopCitiesWidget
as a starting point, then make the following changes:CORE_USER
getDateRangeDates
selector, it should use the last 3 days as the date range; i.e. an object such as:startDate
: Date of the 3rd previous day inYYYY-MM-DD
format.endDate
: Yesterday's date inYYYY-MM-DD
format.pagePath
dimension instead ofcity
.screenPageViews
metric instead oftotalUsers
.dimensionFilters
property that should filter thecustomEvent:googlesitekit_post_date
dimension using theinListFilter
filterType
and verify that the dimension value is in a list of dates for the last 3 days inYYYYMMDD
format.screenPageViews
metric value (instead of theTopCitiesWidget
totalUsers
percentage).title
andinfoTooltip
should be according to the ACs.assets/js/modules/analytics-4/index.js
:newsKeyMetrics
feature flag.includes/Modules/Analytics_4/Report/Request.php
:validate_shared_dimensions
method and addcustomEvent:googlesitekit_post_date
to the list of valid dimensions.Storybook
Test Coverage
QA Brief
googlesitekit_post_date
, tracked in the past 3 daysga4Reporting
, userInput andnewsKeyMetrics
feature flagsTop recent trending pages
metric tileChangelog entry
The text was updated successfully, but these errors were encountered: