How is a visitor counted in Piwik PRO?

When a person comes to your website, they can be counted as a visitor multiple times.

Piwik PRO uses three methods to recognize a visitor:

  • Visitor ID: Our JavaScript tracker sets a vistior cookie (_pk_id.*)  in the visitor’s browser and assigns a unique identifier called a visitor ID. The tracker uses that ID to recognize the visitor. 

    The cookie expires after 13 months by default. Also, a visitor can clear cookies at any time. If that happens, the tracker will set a cookie again with a new visitor ID.

    Note: If you turn off Use a session ID (Administration > Sites & Apps > Privacy > Ask visitors for consent (off) > Use a session ID (off)), the tracker will only use Visitor ID to recognize visitors.

  • Session ID: Our JavaScript tracker creates a hash for each session based on the visitor’s IP address, operating system, browser name, browser version, browser language and enabled browser plugins. The tracker uses that hash to recognize events belonging to the same session. 

    The hash expires 30 minutes after the last event. If a visitor returns to the site or app after these 30 minutes, a new session is created.

    The tracker uses Session ID as a fallback mechanism to recognize sessions when he can’t create cookies and use Visitor ID.

  • User ID: This is an additional method that the JavaScript tracker can use only after you’ve set up a user ID. The User ID is any unique identifier that you can pass from your site or app to the tracker. It can be an email address, username, phone number and the like. It can also be a hash based on visitor’s unique identifiers.

    The User ID has the highest rank among mentioned identifiers. If available, the tracker uses it instead of other methods.

If Piwik PRO can recognize a person based on the above information, he will count that person as a visitor. But in some cases, Piwik PRO won’t know that a person is the same visitor.

Here are some of those situations:

  • When a person enters your website on a laptop and mobile, then they will be counted twice.
  • When a person enters your website through different website browsers, then they will be counted multiple times. 
  • When we don’t use User ID or Visitor ID, and base on the visitor’s fingerprint, we may count them multiple times when they change the location or workstation and the IP address changes.

Another important thing to know is that when you look at reports you may see that the number of visitors doesn’t add up as you would think at first glance.

For example:

  • In week one, we had 2 visitors.
  • In week two, we had 2 the same visitors.

Now when we look at a date range for week one, we’ve got 2 visitors, and for week two 2 visitors as well. But, if we take a date range of these two weeks (week one + week two), we’ve got 2 visitors (not 4 as we might think).

Piwik PRO counts (it’s a predictable counting) the number of visitors for each date range so that you could see the number that corresponds to reality the most.

Was this article helpful?

Technical support

If you still have some questions, visit our community.
There’s always someone ready to help!

Back to help center