Unique Visitor Determination

Hello Matomo Team!

Matomo can determine unique visitors.
Then, which program can make that determination?

Access information is archived in import_logs.py.

Hi @okumuryu,

Maybe this can provide you some clues:

Thank you for reply!

I have an additional question.

We have heard that Matomo will support UA-CH in 4.12.0.
So, if I use Matomo 4.11.0 or earlier and Chrome is upgraded and the user agent is reduced, will the accuracy of unique visitors when accessed with that Chrome version be reduced? Or does it remain the same?

Not sure, maybe @innocraft can reply better, but in my opinion, as you are using the import_logs.py (and I figure that you don’t have any user ID), the unique visitor (for a single day) won’t change.

Thank you Philippe !!!

@innocraft, Do you have any knowledge about this?

Hi @okumuryu Visits are stored in the* log_visit *table.

The* index_idsite_config_datetime *index is used when trying to recognize returning visitors.
The index_idsite_datetime index is used when aggregating visits. Since log aggregation occurs only for individual day periods, this index helps Matomo find the visits for a website and period quickly. Without it, log aggregation would require a table scan through the entire log_visit table. You can learn more here: https://developer.matomo.org/guides/database-schema and by reviewing https://matomo.org/faq/how-to/faq_190/

config_id (Which is what Matomo uses to identify returning visitors within a certain span of time). When a visitor enters your website and has cookies disabled, Matomo generated a “Config ID” based on the information from the visit such as device, browser, IP, etc. This is similar to what some would call a ‘fingerprint’.

However, the “fingerprint” in this case is also combined with a “salt” which then generates the config_id hash.Matomo then uses that config_id hash and looks back a certain amount of time to find a matching config_id hash to determine is a visitor is a returning visitor. If it finds a matching config_id hash within the configured time span, it then assigns it the same Visitor ID as the previous visit. If it does not, then it generates a new Visitor ID for that visitor.What makes the config_id different to a fingerprint is in the “salt” that is added - this salt is a random string of alphanumeric characters stored in the Matomo database - this “salt” is recycled once roughly every 24-48 hours and one to two days later the previous “salt” is discarded.

This is specifically designed for privacy and to prevent being able to reverse engineer information that would otherwise have been anonymised (For example IP information).

Hope this helps clarify your concerns.

Thank you @V.K !!!

Matomo generated a “Config ID” based on the information from the visit such as device, browser, IP, etc.

In which program is this process running?


The getConfigId() method in core/tracker/Settings (https://github.com/matomo-org/matomo/blob/6b7f7281ae3dbd7b1bf38c6713c403f19897d978/core/Tracker/Settings.php#L35) is used to generate the config_id for each request before attempting to match it to a known visitor. This method uses fields from the request, the ip address and methods from DeviceDetector to generate and return the config_id.

Hope this helps clarify your concerns.