Do I have to use a JavaScript tracker with Matomo, or can I use it just like I used AWStats (log-based)?
You absolutely can use Matomo in log analytics only mode, just like AWStats. This is a common scenario, especially for those who are migrating from AWStats, since one of the reasons to use AWStats was to avoid adding any tracking script to your website. Matomo’s log import feature was designed for this purpose: to offer a no-JavaScript, privacy-friendly analytics solution. So, if you prefer not to touch your websites’ code or if you operate in an environment where adding tracking scripts is not allowed (for example, some government or enterprise sites), Matomo will happily crunch your server logs and give you analytics reports similar to what AWStats did.
However, Matomo also gives you the choice of optionally using a JavaScript tracker. The JS tracker can work alongside log analytics or separately. Some users initially start with log import (for historical data or for policy reasons) and later decide to add the JS snippet to get additional metrics. It’s totally up to you.
Note: if you do use both methods for the same site, you’ll want to be careful not to double-count. Typically, you would choose one primary method or carefully configure them (for example, only use JS tracking going forward, and use log import for past data, or use JS tracking but exclude those pageviews from log import by filtering out Matomo’s own HTTP requests). Matomo’s documentation covers how to combine methods if you ever need to but if your goal is “operate exactly like AWStats,” then stick to log import only. That will already give you a comprehensive picture of your traffic, including those visitors that a JS tracker might miss (like bots or users with heavy ad-blocking).
To summarise, no, you do not have to use the tracking code. Matomo can function as a direct log analyser, providing a secure analytics solution when you don’t want any client-side scripting. This was a key requirement for many AWStats users and Matomo continues to support that fully. You have the freedom to choose the method that best suits your needs, and you can change your mind at any time.