-
Notifications
You must be signed in to change notification settings - Fork 297
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
"Top cities driving add to cart" shows city with 0 events #10156
Comments
Slightly rephrased AC. Moving to IB. |
This is a bug introduced in the Pivot report work I did which wasn't fit for purpose for Audience Segmentation, this could be a reminder to add a ticket to track removing this infrastructure now that it's unused in the codebase. @techanvil should I create a new ticket to remove Pivot reporting? I can see that #8602 is the remaining open ticket relating to this work. |
@benbowler @zutigrm hmm - careful with this one, we did historically include the option to keep empty rows before the pivot work, the line was simply moved as part of the pivot PR: #8811 So, I think this needs revisiting for the fix. Ben, by all means please do file an issue to remove the support for pivot reports, though. I think we can simply close #8602. |
Thanks @techanvil I'll take it back to IB. The goal here then would be if all rows have 0 values then the no data state should show, we might be able to achieve this by making the "keep empty rows" optional to allow for queries like this that don't need empty rows to skip them. |
Note that this bug is the existing behaviour across all key metric widgets and not something that has been introduced unexpectedly. As part of this ticket I have added to the IB all Analytics Key Metrics widgets that have raw numerical results (rather than currency or percentage values) listed. |
Feature Description
As reported in this Asana ticket, When switching from default
28days
range to14days
range, or from90days
to14days
"Top cities driving add to cart" is showing city with0
as a valueOriginally reported in this Asana ticket during bug bashing
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
0
data even when switching the date range to smaller range.Implementation Brief
Update
includes/Modules/Analytics_4/Report/RequestHelpers.php
, settingsetKeepEmptyRows
to the value of an anonymous function:! array_key_exists( 'keepEmptyRows' )
returntrue
- This ensures the value is set totrue
by default to retain existing behaviour across other Analytics report requests.$data['keepEmptyRows']
, cast to boolean with(bool)
.site-kit-wp/includes/Modules/Analytics_4/Report/RequestHelpers.php
Line 67 in 42917df
Update the following widgets to pass
keepEmptyRows: false
in the main report query:Test Coverage
tests/phpunit/integration/Modules/Analytics_4Test.php
to test the newkeepEmptyRows
prop support on the report endpoint.QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: