In the Apache log of Matomo I find exactly three hits for yesterday with a certain Matomo event (GET /piwik.php?...&e_n=foo&...). With a segment analysis in Matomo/Visits Log I find exactly one hit. Similarly observed fluctuations already some days.
I can assign the hit I find in Matomo to the Apache log using time, dwell time and the remaining 2 bytes of the IP. But why can't I find the other two hits from my Apache log in Matomo?
Also in the MySQL database of Matomo I find this picture confirmed:
root<a class='mention' href='https://github.com/piwik'>@piwik</a>:/var/log/apache2# zgrep -c ' \[27/Feb/2019:.* .*\] "GET /piwik.php.*e_n=foo' access.log* 3
Checked that the 27th is fully contained in the logs.
root<a class='mention' href='https://github.com/piwik'>@piwik</a>:/var/log/apache2# mysql piwik > SELECT idaction FROM log_action WHERE type=12 AND name LIKE 'foo'; 123 > SELECT count(*) FROM log_link_visit_action WHERE idaction_name=123 AND server_time LIKE '2019-02-27 %'; 1 > SELECT idvisit FROM log_link_visit_action WHERE idaction_name=123 AND server_time LIKE '2019-02-27 %'; 456 > SELECT hex(location_ip) FROM log_visit WHERE idvisit=456; X
After conversion, the appropriate IP.
> SELECT server_time FROM log_link_visit_action WHERE idaction_name=123 AND server_time LIKE '2019-02-27 %'; 2019-02-27 16:27:38
Any ideas what that could be? Our website is sometimes well visited, could it be that Matomo doesn't process everything?
Matomo 3.8.1 28/Jan/2019
I would guess, the visitor does have DNT enabled or did use opt out?
That would mean that, over the last few days (sample is still a little too thin), roughly 50% can not be counted by Matomo. :-(
Well, you are able to ignore the DNT header via a config option. But yes, if you respect the privacy of your users, you will probably only get 1/3 to 1/2 of the real users.
Thank you for your answer!
Yes, we respect privacy, I will evaluate the DNT headers and HTTP-Cookies on the Matomo server in the Apache log. And I will report it here.
@rjxp I'll close this issue for now. If you are still having unprocessed requests to Matomo, that are not caused by DNT, useragent or ip exclusion feel free to reopen with some more details.