A unique visitor is a website visitor with a certain set of parameters: cookies, browser, OS, etc.
The system remembers such visitor and the during his next session this visitor is not considered as unique in a current accounting period.
If the visitor re-visiting your website:
- deleted cookies
- did not visit the site for more than 150 days (cookies are stored for 150 days)
- logged in from another device
- reinstalled the browser or OS
he will be considered as a new unique visitor.
The service recognizes visitor’s cookies, but this can be customized so that a visitor with unrecognizable cookies would be merged with a user we already know. This can be accomplished by assigning this visitor with a user id (this should be done on your side) and sending user id into the service. Afterwards, we will be able to recognize this visitor, when he authorizes on your site, even if he comes with different cookies (or via different devices) or after the interval of 150 days (after the cookies storage period for cookies expires).
You can merge visitors by user id if your site has registration and authorization functionality.
We’re using “User ID” to merge visits from different devices. Once the visitor is authorized in your system, you need to send us his ID, using this method:
First argument is User ID. Second - hash HMAC SHA 256 (). The text for hashing is User ID, the key is User Auth Key, which you can find it in the Admin panel.
Example in PHP:
$userId = '...';
$hash = hash_hmac('sha256', $userId, 'User-Auth-Key' );
echo "carrrot.auth('".$userId."', '".$hash."')"
More details can be found here.