-
Notifications
You must be signed in to change notification settings - Fork 295
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
Display actual number of users coming from search in refactored "Unique Visitors (from Search)" widget #3064
Comments
Thanks @ivankruchkoff – a few things to address yet.
|
@aaemnnosttv I've made an update, can you confirm that the common report args are the right place to add I also added another label that needs updating. |
@ivankruchkoff report selectors don't have arguments for site-kit-wp/assets/js/modules/analytics/datastore/report.js Lines 138 to 139 in e465574
I think you also worked on the backend for the
Yes it looks like it since these args are shared between reports used for the main data (stat) and for the sparkline chart 👍 |
Updated, and yes git blame certainly points at me :) 2421 |
LGTM 😄 IB ✅ |
QA Update: Fail ❌@johnPhillips three observations:
Verified: The 'Unique Visitors' widget is now be renamed to 'Unique Visitors from Search' - Screenshot |
@wpdarren Thanks for the review. Something funny might be going on here, I think... The source link under 'Unique visitors from search' points at Is it possible to share a link to the site you used here? If the code is up to date then this might require someone with a slightly better understanding than me about analytics reporting to have a little look as well. As far as I could see I implemented the IB correctly. |
@johnPhillips let me go through my test site and make sure it is not a caching issue. |
QA Update: Pass ✅Verified:
@johnPhillips I figured out the issue with why the data was different (needed to set |
Approval ❌There is a problem here related to the source link: It only leads to the filtered view including only "Organic Search" in the single URL view. On the overall dashboard, it still leads to the overall channels view without the "Organic Search" filter like it should. This is because in https://github.com/google/site-kit-wp/pull/3142/files#diff-05c312086666c0cdc8e39ab72ba4f96e393a1448ace9e0593c2b8618e9c091edR105 the required filter parameter is only added if a single entity URL is present, but it needs to always be added. |
With the additional fix merged, this works as expected now! ✅ |
The refactored version of the "Unique Visitors from Search" widget currently uses "Unique Visitors" title, since the widget is (and has always been 🤦♂️ ) displaying the total number of users. This is actually wrong, and it should display the number of users that came from Organic Search.
This is a bug in the legacy widget primarily, but it should only be fixed in the refactored version, since that will roll out anyway.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
DashboardUniqueVisitorsWidget
(visible when enablingwidgets.dashboard
/widgets.pageDashboard
feature flags) should be updated as follows:DashboardSearchVisitorsWidget
throughout the codebase (also related references, e.g. Storybook name).dimensionName
ofga:channelGrouping
anddimensionValue
ofOrganic Search
).acquisition-channels
report._r.drilldown
argument should includeanalytics.trafficChannel:Organic%20Search
.analytics.pagePath
for the current entity URL within_r.drilldown
._r.drilldown
parameters can be included by concatenating with a comma, e.g._r.drilldown=analytics.trafficChannel:Organic%20Search,analytics.pagePath:~2F
.Implementation Brief
Rename
assets/js/modules/analytics/components/dashboard/DashboardUniqueVisitorsWidget.js
toassets/js/modules/analytics/components/dashboard/DashboardSearchVisitorsWidget.js
Update references in:
Change
title
andlabel
insite-kit-wp/assets/js/modules/analytics/components/dashboard/DashboardUniqueVisitorsWidget.js
Line 149 in c85a225
site-kit-wp/assets/js/modules/analytics/components/dashboard/DashboardUniqueVisitorsWidget.js
Line 125 in c85a225
Unique Visitors from Search
Update the
commonArgs
as both the regular report and sparkline will need to filter for users that only come from organic search,in
site-kit-wp/assets/js/modules/analytics/components/dashboard/DashboardUniqueVisitorsWidget.js
Line 63 in c85a225
add these after the date params:
Also make sure that
sparklineArgs
also retainsga:date
dimensionUpdate
serviceURL
fromvisitors-overview
toacquisition-channels
site-kit-wp/assets/js/modules/analytics/components/dashboard/DashboardUniqueVisitorsWidget.js
Line 102 in c85a225
Update
_r.drilldown param
site-kit-wp/assets/js/modules/analytics/components/dashboard/DashboardUniqueVisitorsWidget.js
Line 103 in c85a225
/assets/js/modules/analytics/util/report-args.js
and looking at the tests for it can give an idea of expected inputs and outputs.:site-kit-wp/assets/js/modules/analytics/util/report-args.js
Line 53 in c85a225
Test Coverage
Visual Regression Changes
QA Brief
acquisition-channels
rather thanvisitors-overview
.Changelog entry
The text was updated successfully, but these errors were encountered: