by Marnix Dessing
Matomo’s log replay mechanism can be used to test different tracking options and configurations, by simply replaying the same access log multiple times and comparing the statistics collected with each configuration of Matomo. This then can be verified with the Matomo documentation on the different configurations.
The test setup is as follows:
Based on expected differences between JS and Beacon tracking in Matomo documentation the following table can be constructed. The functions that should be incorrect should work correct for JS and incorrect for the other tracking configurations. The functions that should be correct should work for all tracking configurations. Based on the access log replay we observed the following results.
|Should be incorrect|
|Time in local user’s timezone||y||x||y|
|First party tracking cookies||y||x||x|
|Pages generation time||y||x||y|
|Should be correct|
|User IP address||y||y||y|
|Date and time of the request||y||y||y|
|URL of the page (Page URL)||y||x**||y|
|User-agent related data||y||y||y|
* Not supported by log replaying. ** Unexpected
We see that unexpected the page url is not working with the Beacon configuration. The documentation states this data should be collected. Although in the Matomo report all page views are contributed to the /index url. Which is not correct compared to the report of other tracking configurations. This is highly likely caused by the missing referrer implementation. The referrer header is the only way for Matomo to record from what page a request originates. When this header is missing the page url is unknown to Matomo. Screenshots are given below demonstrating the issue.
Beacon tracking (no page urls)
|Number of visits||113||113||133|
|Number of unique visitors||99||113||133|
|Total page views||357||357||357|