How do I get set user id from client side using cordova

I have a cordova application that I would like to set wonder pusd user id with a user id from my app so that I can be able to target single user for notification.
OR is there any other way round I can use to be able to target single user for notification?
I tried this from cordova client side WonderPush.setUserId but it gives error undefined.
Please how do I achieve this?


undefined is not an error but the return value from a function that does not return anything, like a setter.
You can check it’s working when you see another installation created for the same device with the new userId. The old installation will then be marked opt out as the push token gets moved to the installation representing the new profile.