User Id React Native

Hi there,

We build an app using React Native and have an issue regarding User ID.
We follow all the appropriate documentation in order to set this id but it doesn’t work.
Here is the documentation we used :

Is someone facing the same issue ? What could we do to unlock the situation?

Regards,
Audrey

Hi @AudreyR,
Welcome to our community!

Could you please share more details on how you implement it and test it?

Best,
Oliwer

Sure,

here is the code used by the developer :
await PiwikProSdk.setUserId(“userIdString”)

  • he makes sure that the userId value is a string and set it on every scree
  • maybe there is one missing method on is side ?

For the tests :

  • I checked directly the hit sent via browserstack
  • I also checked on piwik reports but couldn’t find any user id
  • I’ll attached you one request on a screen. The userId value should be the one you see on dimension8
    Capture d’écran 2023-09-06 à 13.20.35
    Capture d’écran 2023-09-06 à 13.20.23
    Many thanks for your help
    Audrey

The problem here is that userID will not be sent if the data anonymization is enabled.
To fix the issue you have to turn off anonymization for visitors that you want to have userID value.

Best,
Oliwer