If you import your server logs in Piwik, you may have noticed that in this case Piwik does not track Unique Visitors as well as when using the Javascript tracker. You can configure Piwik to improve the detection of “Returning Visitors” and unique visitors.

For example, to configure Piwik to lookup a visitor up to 30 days (30*86400 seconds) in the past, you would set:

[Tracker]
window_look_back_for_visitor = 2592000

Note that by default, Piwik looks only in the past 30 minutes. We do this for performance reasons: to keep Piwik tracking fast, even if you track hundreds of thousands or millions of unique visitors per month.

If you do not use Log Import but use JavaScript tracker or another client, you can still improve the tracking of unique visitors and unique devices. See this FAQ for more information: How do I get the number of active unique users to my app?