Regarding the differences in each report figure between Matomo 3.9.1 and 5.0.3

Hello,

In the customer’s environment, after upgrading from Matomo 3.9.1 to 5.0.3,
differences have arisen in various figures such as page views, visits,
and download between the reports from Matomo 3.9.1 and 5.0.3,
and we have been asked to investigate the cause.
The same IIS logs (from February 2024) have been imported into both Matomo 3.9.1 and 5.0.3.

We believe that this might be caused by differences in the version of the “Device Detector” module,
which is used to detect detailed information about visitors’ devices, between Matomo 3.9.1 and 5.0.3.
If there are any other potential causes that you can think of, please let us know.

Matomo 5.0.3 Environment
Windows Server2019 version 1809
Apache:2.4.59
PHP:8.3.8
Python:3.12.1
MariaDB:10.11.8
Matomo 5.0.3(Importing IIS logs)

Matomo 3.9.1 Environment
Windows Server2012
Apache: 2.2.x
PHP:5.6.x
Python:2.7.13
MariaDB: 10.1.21
Matomo 3.9.1(Importing IIS logs)

Regards,
Masa

It sounds like you’re on the right track suspecting the “Device Detector” module. Other potential causes could include differences in data processing methods or changes in how visits and downloads are tracked between versions. Additionally, ensure that all settings are consistent across both environments. Have you checked for any known issues or changelogs that might explain these discrepancies?

I have confirmed that the settings in config.ini.php and other Matomo configurations match between the Matomo 3.9.1 and 5.0.3 environments.
After reviewing the changelog from Matomo 4.0.0 to 5.0.3, it appears there have been no changes in the tracking methods for page views,
visits, or downloads in log analytics.
Do you know in which version the tracking methods were changed?

Hi @m-ikeda
Did you also have a check on the 4.0.0 changelog? (Maybe Python 3 can be the source of the difference?)
Did you especially checked the changes on matomo-org/matomo-log-analytics section of each version changelog?

Thank you,Philippe.

I have confirmed that there are changes to the matomo-log-analytics in the following versions.
4.0.0, 4.1.1, 4.2.0, 4.3.0, 4.4.0, 4.11.0, 4.16.0, 5.0.0

I believe that the ticket related to the differences in numbers such as page views, visits,
and downloads between the reports of Matomo 3.9.1 and 5.0.3 is ‘#267 Python 3 support’ in the 4.0.0 changelog.

When I compared the source code of import_logs.py in Matomo 3.9.1 and Matomo 5.0.3, the main changes were as follows:

  1. Change in Python version
  2. Changes to the Python modules imported due to the change in Python version
  3. Additions and deletions to the list of extensions for static files and download files
  4. Enhanced bot detection using the Device Detector bot list

I am unsure how these changes affect the differences in page views, visits, downloads, etc.

Maybe @innocraft can give some clues?