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
exit_rate & bounce_rate More than 100% #12808
Labels
not-in-changelog
For issues or pull requests that should not be included in our release changelog on matomo.org.
Comments
@YueminJi I met this issue, how fix it? |
@Sija have you ways to fix the issue? thanks very much. |
@huang0808 here is my Temporary solutions public function sumRow(Row $rowToSum, $enableCopyMetadata = true, $aggregationOperations = false)
{
foreach ($rowToSum as $columnToSumName => $columnToSumValue) {
// fix bounce_rate
if($columnToSumName == 'bounce_rate'){
VarDumper::dump($this->getColumns('storage')['label']);
$total_entry_bounce_count = (int)$this->getColumns('storage')['entry_bounce_count']+(int)$rowToSum->getColumns('storage')['entry_bounce_count'];
$total_entry_nb_visits = (int)$this->getColumns('storage')['entry_nb_visits']+(int)$rowToSum->getColumns('storage')['entry_nb_visits'];
$bounce_rate = number_format($total_entry_bounce_count/$total_entry_nb_visits,2);
return $this->setColumn($columnToSumName, $bounce_rate);
}
// fix exit_rate
if($columnToSumName == 'exit_rate'){
VarDumper::dump($this->getColumns('storage')['label']);
$total_exit_nb_visits = (int)$this->getColumns('storage')['exit_nb_visits']+(int)$rowToSum->getColumns('storage')['exit_nb_visits'];
$total_nb_visits = (int)$this->getColumns('storage')['nb_visits']+(int)$rowToSum->getColumns('storage')['nb_visits'];
$exit_rate = number_format($total_exit_nb_visits /$total_nb_visits,2);
return $this->setColumn($columnToSumName, $exit_rate);
}
if (!$this->isSummableColumn($columnToSumName)) {
continue;
} |
@YueminJi thanks a lot, work well. |
This one should have meanwhile be fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
not-in-changelog
For issues or pull requests that should not be included in our release changelog on matomo.org.
IF Site has more than one domain(or use both android and iOS native SDK),
exit_rate
&bounce_rate
may more than 100%because
/core/DataTable/Row.php
use sum operation,But for the percentage value can't use sample sum operation, should use original molecular and denominator.The text was updated successfully, but these errors were encountered: