Hi - we have been trying to setup Piwik 2.2.1 as described here: How do I configure Piwik Tracking for high reliability? - Analytics Platform - Matomo
Our setup uses nginx and we have a script that parses log files and imports the relevant GETs to piwik.php? using the import_logs.py file with --replay-tracking
The problem we have is that if record_statistics is set to 0, as suggested in the documentation, import_logs.py does not write anything to the database. With record_statistics =1, log import works just fine.
This can also be seen if we try something like:
curl -i -X POST -d '{"requests":["?idsite=2&url=http://example.org&action_name=Test bulk log Pageview&rec=1","?idsite=2&url=http://example.net/test123.htm&action_name=Another bulk page view&rec=1"]}' http://xx.xxx.xxx.xxx/piwik.php
and we get a response of
<pre>DEBUG Piwik\Common[2014-05-07 22:00:30] [0231e] The request is invalid: empty request, or maybe tracking is disabled in the config.ini.php via record_statistics=0</pre>
Once we set record_statistics = 1 it all works fine.
Now, the question is: Is this a bug for 2.2.1 or is this expected behaviour and the documentation should be updated to reflect this.
Thanks!