matomo-org / matomo-org/matomo

[Bug] Ecommerce statistics - Abandoned cart visiors reference wrong

Open
#22,011 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug c: Ecommerce
Dominant language
PHP
Stars
21.9k
Forks
2.9k
Avg merge
3d 3h
Merged PRs (30d)
139

Description

### What happened?

In the ecommerce overview there is the statistic “Visits with Abandoned Cart” on the left. In addition to the value, there is an indication of the change in the selected period. This value doesn't seem to be correct. Likewise, when you mouse over, a help text is displayed that indicates the basis for the calculation.
For example, if I select the day March 9, 2024, there will be 968 visitors.
The development says 158.8% more visitors. The tooltip shows - 374 visitors for March 8, 2024. But if I select March 8, 2024 in the date field, it shows 1050 visitors.
Both times it seems to refer to the number of orders - i.e. not visitors with visitors to the previous period.

### What should happen?

In my opinion that would be correct
Visitors with abandoned shopping cart on March 9, 2024 = 968
Visitors with abandoned shopping cart on March 8, 2024 = 1050
Proportional change on March 9, 2024 of -7.81%

### How can this be reproduced?

The easiest way is to use the Matomo demo https://demo.matomo.cloud/
Click on Ecommerce - Overview
Selection date March 9, 2024
![grafik](https://github.com/matomo-org/matomo/assets/192153/3ce9f8ba-9758-4345-83b6-1cf3d90dfdab)

On the right are the values ​​and the mouseover that shows the reference.
Change from the previous day refers to 374

Then selection of March 8, 2024
![grafik](https://github.com/matomo-org/matomo/assets/192153/28b252cd-134b-4a53-8151-289ca85f39d2)

So here you can see that it refers to the orders. This value is namely 374.
But the 1050 would be correct.

### Matomo version

Matomo Demo

### PHP version

8

### Server operating system

Apache

### What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

### Computer operating system

Linux

### Relevant log output

_No response_

### Validations

- [X] Read our [Contributing Guidelines](https://github.com/matomo-org/matomo/blob/5.x-dev/CONTRIBUTING.md).
- [X] Follow our [Security Policy](https://github.com/matomo-org/matomo/blob/5.x-dev/SECURITY.md).
- [X] Check that there isn't already an issue that reports the same bug to avoid creating duplicates.
- [X] The provided steps to reproduce is a [minimal reproducible](https://stackoverflow.com/help/minimal-reproducible-example) of the Bug.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Ecommerce > Overview and reproduce the March 9 and March 8, 2024 comparison in the Matomo demo. Trace the calculation and tooltip for “Visits with Abandoned Cart”; done means the comparison uses visitor counts from the previous period and reports the expected proportional change of -7.81%.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
analytics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.