A session is a visit to your site or app from a single visitor. It consists of events like page views, downloads, ecommerce conversions and the like.
A session starts with the first event and ends 30 minutes after the last event. This means that when the time gap between two events is longer than 30 minutes, a new session is created with the second event.
During the first session, a visitor is marked as
New visitor. When they visit again, they are marked as
Piwik PRO recognizes visitors using three methods:
_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 IDto recognize visitors.
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 IDas a fallback mechanism to recognize sessions when he can’t create cookies and use
User IDis 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.
User IDhas the highest rank among mentioned identifiers. If available, the tracker uses it instead of other methods.