matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.68k stars 2.62k forks source link

[Bug] - Comparison of data vs. previous year (2023) #22370

Open jgbdkook opened 2 months ago

jgbdkook commented 2 months ago

What happened?

Hello everyone ! When I want to compare data for a period from 1 January 2024 to 30 June 2024 with the previous year, the period compared is from 26 December 2022 to 02 July 2023. The comparison automatically adds 7 days to the graphs. I checked without comparison and when I enter a date in 2023 the problem is similar. The application period is from 01 January 2023 to 30 June 2023 but the period displayed is from 26 December 2022 to 02 July 2023.

Usually I don't have any problems with the dates, but I don't know whether it's a date bug or a graph bug and whether the data is correct.

Thank you for your help

Screenshot_3 Screenshot_4

What should happen?

The graph should correspond to the date range selected

How can this be reproduced?

Selecting the date range from 1 January 2024 to 30 June 2024 vs. the previous period

Matomo version

Version de Matomo: 5.1.0

PHP version

Version de PHP: 8.1.25

Server operating system

No response

What browsers are you seeing the problem on?

No response

Computer operating system

No response

Relevant log output

No response

Validations

MatomoForumNotifications commented 2 months ago

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/bug-data-2023-jan-jun-comparison/58462/4

randy-innocraft commented 2 months ago

Thank you @jgbdkook for creating this issue 🙌

There are three 'Compare to' options and what you have described sounds like the compare to 'Previous Period'. But, what it sounds like you are trying to do is compare to 'Previous Year'. Could you please try your comparison again using the compare to 'Previous Year' option and let us know if you are still facing the same issue? Thank you!

image

randy-innocraft commented 2 months ago

@jgbdkook , upon further testing we have been able to reproduce the issue. Again, thank you for creating this issue 🙌