Search code examples
matomolog-analysis

Importing apache logs into piwik


I am in the process of switching my site analytics from GA to Piwik and would like to incorporate all the historic data that I can. I have already concatenated the full trail of apache log files I have in my possession. However, what I do next is not at all clear to me and the Piwik documentation does not help. It says something along the lines of

python /path/to/piwik/misc/log-analytics/import_logs.py --url=http://analytics.example.com access.log

I have my concatenated log file, all.logs, in the log-analytics folder. I would have thought that I just need to issue

python /path/to/piwik/misc/log-analytics/import_logs.py all.logs

but that throws up an error message. When I provide the URL to the site in question too I get an error saying that it gets back an HTML document (naturally) which it does not like.

I'd be most grateful to anyone who might be able to put me on the right track here.


Solution

  • I think --url=http://analytics.example.com let's you set the URL of Piwik, not your website.