we are running into problems tracking our website’s visitors as it is accessed both from the Internet and from an intranet setting. The latter results in all intranet users being tracked as one visitor, since all request originate from the same IP and they all have a similar environment (OS, Browser, installed plugins). I’ve tried to set the appropriate switch in the configuration, but to no avail. When doing so, all requests are counted as different visits.
However, as the users are required to log in, we would be able to generate a visitor ID for each unique visitor and embed it in the tracking code in the HTML pages to explicitly set the visitor ID used by Piwik, like so:
I’ve searched the forum for posts concerning similar problems and found mentions of a “cid” parameter, which seems to do what I need, but no official documentation. Can somebody tell me what it actually does? It is suggested to use it like this:
The auth_token, as it seems, has to be taken from an administrator’s account (and I have a very bad feeling about this).
Long story short: Is it possible to explicitly set the Visitor ID used by Piwik to identify unique / returning visitors using the simple image tracking API via some added parameter?
Many thanks for the hint! The tracking of the users by embedded images now works as intended.
However, I need to explicitly set the visitor ID for the Javascript Tracker as well. Can you please provide me an example of how to set the CID in the JS code snippet?
Thanks for the reply, I should have been more specific.
My problem is: where do I insert the CID? For instance, the JS code to be inserted on the page looks like this:
For the image tag part, it is clear to me that the CID is another request parameter, as shown in the example. But how to I add the CID to the JS part?
I’ve tried to add a JS call like
piwikTracker.setVisitorId("0123456789abcdef")
as well as adding the CID to the
Piwik.getTracker(...)
method as request parameter, both ways did not work.