Just tested it and it get’s overridden if both requests are from same workstation. IMO it’s a bug to fix on our end. I’ll coordinate that. For the time being, you have to make sure that whenever user id changes, you have to change also user agent or ip address.
Our dev team has to check if it’s a global or tracker debugger bug.
You’re right that this happens really rarely, I’d say 99% of cases have only one user_id per working station. On the other hand, It ruins the entire use case of tracking different users from one household, so we have to fix that.
But in the reports, the ID will appear as a Cookie ID and not as the visitor ID, which is coming from an unknown place (I am guessing your internal logic with IP and UA)
Hi. We’re currently working on improvements and a bit more control when it comes to the used identifiers when user id is set. I don’t have the ETA yet.
When it comes to the second question, the visitor ID is not always the same thing as cookie ID. If user ID is set, visitor ID is derived from its value.
On our website, users are never “identified” with the user_id.
We simply use the visitor_id created by Piwik.
Now, when they signup to our app, a few events are occurring on the server that I want to track. The JS Piwik library is not used on our app server and we don’t plan to use it.
So, by sending these API calls, where the user_id is defined and so is the _id, I am hoping to stitch everything together, the website navigation/source/medium, and the APP events.
Yes, it makes sense. Is your backend app deployed on the same domain? Are those request sent after visitor’s interaction with the backend or it’s a totally separated task? I’m asking, because you can also read the cookie id server-side. It all depends on your current architecture.
Or, approaching this topic from different angle - is there any identifier that is common both for those anonymous visitor and your backend when sending a request with information about signup?
BTW. if you don’t want to merge events coming from same device/IP, you can simply disable Session ID during development.