How to track visits on my intranet?
If you want to make sure that all unique visitors are tracked correctly in your intranet, you have two choices:
- Use UserID feature
Piwik PRO Tag Manager provides an automatic setup of UserID, you only need to create a variable which will be catching the userID value. The value can be anything you like, however, it’s important so it is unique to avoid confusing the unique visitors.
First of all, you need to verify if the userID value you have set, e.g. the email address, is provided anywhere on your page for you to grab. When you find it, just right-click it and inspect it to reveal the code.
Our code has an id parameter, so it can easily be grabbed by the Piwik PRO Tag Manager.
Now all you need to do is set up your tracking code to pass the variable to Piwik PRO.
That’s it – you are now tracking UserID in Piwik PRO!
- Manually using UserID feature
All you need to add is the following:
just before the
Of course, it will be up to you to pass the correct value in the ‘USER_ID_HERE’ place.
- If you cannot use User ID, alternatively Piwik PRO support can edit the config/config.ini.php and add the following:
[Tracker]trust_visitors_cookies = 1
In order to set it up, please contact email@example.com
Now, even if all visitors have the same IP address, OS, browser configuration, etc., they will be tracked as unique visitors based on the first party cookies.