-
Notifications
You must be signed in to change notification settings - Fork 293
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
Analytics Top content is sorted by title and not by views #1867
Comments
Thanks for the bug report @gmmedia. I can confirm I am seeing this as well, top content is sorted by page title in version 1.9.0: In 1.8.1 I see pages forted by descending Views: Using |
Thanks @adamsilverstein! This issue is caused by a typo here: site-kit-wp/includes/Modules/Analytics.php Line 977 in 897c92e
We don't need |
IB is updated |
✅ IB looks good to me! |
Created a new PR against |
@eugene-manuilov would you please add a QA Brief here so this can be merged? Assigning to @felixarntz for a final pass on the PR. |
@aaemnnosttv QA Brief is added. |
Bug Description
The Google Analytics Top content widget is sorted by the title column and not by the views column.
Steps to reproduce
Same wrong sorting on the 3 pages:
Screenshots
Additional Context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
For Analytics top content displays (and underlying queries), results should be sorted by descending views/pageviews. Top content appears in the following locations:
Implementation Brief
includes/Modules/Analytics.php
, in the handler forcase 'GET:report'
, in the orderby handling immediately following the inline comment// Order by.
:[0]
from theif
condition block which checks whether$orderby
is a numeric array or not:parse_data_orderby
in theincludes/Modules/Analytics.php
that accepts an instance of theData_Request
class and returns$orderby
result using algorithm from theGET:report
handler.GET:report
handler to use the new method to get orderby settings.QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: