Yes, you can use Javascript tracking, direct calls to the Tracking API and server log file analytics at the same time- if you record data for each technique in a separate website in Piwik.

For example, if you already use the JavaScript code on your website and you wish to import data from the log file as well, it is important to import server log file data in a different website to keep things in order. If you import data from the logs in the same website as the JavaScript tracker, you will have “double counts” of visits, pages, etc. In this case we recommend the following steps:

  1. create a new website in Piwik, eg. with a name “Example.org (log files)”.
  2. note the idsite of this new website. You will use this website ID to import your log file data into.
  3. in the command line, force all requests from the log files to be recorded in a specific website ID via
    --idsite=X