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
Fix two issues causing new/returning visitor conversion rate to not appear #13728
Conversation
…ppear: when getting archive IDs must not ignore idarchives w/ different done flags, and aggregate dependent plugins for aggregate periods too.
Some tests will need updating otherwise, ready for review. |
@@ -424,5 +424,8 @@ public function aggregateMultipleReports() | |||
$columnsAggregationOperation, | |||
$columnsToRenameAfterAggregation = null, | |||
$countRowsRecursive = array()); | |||
|
|||
$this->getProcessor()->processDependentArchive('Goals', API::NEW_VISIT_SEGMENT); |
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.
can you quickly help me out where the stats for those two segments are shown?
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.
here's the controller action: https://github.com/matomo-org/matomo/blob/3.x-dev/plugins/Goals/Controller.php#L89
👍 fyi some tests are now failing as I think lots of more archives are created now etc. LGTM otherwise. Be ideal if we didn't have to generate all the archives when processing the segments to speed up archiving and reduce needed storage but I'm not sure we can detect whether we are currently processing a dependent archive or not. |
I'm not sure what you mean? It should only process the Goals plugin for those dependent segments, but since it's a period, it will have to aggregate child periods. Or are the child periods being aggregated multiple times if, eg, month then year gets run (so month gets archived once, then again when year cascades)? That seems like something worth fixing. |
I meant some/many of the Goal metrics/archives are maybe not needed to be archived. All good though. |
Changes:
conversion rate requires number of conversions and number of visits, which will appear in two different archives, one for Goals, one for VisitsSummary. W/o grouping by
name
, only one was selected, the one for Goals. Which meant nb_visits was queried as 0, causing a conversion rate of 0.