Get idVisit for a specific browser


Hello Team/people,

I am very new to piwik and trying to get required values.

I want to know the visitor details of a specific browser, from my javascript, I will invoke Piwik API and call “Live.getVisitorProfile” method which will give me latest visitor profile but, all I want to know is specific visitor profile of a browser. Good point to note, in the same method we can pass “idVisit”, i.e., required visitor id, so that I can get the values.

And also there is another method “Live.getMostRecentVisitorId”, which will give the latest visitor id.

my doubt/issue : the website on which Piwik is running has many visitors and say visitor one (javascript plugin which is running from client browser) will request for latest visitor, and at the same time, visitor two might have come and considered as latest visitor, then piwik API may give the profile details / latest visitor id of visitor two.

How can I get the visitor id or visitor profile of visitor one, i.e., any visitor id/visitor profile of the browser on which javascript is running (javascript plugin which is running from client browser).