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:

idsite=xxxxxx&rec=1&url=xxxxxx&action_name=sign_up&r=1671701470794&cdt=2022-12-19%2020%3A17%3A49%2B00&_id=8895de531b96b488&uid=13404_1&cid=8895de531b96b488&cip=81.82.193.51&ua=Mozilla%2F5.0%20(Macintosh%3B%20Intel%20Mac%20OS%20X%2010_15_7)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F108.0.0.0%20Safari%2F537.36&lang=fr&e_c=app&e_a=click&e_n=sign_up&uia=0&ts_n=app

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.