Analyzing a log file in Matomo

If you create a new nginx log file and want Matomo to include it in reports, you need to add a line to cron to ingest that new log file. e.g.:

2 4 * * * /usr/share/nginx/html/your-site/piwik/misc/log-analytics/import_logs.py --url=https://your-site/piwik --enable-bots --enable-static --enable-http-errors --enable-reverse-dns --recorders=2 --idsite=3 /var/log/nginx/new-access.log

Getting the idsite right is extremely important. If you get it wrong (possibly as a result of copying another import cron job), nothing will show up in the report for that site.

See also:

#matomo #analytics #cron #nginx