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
Show unique visitors metric for all periods if available #10200
Conversation
array($selectableColumns[0]), | ||
array('nb_uniq_visitors'), | ||
array_slice($selectableColumns, 1) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want 'nb_uniq_visitors' to be always after 'nb_visits', maybe this is a better way (no need to modify if order of items in $selectableColumns changes):
$pos = array_search('nb_visits', $selectableColumns);
// array(a, b) -> array(a, x, b)
array_splice($selectableColumns, $pos+1, 0, array('nb_uniq_visitors'));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you point, but that behaviour was simply "copied" from another place.
Imho we should more likely discuss if we should introduce some kind of column ordering system that will be applied to all reports automatically. We could define that in the column classes or maybe have kind of a registry where columns can register and define there order, which would maybe make it easier for third party plugin to work with it. Maybe that could also be used to define a custom order for any user...
@tsteur @mattab any plans to do something like that in 3.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Piwik 3 there is already a sparklines visualization and it is defined very differently. See eg https://github.com/piwik/piwik/blob/3.x-dev/plugins/VisitsSummary/Reports/Get.php#L164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. So, guess there is no need to solve that in 2.x aswell
Looks ok 👍 Take a look at the comment above. |
Do we need to merge this issue? if so, here is myreview:
|
… graph only if available; adds action as selectable metric
Hi @sgiehl do you think this PR is now ready to be merged? Wondering, whether we maybe need create the PR against Piwik 3 as well? |
I need to recreate the PR in order to update it. I don't think this should our could be included this way in Piwik 3, due to the changes already made there. |
fixes #9989