How do I improve the detection accuracy of Unique visitors and Returning visitors?
If you import your server logs in Matomo (Piwik), you may have noticed that in this case Matomo does not track Unique Visitors as well as when using the Javascript tracker. You can configure Matomo to improve the detection of « Returning Visitors » and unique visitors.
By default, when trying to match visitors cookies are not available, Matomo looks back only in the past 30 minutes (more details). We do this for performance reasons: to keep Matomo tracking fast, even if you track hundreds of thousands or millions of unique visitors per month.
For example, to configure Matomo to lookup a visitor up to 6 hours in the past, you would need to set the setting to 6*3600 = 21600 seconds under the [Tracker]
section of your config/config.ini.php
file:
[Tracker]
window_look_back_for_visitor = 21600
Note that increasing the value of this setting may have negative performance impacts on your Tracking API requests speed.
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?