Not able to send the Visitor ID

I am using the HTTP API to send data from our app.

The first app event is the sign up event which should allow me to stitch the visitor ID (sent to the server back-end) and the user ID.

Here is a example with test data of what is being sent:


But despite trying to send the Visitor ID as the _id and as the cid parameter, it always appears under the Debug Tracker as the Cookie ID and never as the Visitor ID:

Or is it just wrong labelling in the tracker?

The Cookie ID would be the actual Visitor ID,
and the Visitor ID would be the actual Session ID?

Hi there. If you use user id, the visitor id is derived from it. Could you explain what exactly you’d like to achieve? I mean, what would be the scenario you want to cover - e.g. switching from being anonymous to have a user identified without creating an additional session?

Scenario would be a new lead arriving on our commercial website.
He is not recognized at that moment except with the visitor ID.

The person after consulting the website decide to create an account on our app.
He goes to the app signup form on another domain.

The visitor ID is sent to the second domain as a URL parameter.
the script is present on the signup form page.

Once the signup form is filled in, the person enters the app.
The Piwik script is NOT present in the app.

App events are then sent via HTTP API.

The idea is to stitch what happens in the commercial website (where the lead came from mainly) to the app events (signup, become a customer, …)

I was told that sending the signup event with visitor ID and user ID, would then stitch these together.

After that initial even, all other app event could just be user ID.

Ok, so it should work. For now it’s hard to debug it, because the first event with user_id overrides the visitor ID. But if it appears the first time, it should convert the anonymous session into one having user_id set. You can check it by sending two tracking requests:

  1. One with min no. of params like idsite, rec=1, page title, url and id. It would be nice to have a fresh visit only with this one event. You can force that by using for instance a different browser.
  2. Another one with same params, but also user_id set.

You should end up with one session having both those page view events.

Next week I should have bit more time so I’ll make sure that we have all the scenarios documented.